Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] General Discussion => Topic started by: vicnaum on 2015-01-13, 14:14:31

Title: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-13, 14:14:31
Absorption has two parameters - color and thickness distance.

Physical absorption has a graph for all spectrum distance (usually displayed in cm^-1).
Example:
(http://www.exo.net/~pauld/colorofwater/absorptioncoefSpectrumofWater.gif)

So there are different wavelengths = different hues & maybe "saturation" (closer to white = all wavelengths).

But there is no value, lightness, brightness on these graphs!

Because we set the "value" by Distance.

So why do we need another value parameter in color?

So what I mean - absorption should react to Hue & Saturation, but should ignore the Lightness.

Because now I don't know what should I set the Lightness to - it reacts similar to saturation, but when it's dark - the material is getting black faster (which can be done by decreasing the distance).

Why should we have another meaningless parameter? Maybe we should simplify this?

I don't ask for a CoronaSpectral material (althought that would be very nice to have!) - but let's at least follow common logic.
Title: Re: What does Absorption color lightness mean?
Post by: maru on 2015-01-13, 14:34:12
I think it works the same as any other level and color parameter in Corona. It is level*color. For example setting diffuse level to 1.0 and color to 50% white is the same as setting level to 0.5 and color to 100% white. Same with absorption. Setting distance to 1cm and color with 50% lightness should be the same as setting distance to 0,5cm and color lightness to 100%.  You can just ignore color lightness and use distance only.

At least that's how I think it works. Correct me if I'm wrong!
Title: Re: What does Absorption color lightness mean?
Post by: borisquezadaa on 2015-01-13, 15:57:06
I think that is tottaly necesary because of the simplification made to the "ligth emitters" in Corona.
Otherwise there could be no way of cheating the absortion color.
By the way of that graph only the visible spectrum sector you can use in Corona. It brings to  me an interesting experiment.


Title: Re: What does Absorption color lightness mean?
Post by: Ondra on 2015-01-13, 16:26:46
Absorption has 2 parameters so it can be easier to set up - you set up COLOR that white ray will have after travelling specified DISTANCE in the medium. Otherwise you would have to deal with highly non-linear numbers - e.g. use something as 0.0000001 0.0000001 0.0000002 for air and 0.2 0.1 0.05 for glass.

value, lightness, brightness, etc. are just terms that make describing a color easier. Everything is transformed back to RGB first. You dont need to use these terms, and use R G B directly instead.
Title: Re: What does Absorption color lightness mean?
Post by: borisquezadaa on 2015-01-13, 16:42:08
BEHOLD!!!---- AND BE AMAZED!!!---

The whole new Spectral absortion Corona Material on its "unoptimized" glory!!!!... from the same creators of "Corona can render Dispersion".

Thank you.... thank you very much...
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-13, 18:35:39
Absorption has 2 parameters so it can be easier to set up - you set up COLOR that white ray will have after travelling specified DISTANCE in the medium. Otherwise you would have to deal with highly non-linear numbers - e.g. use something as 0.0000001 0.0000001 0.0000002 for air and 0.2 0.1 0.05 for glass.

value, lightness, brightness, etc. are just terms that make describing a color easier. Everything is transformed back to RGB first. You dont need to use these terms, and use R G B directly instead.

Distance is not ^-1 in Corona, so that's not a problem to input a 50000m for air, or 1mm for very toned glass.

I still see no meaning in value. It resembles something more like "saturation" to me, and doesn't have nothing similar with distance:
(http://www.naumik.com/temp/scr5/20150113-265-152kb.jpg)

So that's like another "tricky" parameter, which no one knows what it does.

And RGB/HSV/LAB/whatever doesn't matter - in any system we are free to control the color's hue, it's saturation, and brightness -> but the brightness doesn't make sense to me in terms of absorption.
Title: Re: What does Absorption color lightness mean?
Post by: juang3d on 2015-01-13, 18:43:52
I don't understand what you say, what is the parameter you don't understand?

I mean, both are pretty clear IMO, the color is the color you want at the end of the distance, wich you set with distance.

Obviously if you have a 3cm diameter sphere and you set a 2cm value the sphere will be pretty transparent, while if you set 0.1cm you will get a pretty obscure sphere, I'll try to illustrate this, but I think your picture illustrate it pretty well.

What is the parameter you don't understand?

Cheers.
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-13, 18:52:18
Color is:
1) HUE - which is the tone of the color
2) SATURATION - which is the closer to gray, or closer to full hue saturation
3) VALUE - which is how dark is the color

Absorption doesn't need the VALUE parameter, because DISTANCE already controls the darkness.

