Ok, I’m really confused by the absorption color. I thought I understood it, but apparently I don’t.
I have a KCM that is taking the color vector, negating it, adding 1, then multiplying by .3 and sending that to absorption. This SHOULD give me a darkened version of the complement color, right? I have an orange and yellow object, so my complement should be a blue and cyan color, which should lead to an orange and yellow shadow. But instead, I get a blue shadow.
BUT… If I set the negate and add or passthough, and just multiply the color by .3, and output that to the absorption, I still get a blue shadow.
I can’t seem to get rid of the blue shadow. Turning off the KCM yields a VERY blue shadow, and setting the multiplier to passthrough yeilds a grey shadow, similar to not using absorption at all.
So why isn’t the scaled down complement yielding a shadow that is colored the same as the color channel? I thought this would be pretty easy…
The Volume Rendering Equation has an extinction term e^(-f(x0,x1)) where f(x0,x1) = integral of (ScatteringTerm + AbsorptionTerm) over [x0,x1]. What this means for your absorption values, is that if it is very small relative to the scattering term (ie. The Color channel) then you won’t see too much difference. Turning off absorption in the GUI will internally set it such that that sum is 1 in R, G, and B. This causes a grey shadow since each wavelength is extincted at the same rate.
I kind of get the feeling that you are expecting the Absorption term to be the only thing affecting the extinction in the volume, which is not the case. If you think that I am missing the point, please hook me up with a scene that shows exactly what you are seeing and a description of what you were expecting to see.
P.S. If you wanted to set the Absorption value explicitly, try subtracting the Color value from your computed absorption.
But if my color = 0, or 0.001, I still don’t see a lot of absorption. Shouldn’t a low scattering value result in a low extinction? Or am I still missing something?
Oh, and yeah, I should have figured out that (color * -1) + 1 = 1 - color. But you are saying it should be absorption = 1 - color - color?
If both are low, that means a larger percentage of light is being transmitted through the medium, instead of reflecting or absorbing. The original value for a in my example is whatever absorption value you intend to use. For example a = [0.75,0,0.75], c = [1,1,1] as original values would produce a very bright green volume and shadow if you set Absorption = a - c.
In your example, a - c = [-.25, -.25, -.25]. That’s not advised, though, right?
How does this take density into account? I guess I’m thinking that absorption + scattering should (currently) equal the density, no? Isn’t density just a way of expressing extinction? If so, shouldn’t we just be expressing 2 terms and deriving the third directly?
Technically a - c = [-0.25, -1,-0.25] which in general is weird, but it isn’t a problem in this case because the only way Absorption is actually used is to be added to the Scattering term to make Extinction. So [-0.25,-1,-0.25] + [1,1,1] = [0.75,0,0.75] as Extinction.
The density comes into play by acting as a scaling factor for both the Absorption and Scattering terms. So in actuality Extinction = Density * ( Color + Absorption ), which might confuse since that implies that the values don’t have to be in the [0,1] interval. All of these quantities represent a probability density, as opposed to a regular probability which must stay in the range [0,1]. A probability density can be any positive value since it represents the probability per unit density of extinction, not the probability of extinction at any given point.
Btw. There is no real reason for Absorption and Color to sum to [1,1,1] or less, it is just a convention that I intend to use when I start supporting these values out of a Standard Material. I plan on setting the Color value directly from the diffuse value, and the Absorption will be (1 - Color) * (1 - FilterColor). You can try using this calculation in your KCMs since I think it makes the most sense.
It’s not really the KCM that’s at issue. It’s pretty confusing even if you don’t have the channel. Bobo’s examples have a tiny bit of absorption and it’s mixing two unrelated solid color vectors. I’m trying to make a green chameleon with red muscle and yellow bones to cast a non-blue shadow.
I seem to be getting close though… The absorption is doing some really interesting things to the fleshy bits. Looks like fresh salmon.
EDIT: It didn’t help that some of my testing involved casting the shadow onto a GeoVolume, which itself doesn’t have an absorption channel.
Yeah, may not be directly related to KCM, but certainly helps me understand how it is functioning, or to help give a better understanding on how to manipulate it.
[code]Scattering = Color = c
Absorption = a - c
That way when extinction is calculated, you would get:
Extinction = Scattering + Absorption
Extinction = c + (a - c) = a[/code]
and this…
Extinction = Density * ( Color + Absorption )
Certainly help me understand better than just do this and that and get this result. That’s all I am saying. shrug I you look at the examples I posted it is obvious that I was just simply messing around without forethought to a desired result , I found the results interesting but I did not know what was actually happening.
Mmmmnn Chameleon Salmon… grilled or in a seaweed rice roll
They have added so many new features it is hard to keep up even when you have been keeping up!
Seaweed Rice Roll it is!
Looking sweet, that slice certainly resembles a nice quarter of salmon, yum
Are the overbright areas the regions you were having troubles with? (other than the blue shadows, which are not apparent to me in these images)
The top left most area on the main body of the slice (just behind the front of the fin) has nice light penetration that is illuminating the skin, which seems about right for the amount of light passing through
Yeah, it was just confusion over how an object that is yellow, green, and red should cast shadows. And how that relates to density. Bone is a pale yellow, but it’s also very dense. So how should I adjust the absorption so that it casts a proper shadow. The complement of that color would be really dark blue, but in absorption, dark means “don’t absorb much” which seems counterintuitive for something that is dense.
The nasty “wound” is from KCM, a blending the original density with Blur Electric in the density channel modulated by distance from a point. Works nicely when showing ~30k points.
It obviously isn’t “really” correct but the absorption shot has a more interesting look to it, for sure. It catches my eye more so than the non-absorption render (which is quite cool too)