DarksealStudios opened this issue on Oct 27, 2011 · 16 posts
bagginsbill posted Thu, 27 October 2011 at 7:20 AM
I tried to walk away, I really did. But I can't stand to let statements like this go.
What do you mean white is still white? It most certainly is not. It is now negative grey, a color which appears to be black in preview.
Here is the math you did:
grey - map
or
.5 - map
Allowing for the moment that your grey is not quite .5, let's just look at the general case.
Black = 0, so when the map is black, you get
.5 - 0 = .5
Areas of the map which are black become grey, or positive displacement. In ZBrush this is supposed to be a negative (inward) displacement.
Grey = .5, so when the map is grey, you get
.5 - .5 = 0
So grey becomes black, or no displacement.
White, which on the map means positive displacement, is a 1.
.5 - 1 = -.5
This is a negative grey, indicating a negative displacement.
Clearly your render shows that all displacement has been flipped. Where the map has black grooves, the object has ridges.
Subtraction, or negation, is the same as forming a negative image, which in displacement terms means reversing everything.
Whether or not you subtract from black, from grey, or from white, doesn't matter. That simply changes the offset of the whole thing.
The correct means to offset the map, where higher numbers should still be higher than lower numbers, is to simply subtract the neutral grey value from the map.
This is correct:
map - .5
Now consider:
white (1) - .5 = .5 (a positive displacement)
grey (.5) - .5 = 0 (no displacement)
black (0) - .5 = -.5 (a negative displacement)
Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)