You can see from my screenshot - there are 6 different VALUES, with 5 different DISTANCES. There are TONS of variations, and without even touching the hue & saturation yet... The HUE and SATURATION are the same everywhere, but if you look at different VALUES vs DISTANCES you'll see that the amount of "dullness" vs "redness" is changing when the VALUE is changed, or something like that...
Title: Re: What does Absorption color lightness mean?
Post by: Ondra on 2015-01-13, 19:08:21
I already explained why the controls are redundant - but you are free to use only a subset if you think it will help you ;)
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-13, 19:12:18
Yeah, but what VALUE is the correct one?
Title: Re: What does Absorption color lightness mean?
Post by: Ondra on 2015-01-13, 19:37:39
Just use this:
Absorption has 2 parameters so it can be easier to set up - you set up COLOR that white ray will have after travelling specified DISTANCE in the medium.
Title: Re: What does Absorption color lightness mean?
Post by: juang3d on 2015-01-13, 23:41:16
So here is my study about absorption.

That is how I understand how absorption works in Corona, if something is wrong, please correct me.

The curious thing is the loss of transparency, but I bet this is due to the loss of energy that the light ray suffer while traveling inside the volume, so if you change the color from red to white you will get a perfectly transparent object because the white light ray does not change.
Now the different in saturation is due to the same fact, the different energy of the ray while traveling inside the volume.

I hope this helps a bit :)

Cheers!
Title: Re: What does Absorption color lightness mean?
Post by: Ondra on 2015-01-13, 23:46:26
So here is my study about absorption.

That is how I understand how absorption works in Corona, if something is wrong, please correct me.

The curious thing is the loss of transparency, but I bet this is due to the loss of energy that the light ray suffer while traveling inside the volume, so if you change the color from red to white you will get a perfectly transparent object because the white light ray does not change.
Now the different in saturation is due to the same fact, the different energy of the ray while traveling inside the volume.

I hope this helps a bit :)

Cheers!

yes, that is correct
Title: Re: What does Absorption color lightness mean?
Post by: borisquezadaa on 2015-01-14, 00:32:51
Excelent explanation. That image should go to a material Wiki of some sort.
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-14, 07:38:26
Ah, that's a surprise!

