Jump to content
  • Advertisement
Rob Ainscough

PBR ... how to make it work well at all times of day/dusk/dawn/night?

Recommended Posts

I've been experimenting/coding a PBR implementation (BRDF) on a basic landscape and use the sky texture as an influence for application of light.  But my dusk and dawn the terrain colors are overly saturated with orange/brown from my sky textures and/or my whites (like snow) would turn brown.  The sky looks great but the terrain and/or any objects with PBR supporting materials reflect way too much of the sky color.  Problem is, if I dial that down then the saturation and specular is off during day time (far too dull) ... adjust for one time of day and mess up another.

Of course, Ray Tracing extensions in DX12 could obviously help but it's still not going to solve my dusk/dawn PBR issues ... that seems to be more fundamental. 

So I guess my question is, how can I get PBR to look good at all times of the day/night (especially dawn/dusk)?  I've gone thru Matt Pharr's book but haven't really found anything that could help me with this specific issue of whites (specifically snow textures).

Thoughts?

Cheers, Rob.

Share this post


Link to post
Share on other sites
Advertisement

One of the reasons that everyones started moving towards PBR is that it's easier to make work under loads of different lighting situations than our old ad hoc models :)

What kind of tonemapper are you using? 

Do you do any other post processing? 

Can you post some images? 

It sounds correct that a white surface surrounded by a black/orange dome would look orange/brown... In a real camera, photos of that surface could be shifted away from orange to neural white by changing the white-balance settings. i.e. The physical surface is orange, but we edit our photographs so that it looks white because we subjectively prefer that over an objective measurement of reality. You could add a white-balance step to your tone-mapping, to shift towards blue at sunset/sunrise, and shift towards orange when under the midday sky, like a real camera. 

Share this post


Link to post
Share on other sites

Also note that most of PBR materials we can find do not come from physical measurements. Thus they might not reflect well real-world matters.

Share this post


Link to post
Share on other sites

Apart from the previous ideas, you could also double check your gamma, and make sure that you apply lighting in linear color space. That way, the results will be more predictable. If you are not familiar with this, look up the term "gamma correction". This is essential to have in every PBR pipeline.

Also an image would help here.

Edited by turanszkij

Share this post


Link to post
Share on other sites

Another possibility: bad lighting, possibly involving excessively brown and/or dark textures for the sky. Really physically correct rendering would have the sun as the only light source, with a planet-sized simulation of atmospheric light scattering making the sky blue (or dark) depending on sun position. Approximations of natural lighting, particularly (as your post seems to imply) with light emitted by a skybox according to an arbitrary texture, could easily cause incorrect light hue, intensity and angular distribution.

 

Share this post


Link to post
Share on other sites

Thanks for the responses, unfortunately other projects have taken precedence so I've put this on the back burner for now to revisit at a later date.  

9 hours ago, LorenzoGatti said:

Really physically correct rendering would have the sun as the only light source

Actually no, I'm using Sun, Moon, stars/Milky Way and "ground" lights as sources.

 

On 2/5/2019 at 12:12 AM, _Silence_ said:

Also note that most of PBR materials we can find do not come from physical measurements.

I thought "Substance" suite was exactly that? 

On 2/5/2019 at 2:09 AM, turanszkij said:

you could also double check your gamma

Unfortunately gamma is too global ... I did experiment with "multiple" light source (invisible suns) at various opposing positions and that did actually help but not sure it looked as "natural" as I'd like.

I honestly haven't tried DX12 RTX extensions for Ray Tracing for my primary light sources (sun, moon, stars/Milky Way) ... but my understanding is that wouldn't be viable for large scale globe/terrain situations?

Anyway, appreciate all the responses and when I have some time I'll return to this project.

Cheers, Rob.

Share this post


Link to post
Share on other sites
38 minutes ago, Rob Ainscough said:

I thought "Substance" suite was exactly that? 

Well I don't know. After a quick look over their website, I haven't seen any such mention. But just this:

Quote

All materials have been developed with physically based workflows in mind.

From what I know, this is quite complicated, time consuming and also expensive to have real good reflectance BRDF and such. We had one room dedicated to this in a previous company. And most of our clients were sending us samples of their matters instead of trying to do them on their own.

46 minutes ago, Rob Ainscough said:

Actually no, I'm using Sun, Moon, stars/Milky Way and "ground" lights as sources.

 

Lighting matters a lot too. If you want realistic sky lighting, the CIE norms are where to have a look. But this isn't a little thing...

Finally, one easy thing you can do is to trick ambient occlusion and roughness. You can also find on the internet some BRDF libraries where common materials are listed.

Share this post


Link to post
Share on other sites
3 hours ago, Rob Ainscough said:
12 hours ago, LorenzoGatti said:

Really physically correct rendering would have the sun as the only light source

Actually no, I'm using Sun, Moon, stars/Milky Way and "ground" lights as sources.

The moon and stars are negligible during the day and need the same accurate treatment as sunlight during the night, while "ground" lights, should behave nicely with plausible material models (and are definitely not part of the twilight problem).

My point is simply that lighting according to a skybox texture is unconstrained, completely different from the correct physical simulation, and therefore unlikely to be physically accurate.

Layering hacks leads further away from correctness: if you complain that gamma correction is too global you are seriously missing the point (correct display and input gamma is a prerequisite for correct PBR, not a discretional fix to improve some part of the scene).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!