4
$\begingroup$

I created an animation in Blender of a car entering and exiting a road tunnel on a bright sunny day. However, I noticed that there isn’t much difference in contrast between the inside and outside of the tunnel. I can clearly see details both inside the tunnel and outside, when I would expect, for example, that if the inside details are visible, the outside should appear overexposed or “blown out.”

I render in Cycles and export in LDR format: PNG 8 bit sRGB with Standard view; EXR 32 bit and then clipping.

Is there something I’m missing in the setup of my scene or rendering? I tried to change tunnel materials and environment texture strength, but nothing really changes.

Compare my 8 bit PNG render with a YouTube video (min 2:12 https://www.youtube.com/watch?v=M-EhRdE62p8): huge difference (in the video you are blind from the tunnel outside).

enter image description here

New contributor
Liuuuuk is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
7
  • $\begingroup$ An image would be helpful $\endgroup$ Commented yesterday
  • $\begingroup$ I think you want to use the Exposure parameter of your camera or do it in post docs.blender.org/manual/en/latest/compositing/types/color/… Also if you're using EEVEE I think you'll have to use some tricks $\endgroup$
    – Gorgious
    Commented yesterday
  • $\begingroup$ @MarkusvonBroady added $\endgroup$
    – Liuuuuk
    Commented yesterday
  • $\begingroup$ I do not see any settings. But first of all, your environment does not seem to be set to a strength that resembles real world conditions. Apart from that, what you expect is something that gaming engines have built, but Blender is not a gaming engine. It does not adjust the exposure dynamically according to the lighting conditions, you have to set it to your liking. So to get fake auto-exposure in Blender you have to manually change the exposure settings. $\endgroup$ Commented yesterday
  • $\begingroup$ @GordonBrinkmann you mean that if I add an HDRI to World Environment Texture with strength 1.0, it doesn't resemble real world conditions? So how can I get real world conditions without trying every possible strength value? $\endgroup$
    – Liuuuuk
    Commented yesterday

3 Answers 3

6
$\begingroup$

This is an answer based on your additional question in he comments: "You mean that if I add an HDRI to World Environment Texture with strength 1.0, it doesn't resemble real world conditions?"

No, not really. Because "real world conditions" in photographs or even your eyes are always in some way or another adjusted. Your eyes adjust automatically by changing the size of the pupil. Photos taken are always depending on aperture and exposure time. No camera can picture the whole dynamic range of the world, so HDRIs depend on how they were created and by whom and can vary in brightness as well, even if you set them all to a strength of 1.

Here is a comparison - all three HDRIs are from Poly Haven, all are taken with clear skies at noon (as you might see in the reflection on the left sphere), all are rendered with the world's Strength at 1. The first one on the left is the brightest and seems a bit overexposed, the middle looks "normal", but the right one is very bad and dark - even though when you look at the original image, everything there is in bright sunlight and objects there have clear shadows. But the scene looks so dark as if it was just a JPG.

hdri comparison

"Real world conditions" for a clear blue sky have the sun at a power of about 1000 to 1360 W/m², which is the unit of the Strength in Blender sun lamp object. The blue sky in the shade has a power of around 1/6 of the sunlight, so roundabout 1000/6 $\approx$ 167 W/m² to 1360/6 $\approx$ 227 W/m².

Easy, isn't it? So take a sun lamp, set the Strength to 1000, give the world a blue color and set it to something like 160 and there you go.

The settings:

settings

The result:

overexposed

Okay, not so good - maybe a "bit" overexposed? Now, why is that? Because Blender's camera is not a real camera. Sure, you can change the Exposure in two different places (apart from the Compositor), in the Color Management settings or under Film > Exposure - but what you cannot do is change the aperture or exposure time to let more or less light fall onto the sensor (which the camera also does not have of course). There are Aperture settings in the Camera Properties, but they are used to simulate depth of field.

Anyway, as I said what you can do in Blender is change the Exposure in the Color Management with a default value of 0 or under Film, there the default is 1.

The difference is as follows: Color Management uses "stops" as unit, which comes from photography. Exposure = 0 means average brightness, the camera changes aperture and time so that the average brightness of the image is 50% grey (camera sensors only work in greyscale, simply spoken). Each stop plus means the brightness gets doubled, each stop minus means the brightness gets divided in half.

The Film > Exposure setting is a scale factor. 1 means 100% the brightness as it is, 0.1 means 10% of the brightness. 0 means, the image is absolutely black - yes, even emissive objects etc., it is the equivalent of the camera shutter being completely closed.

Another important difference between Color Management and Film: Color Management ist a post-process and you can change the brightness of the image after rendering, while Film is affecting the render itself. Rendering something dark with an Exposure of 0.1 cannot be brightened up by setting the value back to 1, it will stay dark.

Now here is the scene with the very bright sun and sky again. On the left is the image as it was before, but the Color Management > Exposure set down to -7 (stops). -7 stops means, the image brightness is only $(\frac{1}{2})^7 = \frac{1}{128}$ of the original brightness.

On the right is a new render of the image, the Color Management > Exposure at the default 0, but the Film > Exposure set to a factor of $\frac{1}{128} = 0.0078125$ and as you can see, the results are the same.

exposure comparison

But taking photographs with a real camera usually does not require to set such extreme negative exposure values - because as I mentioned earlier, real cameras control the brightness of an image through aperture and exposure time. Changing the exposure value to something higher or lower is only used to deliberately force the camera to over- or underexpose from the standard medium brightness.

But since Blender's camera does not have the functionality to let more or less light in, you have to manually adjust the Strength value to your liking. This usually is no problem for only indoor or outdoor scenes, however if you want some auto-exposure effects in an animation when moving from dark environments to bright environments and vice versa, then you have to use tricks like animating exposure values or the strength of light sources.

But notice that when you for example animate the Strength of the world and decrease it to simulate a lower exposure you have to be aware that when you have other lamps in the scene (like the ones inside the tunnel) will suddenly appear much brighter compared to the sky if they do not decrease in Strength as well, since a camera cannot expose the lamps and sky differently within the same photograph. So for these effects it is always better to animate the overall exposure than separate light sources.

$\endgroup$
14
  • $\begingroup$ "But the scene looks so dark as if it was just a JPG." - I don't follow, how is darkness related to JPG file format? "the sun at a power of about 1000 to 1360 W/m²" - I think it would be nice to link to Wikipedia here, as there's a lot of nuance to this: in particular, the higher end of the range is the irradiance at the top of atmosphere, and the lower end at ground level with perfect conditions (clear sky). The missing ~360 W/m² is what is attenuated and bounced both to cosmos and to ground as sky color. $\endgroup$ Commented yesterday
  • 1
    $\begingroup$ @MarkusvonBroady How darkness is related to JPG format? I'm not talking about general possible values in all kinds of images, I'm talking about downloaded HDRIs to use as environment lighting, as it seems the OP is asking about them. So it is related to JPG in such a way that usually HDRIs specifically created to light environments have brightness values that exceed the 0 to 1 range, which JPGs have not - so loading a JPG into an Environment Texture node will almost always result in a darker scene than using a dedicated HDRI when set to the same Strength value. $\endgroup$ Commented yesterday
  • 1
    $\begingroup$ The 1360 is what you would experience on the International Space Station. The 1000 is the clear sky on the sea-level. So for a usual render, being on the ground, 1000 W/m² should be the reference, and also this value should be compared to the sky irradiation, because when you're on the top of the atmosphere you don't even see the sky, and shadows are much closer to black. $\endgroup$ Commented yesterday
  • 1
    $\begingroup$ @MarkusvonBroady The 1000 W/m² should be the reference, true - guess why that is the value I used in my example? 😉 And that's why I used 160 for the world strength because it's just a little less than 1/6 of 1000. But as I said, my answer was never about giving perfect physically correct values, just to show the large discrepancies between HDRIs at 1 and real world brightness. But this discussion can probably shine a little more light onto this topic ( see what I did there? 😁) for the OP as well. $\endgroup$ Commented yesterday
  • 3
    $\begingroup$ I see you had a party here discussing Sun brightness. I regret I missed that. :D I think it's better to consider ground illumination. Easy to measure with 30 euro device. Also easier to find info Radiance is also very confusing in Blender. Blender lights consider radiance of only visible spectrum, which is not really what physicists talk about when saying radiance of the Sun, is it?.. Very confusing. $\endgroup$ Commented yesterday
5
$\begingroup$

Increase contrast between tunnel and outside

There are 2 things you can play with to increase the light difference between the tunnel and the outside :

  • Increase HDRI strength / decrease tunnel lights strength
  • Increase general contrast with Render > Color Managment > Look

You probably want to play with the light strength, but the general contrast will contribute too.

That being said, there are multiple reason why there isn't any way to reproduce a real world example exactly. I'm assuming you don't own a lightmeter and you don't create your HDRI yourself, on-site.

HDRI are relative, not absolute

The same way photos do not show the absolute luminosity, HDRI are never absolute. You could have night HDRI brighter than day HDRI, it depends on how it has being created. There is nothing absolute.

This also means, a strength of 1 is arbitrary, it doesn't mean it's the equivalent strength of the real world. For example with default settings, a sun lamp has its strength usually set around 2-3 to match a real world sun.

Dynamic range

Your example video seems to be from a dash-cam. This probably means the dynamic range isn't that great, it probably relies mainly on auto-adjusting the exposure.

Low-cost cameras have a small dynamic range, movie cameras have a greater dynamic range, the human eye even higher, and finally Blender with AgX even higher. You have to take that into account if you want to match a real world example. The image below is for Filmic but I think it's similar for AgX.

enter image description here

(From Blender Guru article)

Color managment

The color managment you choose will affect the look of the render. I don't have any particular advice besides choosing a color managment that emulates real world (AgX, Khronos, not Filmic which is deprecated, not Standard).

Light in Blender isn't light in real world

The purpose of the render engine of Blender isn't to reproduce real world exactly. There are multiple simplifications, clamps, ... The purpose is to create an image that mimics the real world and feels like it. You can probably come really close to real world, maybe even so close that it looks the same. This doesn't change the underlying fact : a render engine makes simplifications.


With these examples, I wanted to show how you can't just copy-paste real world into Blender. With a good comprehension of these principles, you could come close to a real world example, but you'll have to juggle with multiple things to get there.

And so, my question to you is :

Why aren't you trying to increase your HDRI strength ? As you said, the outdoor HDRI isn't bright enough compared to the tunnel. Is there any reason to not crank up the strength ?

$\endgroup$
7
  • 1
    $\begingroup$ What a surprisingly thorough writeup :D I didn't see this chart before, but it makes perfect sense: only a virtual image (and perhaps a super expensive scientific equipment) beats human eye. $\endgroup$ Commented yesterday
  • $\begingroup$ It's not from me !! But yeah, I think the dynamic range is only limited by the floating-point precision. What I mean is, the sensor doesn't clamp in blacks or whites, but the file format will always have limitations due to precision. $\endgroup$
    – Lutzi
    Commented yesterday
  • $\begingroup$ Thank you very much for your answer, really appreciate! Yes, I think I'll try to play with HDRI strength and try to 'reproduce' real world. It seems that's the best way :) $\endgroup$
    – Liuuuuk
    Commented yesterday
  • $\begingroup$ You're welcome ! I know it can be a bit frustrating not to be able to copy-paste the real world. On movie sets, they usually record HDRI and also light measurments (lightmeter) to be able to reproduce the set exactly. Without that, you'll have to eyeball it. With multiple references and observations, I'm sure you'll be able to get great result ! $\endgroup$
    – Lutzi
    Commented yesterday
  • $\begingroup$ I thought it's not yours, still a cool addition. As for sensor clamping - absolutely the case, that's why cameras have apertures. $\endgroup$ Commented yesterday