Hm... It looks that we can't get a white fog then?
(http://www.naumik.com/temp/scr5/20150114-y99-288kb.jpg)

Because white absorption is completely transparent, and a bit grayer is just getting black.

UPD: Ah, sorry. Forgot about Scattering. Well, yes, if you set it to WHITE, then you can get a white fog:
(http://www.naumik.com/temp/scr5/20150114-49c-82kb.jpg)

That adds a fifth unknown to the equation.

I assume the correct whiteness is the default 128, cause there's absolutely no point in setting it to 255 (lack of absorption).
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-14, 10:28:12
Did another test. Now I fixed the Distance to 5mm, and changed the VALUE on different models with different wall thickness:
(http://www.naumik.com/temp/scr5/20150114-it9-157kb.jpg)

As you can see, values like 255 or 10 give very strange results. So you should keep somewhere in-between...
Title: Re: What does Absorption color lightness mean?
Post by: juang3d on 2015-01-14, 10:47:05
Hi there.

The results are not strange, first of all you should not divide your thought into the three color values, you just have to decide "artistically" what color do you want to use for absorption.

Now answering your question, the results are not strange, since you use a bright color (in the 255 value) the light ray has more energy so it takes longer to dissipate, since I don't know the measures of your object I cannot say why the distance is behaving that way, but probably this is because the color is not reached within the distance you set, on the other hand, you should not be using sun and sky for those tests, you should test this in a clean environemtn with just one white light so you can observe the effects of absorption over white light, in your scene there is no white light if I'm right, there is a sun (wich is not white) and a mixtures blue from the sky, so this will affect your results also.

Now int he value of 10 the results are also predictible and this is because you are using a very dark color, wich means with low energy, in fact you can see alue as energy I think if you want to separate the three components (you should not do that IMHO, as I said you should pick the color artistically and use distance) but anyways, since the color is so dark the light rays loose it's energy a lot faster so it will give you a dark volume inside the object because you are "killing" light inside the volume(as a manner of speaking)

Anyway, you have to take into account how much does your model measures, because without that info the distance value is useless :)

Cheers!

EDIT: you can see, in your 3mm test and the 255 value that you reach that color and it stays, this is because it has enough energy when it has mutated so it keeps going with that color until it reaches the exit of the object, it all depends on the measures of your object.
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-14, 12:03:55
The measurements of the model wall thickness are written above it, please check. The distance is 5mm.

The sun&sky affection isn't so strong, but giving more natural looking results - on sterile tests you can be fooled more easily.

I completely understand how absorption distance falloff works, and that thicker walls should be darker, etc etc.

What I want to emphasize is that I can't get _predictable_ results - on 255 values I get a strong blue tint without going into the black even if the wall thickness is 15mm, and we have two walls there on that cylinder = 30mm - but we still get deep blue instead of black.

Values of 192 or 128 are more predictable - because now we get black on very thick objects, while still retaining the COLOR on 1mm thickness (although it's more desaturated).

And on very dark values, like 10 - we get black everywhere, with a slight tint of color on thin walls - if I make it even more thin (0.1mm) - then I'll get a very faded and desaturated color.

If you look at my table from top to bottom, how different VALUES affect the absorption - for example, on 1mm thickness - you'll see that the transparency isn't much changing, but just the color becomes more faded/desaturated, dirty, and dark.
Or on 5mm thickness (which is equal to 5mm distance in material) - you can see a blue "halo" around on 255 value, which becomes a strong dark substance on lower values.
Or on 15mm - 255 value has very saturated blues.

But most of all - please compare value 255 on 15mm, and value 10 on 1mm - they're very different.

So the VALUE != doesn't equal DISTANCE. It's another control, which lives on it's own, and does the similar, but completely different thing.




It's like the CoronaLights - you can set a color there, and there is value also - you can set a light to 10,2,8 RGB - muddy pink. But why? You have the intensity to control the brightness of the light. But what's most important - wise people added the Temperature to Lights - when you can control just the HUE, because you already have the Intensity control.

Imagine that you should set the Light color, light color brightness (which works completely different than Intensity), and light Intensity again - isn't this "artistic hell"?

But in material absorption - there is no Temperature, HUE, or whatever. There is just color. And you should pick this color brightness by eye, and pick the distance by eye again (which should control a similar thing, but a bit different). And that drives my mind crazy.
Title: Re: What does Absorption color lightness mean?
Post by: romullus on 2015-01-14, 15:31:31
Maybe it helps if you look at this graph this way? To me it seems perfectly normal.
Title: Re: What does Absorption color lightness mean?
Post by: juang3d on 2015-01-14, 17:55:49
@vicnaum

What is your usual render engine?

How does this works with that engine?
Can you post the same test?

I say that because I don't understand your way of thinking about colors as three separated values, I think this is an overcomplicated way of thinking but maybe is useful in some scenarios, so I would like to see what are you used to see in your other render engine :)

Cheers!
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-14, 17:57:34
Okay, let me give a more picturesque example:
(http://www.naumik.com/temp/scr5/20150114-34d-319kb.jpg)

You see, how VALUE works as saturation?
(and also reminding vray Bias control)
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-14, 18:05:19
@vicnaum
What is your usual render engine?

How does this works with that engine?
Can you post the same test?

I say that because I don't understand your way of thinking about colors as three separated values, I think this is an overcomplicated way of thinking but maybe is useful in some scenarios, so I would like to see what are you used to see in your other render engine :)

My usual render is Corona. Before I used vray (a couple of years ago).

Let me explain that way of thinking. Just answer this question:
When you set up the CoronaLights colors, do you always use BRIGHT COLORS, or maybe sometimes you use DARK COLORS too?
In the CoronaLight color picker.
Title: Re: What does Absorption color lightness mean?
Post by: juang3d on 2015-01-14, 18:13:49
I use little variations of white for light, unless I want a color saturated effect, and I tend to reach a level between color and multiplier.

I think I see what you say in your last example, the ineer of the object tends to be red in that case, or an over saturated color, but I think this is due to the energy loss of the light rays and a concentration of them on the inside of the object, but what I just said may be a complete stupidity, I think Keymaster should chime in here, this is over my knowledge of light physics hehe

Cheers!
Title: Re: What does Absorption color lightness mean?
Post by: vicnaum on 2015-01-14, 18:18:58
Yeah, I'm trying to say exactly that. We now have a parameter called VALUE which acts as a saturation, and gives dull saturation on low values, and oversaturated colors on high values.

Btw, SATURATION effect is even funnier:
(http://www.naumik.com/temp/scr5/20150114-6d0-360kb.jpg)

It does a HUE shift! Lowering the SATURATION does a hue shift towards base color (in this case - red), removing the yellow parts.

Will be funny, if the HUE control will animate the launch of statue to the moon :)

P.S. Vray isn't better - it's even worse. If a color is having 255 VALUE in Vray - it will NEVER turn into black, no matter how thick is the object, or how much the fog multiplier is - it's just becomes pure solid red (e.g. in this example). And also vray has this "magic number" fog multiplier. I really like corona having a distance. But I'd like it to have more physically correct and intuitive absorption system of controls.
Title: Re: What does Absorption color lightness mean?
Post by: Ondra on 2015-01-14, 19:35:48
well now we are getting to the base of the problem - volumetrics just work differently than surfaces, and as a consequence, are harder to figure out. Because the light is not multiplied by your color, it is exponentiated by it. Which gets weird fast.