Forum: Poser - OFFICIAL


Subject: Mask a Displacement Map

flibbits opened this issue on Dec 28, 2011 ยท 40 posts


bagginsbill posted Fri, 30 December 2011 at 8:20 AM

Again, I have to point out two things:

Mid gray is not a neutral displacement. Black is neutral. Black means zero. As I've written many times, for proper use of a displacement map that was designed with mid-gray as the neutral value, you should offset it. There are two common strategies, both equivalent. You can subtract .5, or you can double it and subtract 1.

And to control a displacement effect so that it appears some places but not others, use a black and white mask. Multipy the mask with the displacement.

Robyn:

In matmatic parlance:

mask = LinearMap("whateverIsYourMask.jpg") # linear map is an image map with gamma=1

dispmap = LinearMap("whateverIsYourDisplacementMap.jpg")

centeredDispMap = dispmap - .5

depth = .1 # use whatever depth you want - I'm using .1 inch as an example

surface.Displacement = depth * (mask * centeredDispMap)


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)