3
$\begingroup$

Just to expand on the previous answers... It's interesting to consider just how much of contrast there actually is in reality. What is plausible?

It's really hard to understand how one would enter correct light units in Blender. Blender unfortunately does not allow you to simply input lumens for light sources and while it may be easy to figure out what value to use for sun it's whole other story when it comes to mesh lights for example. It's possible, sure, but it's a huge headache((This would work approximately, but RGB has more precise luminous function versions as well and you have to figure out how each type of light works differently to know what amount of light is emitted(it's not always the one you set as power!!!)...), so let's just consider illumination, and not the strength of lights.

Illumination requirements for streets I find online are around 10-70 lux. That's very vague. Illumination outside on a sunny day can be up to 120 000 lux(the kind of direct sunlight that hurts your eyes when just being outside without sunglasses). On a cloudy dark day it could be as low as 1000 lux. Let's say it's just a normal bright day and the ground receives 30 000 lux of light. I have no idea how closely requirements are actually followed in tunnel construction, but I just went for a walk with my dog and my local park is lit between 3 and 41 lux:

enter image description here

Which precisely matches my expectation that the cheapest lux meter money can buy is as good as a guess, because I would have guessed around 40 :D Anyway, joking aside, that's enough evidence for me to think that 40 lux might be a plausible guess for a well lit tunnel.

So if I make a tunnel and I light it in some way, the ground in it could receive around 750(30 000/40) times less light from artificial lighting than the ground outside the tunnel receives from the sky on a bright day. That's plausible. That could definitely happen.

So let's borrow this Old Railway Tunnel Scan from Egor who was kind enough to share it under CC Attribution-NonCommercial license and make it wider so it could pass for a car tunnel and light it.

enter image description here

OK, so that's beautiful and all but how do I know the illumination on the ground? My understand is that you can just add a plane with completely white diffuse shader and then sample the pixel values in the image editor in the render and you could use some formulas to get some values in lux if the lights in Blender were set with meaningful units which is really hard to do and all those complex physics formulas give me a headache(pixel values of the white diffuse plane multiplied by pi would give you irradiance, then you would need to convert irradiance to illuminance - could just multiply by 683, but again could also go more complex for RGB values...), so we can just care about the ratio, not the values themselves. So let's just set any lighting and see how it illuminates a white plane that reflects 100% of light:

enter image description here

So I have some random value for my light strength and now my pixel values on the white diffuse plane are close to 1. Now I have to do the same thing for the outside, I only need to find the strength of my world lighting that would illuminate the plane 750 times more so the pixel values should be close to 750. That's crazy, right?! I will not be able to see that, so I can adjust exposure in color management settings and since I sample values in the render before color management those will remain unchanged.

enter image description here

So HDRI lighting has color and I am just looking for values close to that number I want and the RGB values averaged are around that 750 I decided on. I am just changing my HDRI lighting strength until I get close to what I need in the render.

This is just how absolutely insane the actual contrast can get(and this is still very far from 120 000 lux day), but you can see that the tunnel is starting to look a bit more similar to your linked videos:

enter image description here enter image description here

Exposure change would need to be animated when transitioning between outside and the tunnel same way it changes automatically in the cameras in your video.

Keep in mind that AgX is supposed to compress the dynamic range way better than any dash cam.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .