Jump to content
anicg

Lighting: To clip or not to clip

Recommended Posts

Posted (edited)

Rookie question in lighting:
Do I have to make sure the pixel values don't go beyond 1 when the light is very bright to avoid clipping? Is there a case where the pixel value may go beyond 1?
Below is a human body on which a very bright sun is shining, I had to increase it's exposure so I can get brighter global illumination, but I ended up with clipping. 

clipping.png

Edited by anicg

Share this post


Link to post
Share on other sites

Yes. Over-brights (values over 1.0) are very common in lighting. Especially in scenes with a single very bright light source (daylight exteriors for example). Generally you want them (they mimic realistic exposure values) and you want to protect them throughout rendering and compositing so that things you do later in compositing behave naturally.

They only become an issue at the end of the finishing pipeline when you have to decide how to map your image to a particular colorspace and format which will have a limited range. At that point you'll hear people talking about rolling off the highlights (using a exposure curve smoothly map the overbrights toward the upper limit of the format, which we perceive as white) and clipping (the point at which highlight information is cut off and simply mapped as the upper limit of the format).

If you want to do a deep dive into lighting and CG cinematography, Chris Brejon has a great online resource:

https://chrisbrejon.com/cg-cinematography/

  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)

To be technically accurate, the other place you have to be careful is when you are rendering out to disk, especially if you are rendering to a file format with limited bit depth. If you are rendering to jpgs (for some reason), you only have 8-bits 0-255 per channel, so any value over 255 gets clipped. If you are rendering to something like png16, you have 16-bits, so 0-1023 per channel. Anything over that is clipped.

But that's why most of the time you will see people rendering to a 32-bit, floating point format, usually .exr files. Those files can store the over-bright information and make sure it gets carried down the pipeline. So in practice, you don't really have to worry about it until the end (again see Chris's site if you want to get the more complicated answer, but for most projects, you don't have to worry about it).

Edited by madebygeoff

Share this post


Link to post
Share on other sites

You certainly want to avoid going as high as 8. Values of about 2 are not too bad and help motion blurred highlights stay bright, but with more than that you can easily get visible aliasing and lots of noise from diffuse bounces and rough reflections. 

There's no real need to go that high to make a sunny image either, find some reference photos and sample the values, you'll see what I mean 

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

×