HDRI- and image-based lighting is simply awesome and highly addicting! This is one of the nicest things that has ever dawned the world of computer graphics. And on that note, I want to share with you something.
I've recently been inspired by Greg Zaal's recent posts (in fact, all of them!) on his blog Adaptive Samples (http://adaptivesamples.wordpress.com).
To be specific, I've really been thrilled by his post titled 'Commonly Ignored Features #2: Proper HDR Lighting'. If you haven't seen that yet, I highly suggest you visit it first before reading any further.
Though it does seem like a plausible solution to the issue, there is something missing, or rather something that was lost.
In the post/article, Greg showed us how to accurately use an HDR image (which is used as an Environment texture), to cast shadows. His technique and workaround is incredible, HOWEVER, I did notice that by using that node setup, the environment lighting/reflection had already been outpowered by the shadows (through a Multiply Math Node), thus reducing the brightness of the reflections/ambient lighting and even darkening/burning the tones, generally.
To elaborate further, here are the things that we need to be aware of:
- the standard HDR environment texture mapping is OK, but it's too 'diffused' and is lacking the defined shadows that we would expect from a sunny HDR image
- Greg Zaal's method works but reduces the ambient feel that we would get from a standard HDR environment texture and it burns the image
- please be kind with me as I don't technically know too much of those Math nodes, I just felt that it looked right and couldn't really explain how and why ;)
The images below demonstrate the issues:
|(standard HDR lighting, Env strength: 3, click image to enlarge)|
|(Greg Zaal's HDR lighting method, click image to enlarge)|
To address this issue (except for the last item about my ignorance), and using Greg's Node setup as a starting point and reference, I added a small node group/connection that controls the 'burning effect' that we would get otherwise.
This is possible by plugging in the Environment Texture to either of the Value input sockets of the Cosine Math Node (Add Math Node works too, with a slight washed out effect), using this to control the Background Node's strength value, while keeping the Environment Texture connected to the Color input socket of the Background Node. I almost got lost explaining things there, so here's an image to better illustrate what I mean:
|(HDRI with better shadows Node Setup, click to enlarge)|
|(my remixed version of the HDR lighting with defined shadows, click to enlarge)|
Kudos to you, Greg, for that wonderful idea. I'm looking forward to seeing more of these out-of-the-box thoughts of yours; really inspiring! ^_^
To the community and readers out there, if you have any suggestions (highly recommended!) and explanations, please feel free to drop by a comment below.
Here's a download link to the .blend file to those of you interested in playing around with it (without the HDRI, for quicker uploads on my side):
Thank you so much for your time and happy Blending! :)
Autumn Field HDRI downloaded from: http://openfootage.net
Greg Zaal's article: http://adaptivesamples.wordpress.com/2013/07/24/cif-2-hdr-lighting/
No monkeys were harmed/burned in this demonstration.
In a flash, Greg Zaal improved the setup making my jaw drop. ;)
Check his updates at:
And here's a really impressive adaptation and improvement by Ben Simonds: