PDA

View Full Version : How to reduce object's saturation where light hits?


Panupat
02-24-2012, 05:41 PM
I've heard and seen in a lot of tutorial about how real objects loses saturation in their brighter area. The brighter, the less saturated.

So far I've only been able to do this in post using lighting pass as mask to pull saturation down. But is there a way to get that effect right when I'm rendering? I'm using Maya and tried with both mentalray and vray to no avail.

I always thought that plugging the opposite color as the object's into specular would do the trick but obviously I was wrong.

Any tip appreciated :)

Seraph135
02-24-2012, 10:47 PM
I've heard and seen in a lot of tutorial about how real objects loses saturation in their brighter area. The brighter, the less saturated.

In my opinion this is incorrect. An objects color is an objects color regardless of the scene lighting. So really when you look at an image/photograph an objects color is very much influenced by exposure. As something becomes over exposed it comes closer and closer to white (in a clamped photograph where white is 255, 255, 255) which has no saturation. So in other words if you over light your scene and blow it out then most everything becomes less saturated and goes white. In reality the objects in your scene are exactly the same as ever. Its just the lighting exposure (and light color) that can change.

I always thought that plugging the opposite color as the object's into specular would do the trick but obviously I was wrong.

In most cases specular color should be white. Only in the case of certain metals do specular highlight colors get tinted. Look up "dielectric materials."

Tim J

ndeboar
02-25-2012, 05:42 AM
checkout color mapping in vray, exponential color mapping will desaturate bright values.

Panupat
02-25-2012, 07:08 AM
In my opinion this is incorrect. An objects color is an objects color regardless of the scene lighting. So really when you look at an image/photograph an objects color is very much influenced by exposure. As something becomes over exposed it comes closer and closer to white (in a clamped photograph where white is 255, 255, 255) which has no saturation. So in other words if you over light your scene and blow it out then most everything becomes less saturated and goes white. In reality the objects in your scene are exactly the same as ever. Its just the lighting exposure (and light color) that can change.
Tim J

Thanks for your input Tim. From my experiance, I found reducing saturation in brighter area (and sometimes shifting the Hue a bit) does really make the image feels more real. I was first made aware of this idea by Jeremy Vickery in his practical color DVD http://www.thegnomonworkshop.com/store/product/185/Practical-Light-and-Color

It's also mentioned in this thread
http://forums.cgsociety.org/showthread.php?f=21&t=650761&page=1

And yet quite an advanced topic, but still importand about realistic lighting. In very bright areas a rendered image might look too saturated, which is not correct and should be corrected in postwork, either in photoshop or in a compositing program. In photographs shadows are saturated but the more bright the luminance the less saturated the colors are.

http://img337.imageshack.us/img337/2106/overexposurekm3.jpg


ndeboar - exponential seems to only reduce the exposure for me a bit without change in saturation.

MinaRagaie
02-25-2012, 08:09 AM
It's funny how I've been off CGtalk for a while to come back to find this.

I think the saturation issue is actually on of the most important in making an image look good (realistic or not). Personally I think the artistic controls for that are rather lacking in most software.

A good way to get that effect is actually from the light shader not the surface shader. I've written a couple of light shaders for renderman specifically for that reason. I'd love to see the functionality come across to other renderers as well.

Here's an example:
http://getfile2.posterous.com/getfile/files.posterous.com/temp-2012-02-16/eHtoiodhkybiyDxrnruCHCHzwwspqHivenrbEDAgAAmddEpeFGrsHdwcxbul/minaragaie_mr_light_PRman_7.jpg.scaled1000.jpg
Surface shader color: 0.5 Grey
Light color: Very desaturated yellow.
Fade color (color as zero energy): Highly Saturated Red.

The last color is the one that does the trick. The final light color us see in the image is a gradient between both colors in HSV color space. the hue is shifted gradually over the spectrum which is why you see orange hues in the mid-tones and Redish shades in the dark tones. It's my artistic interpretation of what Jeremy Vickery explained in his DVD.

