PDA

View Full Version : Divide Blend Mode : Problem!!!


cecofuli
06-21-2007, 12:53 AM
See my example:

In Vray exist a map that can compose a map in Blend mode: Add, Subtract, Multiplier and Divide

http://www.treddi.com/upload/cecofuli/Upload/03%20-%20Forum/19%20-%20Divide/01%20-%20VRay.jpg




I try to replicate in PS ( I inverse the first operator and blending it with Color Dodge), but only last column is identical: :argh:

http://www.treddi.com/upload/cecofuli/Upload/03%20-%20Forum/19%20-%20Divide/02%20-%20Photoshop.jpg

But, if i use a bitmap, VRay and Photoshop make identical result



http://www.treddi.com/upload/cecofuli/Upload/03%20-%20Forum/19%20-%20Divide/03%20-%20VRay.jpg




http://www.treddi.com/upload/cecofuli/Upload/03%20-%20Forum/19%20-%20Divide/04%20-%20Photoshop.jpg


It seems that in VRay

0 / 0 = 1 or 0 / 0 = 255

0 / 1 = 0 or 0 / 255 = 0

1 / 0 = 1 or 255 / 0 = 255

1 / 1 = 1 or 255/255=255

but not in PS...

I'm a little confused...





You understand me ?

cecofuli
06-21-2007, 12:54 AM
ah, Gimp, that have a Divide mode by default is identical to Photoshop.

cecofuli
06-21-2007, 12:54 AM
IN VRAY --------- IN PHOTOSHOP

0 / 0 = 1 -------- 0 / 0 = 0
0 / 1 = 0 -------- 0 / 1 = 0
1 / 0 = 1 -------- 1 / 0 = 1
1 / 1 = 1 -------- 1 / 1 = 1

This is the 1° difference

FOR EXAMPLE (see image above)

In VRay

RED/RED = WHITE

1,0,0 / 1,0,0 = 1,1,1

In Photoshop

RED/RED = RED

1,0,0 / 1,0,0 = 1,0,0



WHY!!! :(

cecofuli
06-21-2007, 12:59 AM
Another question


try DIVIDE this 2 color in PS, GIMP (that has a DIVIDE mode operator) or VRay (in this case, the result is identicle)

209 , 132 , 49 /
255 , 0 , 0 =
-----------------
209 , 255 , 255


or in float number

0,82 | 0,51 | 0,19 /
1 | 0 | 0 =
---------------------
0,82 | 1 | 1


Why a number divided by 0 give me 1???

Please, you can help my to undertant the DIVISION?

thank's!!! :bowdown:

pgraham
06-22-2007, 04:10 PM
A number divided by zero is undefined. In calculus, if you find the limit as the denominator approaches zero from the positive direction, then the result is positive infinity. If you approach from the negative, the result is negative infinity.

So programs usually pick either 0 because the result is undefined or 1 because that's the highest number they can represent in a color value and therefore the closest to infinity.

You can mask the areas in photoshop where each channel of image B equals zero and just assign those areas to 1 so they will match the result you get in your shader.

CGTalk Moderation
06-22-2007, 04:10 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.