PDA

View Full Version : weird surface layer bahaviour



toonafish
05-05-2005, 11:26 AM
What's the idea behind the multiply setting in LW's surface panel ? When I add a multiply layer in Photoshop it works as expected, the black value multiplies the color with a value of 0, and the white value multiplies it with 1 so the color doesn't change.

In Lightwave setting a surface layer to multiply makes the color where the multiply layer is black also black, but greys out everything under the white value too which is not someting one would expect if the layer actualy multiplies.

An example:
I have red a surface that has a value of 255,0,0, I add a completely white gradient ( 255,255,255 ). The outcome should be a surface color that has not changed because 255 x 1 = 255, but what I get is a surface with a color value of 226,0,0.

It looks as if it does something completely different, but I donno what.

Same weird behaviour with subtractive too. Subtractive gradients and image maps don't even work, and when I use a procedural I get the same results no matter what value I put in the Texture Color field.

gonna look into this some more. If anyone has a clue, please let me know.

toby
05-05-2005, 12:10 PM
You are correct sir. The multiply does not work as expected, and some other blend modes too as you mentioned. Try using a layer set to alpha for areas that you don't want affected by your multiply layer.

toonafish
05-05-2005, 12:27 PM
huh, how does and alpha give me the same result as multiply in my color channel?? Unless I want to do with multiply what alpha does, which is not the case.

please don't call me sir, it makes me feel very old ;-)

toby
05-05-2005, 01:40 PM
What I mean is that if you have a b&w image that you want to multiply so the white has no effect, put an alpha layer on top of it ( or use an alpha in the image ) to alpha out the white parts of the multiply layer, since they affect the surface, when they shouldn't.

toonafish
05-05-2005, 01:50 PM
ah, I understand. That could help in some cases, thanks.

Just ran some more tests and it seems there is no logic behind what multiply does. It works different in the luminosity, diffuse, color and specular slots.

nemac4
05-05-2005, 02:48 PM
ok,.. I've done a bit if fiddling and found that if I use procedurals,.. the multiply mode works as expected however when I use images LW converts the image to an equivalent grayscale value for the color. For example 255,0,0 red becomes ~ 123,0,0 so,.. the best match I found was to set the color layer to 150% for it's opacity value. It gets pretty close but for some reason there is a 12-15 point shift from red to blue so the result is ~ 242,0,16

toonafish
05-05-2005, 03:27 PM
hmm, that's weird. With procedurals I don't get an expected result.
layer order:

Procedural Value: 255.255.255
Color gradient : 200.0.0
------------------------------
result: 226.0.0

next test:

Procedural Crust (coverage 10): 255.255.255
Color gradient : 200.0.0
------------------------------
result: 226.0.0

next test:

Procedural Marble (vein spacing 0): 255.255.255
Color gradient : 200.0.0
------------------------------
result: 224.0.0

the result should be 200.0.0

nemac4
05-05-2005, 03:43 PM
hmm, that's weird. With procedurals I don't get an expected result.
layer order:

Procedural Value: 255.255.255
Color gradient : 200.0.0
------------------------------
result: 226.0.0

next test:

Procedural Crust (coverage 10): 255.255.255
Color gradient : 200.0.0
------------------------------
result: 226.0.0

next test:

Procedural Marble (vein spacing 0): 255.255.255
Color gradient : 200.0.0
------------------------------
result: 224.0.0

the result should be 200.0.0


I was using "value" for the procedural rather than a gradient,.. just because gradients rely on other layers for the effect.

nemac4
05-05-2005, 04:32 PM
it is odd,.. I'm not sure what is going on.

toonafish
05-05-2005, 06:07 PM
Good test, but I think you'll get more reliable results when you set the luminosity to 100%, the diffuse to 0% and ambient to 0%.

The ambient light will change the surface color anyhow. Try a simple surface color of 200.0.0 and render with 100% ambient and 100% diffuse. You'll get a surface color of 255.0.0.

But it's not behaving as one would expect, that's for sure. I emailed newtek about this, maybe it's a known bug. Let's hope this one will get sqashed soon, just as the other input parameter settings that don't work. I stumbled upon a leaked list on cgtalk of things that will be fixed in the coming 8.3 update. But nothing about this bug on it :-(

nemac4
05-05-2005, 11:02 PM
I tried both methods for surface coloring and got the same results.

Here is a graph of the differences with LW and PS Multiply interpolation. It seems to help to look at it this way.

I played around with using various settings to try to match the interpolation but the best I came up with was boosting the opacity to 114% which brings the curve down a bit. Any higher settings began to push the curve away again.
So at 25,0,0 ,.. lightwave results in a color of 80,0,0. When the opacity is boosted to 114% it drops to 57,0,0. Better but still not quite there. I tried subtracting with another layer but it would introduce green and blue shifts as well.

Edit: after some more thought, I'm wondering if LW uses a form of LAB color for the blending modes, rather than RGB.