PDA

View Full Version : Texture Blending Modes... demystified?

roberthurt
12-08-2004, 11:23 PM
OK, though I've been using LW since 5.6, I've never fully understood what was happening with blending modes for textures. Photoshop blending modes have always made sense (well, if you don't count the oddball modes like "color burn", etc.) and simply do what they say.

Now it helped when NT renamed the old "Additive" to "Normal" and gave us a new "Additive" that actually ADDED the color/value to the layers below. However they also gave us several other modes that have confounded me as they by and large did not seem to do what they said. I've read every meager scrap of info I could find on these and they never made sense, at least to the point that I could predict a result.

"Multiply" has especially confounded me as it would be a handy function to have, but all I was sure of is that whatever it was doing, it was NOT multiplying, as in v1 * v2 (and no, changing the opacity doesn't make it work right either).

So I finally hunkered down this week to figure this undocumented feature out and finally deduced what it IS doing... I made two grey ramp gradients in the texture editor, running at right angles to one another, then overlaid them with the various modes.

In the attached image I've shown the two layers on the left, and the multiply results on the right, with Photoshop on top, and Lightwave on the bottom. Taking black = 0 and white = 1.0, Photoshop does exactly what it claims, but the LW result is a lot brighter than it should be. In fact, with color pickers I found that in LW, while 1*1=1 and 1*0=0, as expected, 0.5 * 0.5 = 0.5, which isn't what I remember from elementary school!

A quick check of other values confirmed that what LW calls "multiply" is actually the GEOMETRIC MEAN! The formula is

geometric mean(x,y) = sqrt(x*y)

I thought I'd share, since I've been pulling my hair out trying to make sense of this blending mode for years. If they'd just called it what it was...

For the record, changing the opacity when using this acts a lot like Photoshop opacities on layers: it first computes the full geometric mean of the two layers, and fades the result out as appropriate to the result.

roberthurt
12-09-2004, 12:21 AM
Following up on my last post I hammered a bit more at the other modes I didn't understand and think I've cracked them all. So I thought I'd share my booty.

v1 = value of top layer [black = 0.0, white = 1.0]
v2 = value of underlying layers

Normal - just what it says...
Subtractive - v2 - [opacity]*[v1 + 1]
Difference - max[v1, v2] - min[v1, v2] (identical to Photoshop)
Multiply - geometric mean, sqrt[v1*v2]
Divide - an inverse Multiply, sqrt[v1*(1-v2)]

So it actually just took me longer to figure out what "Subtractive" was doing than "Multiply". Of course the odd choice of adding 1 to the top layer leads to the nonsensical result that subtractive yields BLACK for ANY value of top layer (black or white) unless you set the opacity below 100%.

Well, I can finally rest easy that I now know mathematically what they're doing (and believe me I've scoured every book I could find on the topic and never seen this explained), but that leaves three questions I'd really like answered from NewTek:

1) What were you thinking when you labeled these modes with words that mean something entirely different?

2) Why weren't these ever documented anywhere in such a way that Photoshop users would have a clue what they're doing?

3) Can we now have REAL multiply, subtract, blend modes added in 8.2? Personally I could do a LOT more with those than the ones you've got, mainly because they're so simple and useful that I can readily predict the results and much more easily get what I want without endless experimentation.

3b) While you're at it, how about tossing in "Screen" (a VERY useful blend mode in PS, which adds without burning in like straight addition)?

habaņero
12-12-2004, 03:50 PM
That was great!

mattclary
12-12-2004, 05:40 PM
You should put your request in the "Feature Request" forum.

Panikos
12-12-2004, 07:47 PM
Hmmm

Thats cool.
Thank you for taking the time to do this.
I guess the Multiply/Divide Blending modes are used in such a way to prevent/clump
values into more "weak/reasonable" levels.

;)

Matt
12-15-2004, 04:26 AM
Thanks for that - I wouldn't know where to start trying to figure those modes out!!!

Makes you wonder why we don't just have all of the modes available in Photoshop - everyone knows their results (plus our own Alpha / Texture Displacement etc.)