A more elaborate Hue shift can explain the concept better. Although not something you'd normally want to do.
http://getfile3.posterous.com/getfile/files.posterous.com/temp-2012-02-16/mtkwJxkInspHcdagqDGpHDpiHnEyABEzljkHqnyehmctdpusvoxwcluuoIEE/minaragaie_mr_light_PRman_5.jpg.scaled1000.jpg

More about my shaders in this thread (http://forums.cgsociety.org/showthread.php?p=7253899#post7253899).

Cheers,
Mina

kanooshka
02-25-2012, 03:00 PM
There are a lot of factors involved in make objects appear more or less saturated. One reason an object appears less saturated in the brighter areas is because with bright lighting the specular reflection in a material becomes more apparent. This won't necessarily make the object appear less saturated if you have colored lights.

As for the more saturated shadows/midtones. If you think about how much light bounces around to illuminate a shadow area and each bounce grabs more and more saturation from the surface it is bouncing off of. It only makes sense that after so many bounces there would be more saturation. There's also the factor of diffuse transmission (Sub Surface Scattering). As light scatters through a surface it takes more and more color from the medium it's passing through and therefore not only becomes more saturated but also loses intensity.

If you're not using renderman, One way you can do this in Maya is connecting your diffuse texture on each material to a remap HSV node. And then driving the saturation of thhe remap HSV node by a surface luminance node. Or you could also just do the color correction in post processing.

In the end, desaturating highlights and increasing saturation in the shadow areas in these ways are a "cheat" but if it looks right, that's all that matters.

mister3d
02-25-2012, 06:24 PM
Yep, Tim is absolutely right, it has no scientific basis. In reality color value, be it diffuse, is just multiplied. So, it looks like this
http://i43.tinypic.com/103enaw.jpg
So it looks just the opposite of what I stated. I was wrong, thinking it has a scientific explanation. I also, Panupat, found it in that DVD, and I found it to look good. I also see it applied in some games, and it looks great. I think it's a matter of style, but has nothing to do with science. Some renders I see just need those highlights corrected, they just look too saturated, though, it's correct from maths point of view. Because if you have an overexposed (even slightly) area, the color pops out and may ruin the picture.

MinaRagaie
02-25-2012, 09:40 PM
I think there *is* scientific logic behind it (I haven't researched it myself though so I might be wrong)

The idea is simple really, light is energy and it's color is measured in kelvin color temperature. As it cools down (looses energy) it shifts to a color temperature. This is not just a shift in saturation it's also a shift in hue. In CG it's simply the same color getting darker.

What Dan mentioned can help your images look better for sure but I think in a pitch black room a single light source would still get more saturated colors as it looses energy.

Cheers,
Mina

Seraph135
02-26-2012, 04:00 PM
http://www.conceptart.org/forums/showthread.php?t=132119 (http://www.conceptart.org/forums/showthread.php?t=132119)

It's amazing how this subject really got to me and I had to go hunting for more info. I searched the web high and low and found no technical information about it, only links like the one above. It seems the argument is pretty evenly matched for it being true and also being false. I even set up some tests at home to try it for myself. In a nut shell the answer is still "no highlights do not get less saturated" however, there is a tiny amount of plausibility for the shadows. Kanooshka nailed it with his explanation. I went around taking photos of my condo and also set up as controlled of an experiment as it could. What I found was that areas that go into shadow do become ever so slightly more saturated. We aren't talking about much here. So I replicated my real life test scene in cg and rendered with GI in vray. I got the exact same results. The shadows were ever so slightly more saturated. The reason is because of bounced light. Some color is taken from each surface as the light bounces around and eventually hits the shadow areas with what equates to another light source with a tint of color. If your main subject was blue and some blue bounce light made it around the scene back to the shadow area then the bluish bounce light adds some saturation to the shadows.


I think the main things to keep in mind when trying to replicate this in your cg scenes is that you actually DONT NEED TO. If you turn on GI then you get these results for free. No extra manipulation is needed. There are a LOT of factors in the real world that would give you the exact opposite results too though. So you cant just make a blanket statement that shadows are more saturated. Shadow areas on distant mountains will sometimes appear less saturated and have less contrast because of aerial perspective which tints them.


If you are finding that your highlights look better when desaturated then by all means make the adjustment in your comp. it's subjective and if it looks right then it is right. However, it doesn't actually do that in real life. My real world tests as well as my cg test also confirmed this.


I would highly recommend that no one makes actual changes to their cg objects diffuse color based on how much light is hitting them. This is impossible in nature and will cause unrealistic results in your render. It also will limit your control in the comp.


There seems to be some debate about wave lengths of light slowing down and changing shadow color. I do vaguely recall hearing something similar to this a long while ago on the discovery channel i think. As a ray of light passes very closely to and object some rays slow down and even bend slightly around the edges of the object. Like waves in the ocean bending as they pass by a harbor breakwall or slowing down when they reach shallower water. I also seem to recall that these changes in color were so small that you really couldn't see them with the naked eye. The bending was so slight It was only visible using scientific equipment. So while I kind do remember and think there may be a little bit of truth to it I also think it was in such small amounts you really won't ever see it. I do think that if you want to have your shadow edges change color in your renders then go for it. It may look good in some cases. However, I still don't think I'd recommend it for photo realistic scenes.


Tim J

Dirtvic
02-27-2012, 08:29 AM
I am really enjoyin reading this thread...:):lightbulb

InfernalDarkness
03-02-2012, 11:41 PM
The idea is simple really, light is energy and it's color is measured in kelvin color temperature. As it cools down (looses energy) it shifts to a color temperature. This is not just a shift in saturation it's also a shift in hue. In CG it's simply the same color getting darker.

Well to be scientific about it, light is NOT energy. Consider the theory of relativity itself: e=mc². "Energy = Mass * the Speed of Energy²"? Wrong. Light isn't energy, but can be measured and quantified by various scales.

It can be measured in any observational scale you want (Kelvins, lumens, etc.), but this is not how light appears to behave in reality at all. Light does not "cool down", as infrared radiation itself is a form of light already. It does not "loose (lose) energy), nor does it shift to different color temperatures. These are perceptual shifts only - the light itself may change wavelength or frequency via a medium, but light has no heat temperature - that's merely a description of the color we perceive with our eyes, not a temperature in the sense that 0°C = the freezing point of water.

Granted, all of your observations are perceived deductions - I'm not calling you out or attempting to mock you in any way. But to be scientific is to dismiss deductive reasoning in favor of the Scientific Method, or Empirical Method if you prefer.

Put simply, light is a result of an electrical process at the subatomic level. It is not easily defined nor understood in terms of quanta - there has never been a "photon" actually detected, for example. We have seen electrons, protons, neutrons, even smaller particles. But all evidence of a "photon" is merely deductive. No scientific evidence exists.

Does light exist between events? (http://nobeliefs.com/light.htm)

But of course all that theory doesn't help one shred in our 3D rendering. Often it comes down to our age-old quandary: is an image realistic or photorealistic?

For example, we've all seen the arch/viz renderings where the window pane is almost purely white. This is not an effect one sees very often with your eyes - but rather due to a camera's exposure. Our eyes adjust almost instantly, cameras never do unless we tell them to. Is it "wrong"? Nope, just a recording method. It's up to the artist to decide what's right or wrong, what looks best, and what will convey their (or their clients') intent.

So when it comes to this comparison:
http://img337.imageshack.us/img337/2106/overexposurekm3.jpg

It's not "too saturated" on the left. And the right one is not "correct". It's merely what the artist/presenter decides, and to a greater extent what the client decides they like. Your eyes don't desaturate things. Cameras and our rendering devices can, but your eyes don't unless you're going color-blind.

mister3d
03-09-2012, 05:13 PM
I would highly recommend that no one makes actual changes to their cg objects diffuse color based on how much light is hitting them. This is impossible in nature and will cause unrealistic results in your render. It also will limit your control in the comp.

I think it's a very very important note. I used to do so a lot. That's a bad trick and messes up everything. Right now I check it with default lighting to see if the diffuse color is correctly exposed. If the diffuse is not well-exposed, and it's hard to adjust it simultaneously with 1 light, I prefer lighting it with 2 different lights: one for reflections, and one for diffuse for separate control, and separation is done by the angle (not exclusion), as diffuse is more forgiving for the light angle which hits it. So it can be anywhere and even beyond direct reflection angle, which is a nice control. The same for reflection light, which can be turned not to hit diffuse values. This way it's possible to control reflection and diffuse value separately, if it creates some problems.

Also the problem is when the result needed requires diffuse color stylization, which also may require color, saturation shifts, which is also would be better done in post. I used to adjust it directly into diffuse texture, which is mistake and should be done in post. I don't know how common this mistake is, I think it's a beginner's mistake.
But the thing is, diffuse color is pretty defined for many things, and it is what looks natural in photoshop and it's just in 5-80 brightness range, as well as saturation. So it's pretty obvious.

Panupat
03-12-2012, 08:39 AM
Tim - very interesting link and insights. Thanks.

Very interesting how opinions of comceptart community differs so much than the DVD. I found the link about color dimention very interesting also so I'm re-posting it here

http://www.huevaluechroma.com/

artquest
06-17-2012, 03:29 AM
Well to be scientific about it, light is NOT energy. Consider the theory of relativity itself: e=mc². "Energy = Mass * the Speed of Energy²"? Wrong. Light isn't energy, but can be measured and quantified by various scales.

It can be measured in any observational scale you want (Kelvins, lumens, etc.), but this is not how light appears to behave in reality at all. Light does not "cool down", as infrared radiation itself is a form of light already. It does not "loose (lose) energy), nor does it shift to different color temperatures. These are perceptual shifts only - the light itself may change wavelength or frequency via a medium, but light has no heat temperature - that's merely a description of the color we perceive with our eyes, not a temperature in the sense that 0°C = the freezing point of water.

Granted, all of your observations are perceived deductions - I'm not calling you out or attempting to mock you in any way. But to be scientific is to dismiss deductive reasoning in favor of the Scientific Method, or Empirical Method if you prefer.

Put simply, light is a result of an electrical process at the subatomic level. It is not easily defined nor understood in terms of quanta - there has never been a "photon" actually detected, for example. We have seen electrons, protons, neutrons, even smaller particles. But all evidence of a "photon" is merely deductive. No scientific evidence exists.

Does light exist between events? (http://nobeliefs.com/light.htm)

But of course all that theory doesn't help one shred in our 3D rendering. Often it comes down to our age-old quandary: is an image realistic or photorealistic?

For example, we've all seen the arch/viz renderings where the window pane is almost purely white. This is not an effect one sees very often with your eyes - but rather due to a camera's exposure. Our eyes adjust almost instantly, cameras never do unless we tell them to. Is it "wrong"? Nope, just a recording method. It's up to the artist to decide what's right or wrong, what looks best, and what will convey their (or their clients') intent.

So when it comes to this comparison:
http://img337.imageshack.us/img337/2106/overexposurekm3.jpg

It's not "too saturated" on the left. And the right one is not "correct". It's merely what the artist/presenter decides, and to a greater extent what the client decides they like. Your eyes don't desaturate things. Cameras and our rendering devices can, but your eyes don't unless you're going color-blind.


I'm still a bit confused. You say that light doesn't shift in hue or lose energy, however we do know that light has a decay rate and that when rendering (with maya lights) setting the decay to quadratic gives us the most realistic looking falloff of light. So while energy may be the wrong word... light seems to "lose" something indeed.

Also, if I have a light bulb in my house with a dimmer switch on it and I start at it's lowest and raise it up it does indeed shift in hue. Starting with a somewhat saturated reddish tint and going to a more yellowish/white the higher I turn it up.

Are you saying that as the whitish/yellow light decays it will retain it's original hue and not shift into the reddish color as it fades into the shadows?

As for the comparison picture posted, I've seen situations in real life that mimic both of those results. So I guess it just depends on what kind of feeling you're going for.

Seraph135
06-17-2012, 06:48 PM
I'm still a bit confused. You say that light doesn't shift in hue or lose energy, however we do know that light has a decay rate and that when rendering (with maya lights) setting the decay to quadratic gives us the most realistic looking falloff of light. So while energy may be the wrong word... light seems to "lose" something indeed.

Light loses intensity only according to the rule of inverse square decay.

Also, if I have a light bulb in my house with a dimmer switch on it and I start at it's lowest and raise it up it does indeed shift in hue. Starting with a somewhat saturated reddish tint and going to a more yellowish/white the higher I turn it up.

Are you saying that as the whitish/yellow light decays it will retain it's original hue and not shift into the reddish color as it fades into the shadows?

As you turn the dimmer up and down your changing the intensity and the wavelength (color) of the light at its source. So the answer is "yes.". I am saying that as light intensity decays the wavelength (color) does not. Nothing perceptable is happening to the particles of light between your light source and the other side of the room that would affect their color. At least until they hit and bounced off of another surface.

Tim J

InfernalDarkness
06-17-2012, 06:59 PM
Are you saying that as the whitish/yellow light decays it will retain it's original hue and not shift into the reddish color as it fades into the shadows?

@Artquest: this is a function of the medium itself, and not the light involved. The bulb's filament and contained gas is affected by the electric current, but visible light is just energy with varying wavelengths and intensities.

Nothing perceptable is happening to the particles of light between your light source and the other side of the room that would affect their color. At least until they hit and bounced off of another surface.

While mostly true, there are no "particles of light". Photons are a theoretical construct and are not known to actually exist except by inference, much like "gravitons" which also do not exist.

playmesumch00ns
06-18-2012, 04:26 PM
While mostly true, there are no "particles of light". Photons are a theoretical construct and are not known to actually exist except by inference, much like "gravitons" which also do not exist.

Nope, photons definitely exist. You can even detect them. For instance, http://en.wikipedia.org/wiki/Single-photon_avalanche_diode

Gravitons certainly are theoretical particles. They are predicted by the standard model but are impossible to detect, although their presence may one day be inferred by the detection of gravitational waves .

InfernalDarkness
06-18-2012, 05:11 PM
I was speaking scientifically, not theologically, I guess. While we're certainly aware of the effects of energy and the photon appears to be the carrying force-particle event for energy transfer, it's still an inferred measurement to detect them in this manner.

The intensity of the signal is obtained by counting (photon counting) the number of output pulses within a measurement time slot, while the time-dependent waveform (http://en.wikipedia.org/wiki/Waveform) of the signal is obtained by measuring the time distribution of the output pulses (photon timing). The latter is obtained by means of operating the Single Photon Avalanche Diode (SPAD) detector in Time Correlated Single Photon Counting (TCSPC (http://en.wikipedia.org/wiki/TCSPC)) mode.

An excellent essay on the topic, Does light exist between events (http://nobeliefs.com/light.htm), is a good reminder to remain skeptical until enough evidence emerges. There's really no reason to insert belief into the Scientific Method.

Current hypotheses about gravity are suggesting, contrary to the defunct standard model which has failed countless tests including data supplied from our own sun, that gravity is an inferred effect of electrostatic forces, and not an actual force. With so many successful predictions with electrical theory (http://forums.cgsociety.org/electric-cosmos.org/introduction.htm) and so many falsified "theories" (http://www.thunderbolts.info/wp/daily-tpod/) using the standard model, Occam's Razor can easily be applied and cut out the dogmatic belief involved.

For the sake of the photon though, and how it relates to CG, one cannot equate (for example) a mental ray photon with an actual one. But it's as close and approximation as we've got to work with, just the same!

CGTalk Moderation
06-18-2012, 05:11 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.