View Full Version : UV Displacement maps

05-04-2009, 04:08 PM
Some time ago, I guess around the time Adaptive Pixel Subdivision came into being, using displacement maps, became really confusing to me. I have my model. I go into the node editor for Displacement. I add the 2D Image node with my map selected as well as it's UV map. I connect the Bump dot to the end node. Then I render. Nothing, it looks the same. So add more sub-D levels. Still nothing. I try each of the types of SubPatch with varying amounts, still nothing. What's happening here?

05-04-2009, 05:35 PM
It does work, heres an example:
The lava flow is done using an 2d procedural animated long the UVs
using nodal.

05-04-2009, 05:54 PM
OK you say it works, but that doesn't really help much, no offense.

05-04-2009, 07:12 PM
In the surface node you have a displacement input. If you use one of the 2d procedurals and set that to your UV map and feed the output of that into the displacement input it should work IF you also have bump displacement activated in the deform tab. Dont feed the bump into bump but the color or alpha into the Displacement input.
Also try playing with the subdivision order.

05-04-2009, 07:56 PM
Well I'm trying that, but I'm not using any procedurals, not sure where that suggestion came from.

Attached a small version of my image map.

05-04-2009, 08:06 PM
It came from the suggestion that a UV map is a UV map. Using a procedural on the UV map isnt any different then applying an Image map to the same UVs. I just tried both and it displaces fine for me either way. BTW if you dont want any help just say so.

05-04-2009, 08:18 PM
I'm not trying to be rude or anything, I'm just very confused. I tried what is supposed to work as far as I knew, then I tried what you suggested using an image instead, and it seems so simple, but yet nothing is happening. Sorry if it came out wrong, but you confused me talking about procedurals.

05-04-2009, 08:24 PM
Sorry but it came across as rude as opposed to being confused. What ai was saying is that regardless if you use a procedural or Image map applying the TEXTURE to the displacement input on the surface node with bump displacement turned on will displace the mesh. Again this is done in the surface panel.
You can also apply the image map as a Normal Displacement in node displacement. The other caveat to all this is pumping up the polycount high enough to get a good result.
Usually I rely more on the normal maps to create the detal as opposed to lots of actual displacements esp on a character that will have to be animated.

05-04-2009, 08:43 PM
Yeah I have a normal map, but it doesn't look nearly as nice as it originally did in 3D Coat, it looks very flat with a few bumps from the normal map.

05-04-2009, 08:59 PM
How large is your actual image file? I've found that anything less than 4K doesn't seem to create good results.
Also, there's something in there about the mid point, too, the way that LW reads the difference between the grayscale values. Needs to be set to around .48-.5 or so, so LW can properly interpret the starting point of the displacement in either direction. Since LW sees perfectly middle gray as 0 or neutral, and values above or below that as the actual displacement.
I have LW churning away on a render right now, so I can't really check for the exact settings, or else I would.

05-04-2009, 09:08 PM
Here, this might help. This is a displacement node setup from Steve Warner, to be used in the node displacement from the geometry tab. It was available from his site for free, but I can't find it now. Lost that link, but I think it was part of his ZBrush tutorials somewhere.

I think it already has OBJ_UV Map selected for UV map so you'd want to change that to whatever is relevant. If you want to use it all you have to do is put it in your Nodes folder in your content and then click on Import to load it into the node editor. The nodes are set up with descriptive titles so you know what's what. What I was referring to above about midpoint is explained in it, more or less.

05-04-2009, 09:22 PM
The nice thing about 3dcoat is that it exports the surface with the correct setup for LW nodes already.
The displacement map is what youll need to effect the silhouette of your geometry and the normal map is used for the smaller details.
Can you post your model/texture?

05-04-2009, 09:54 PM
Thanks IMI, it is 4096. That node setup is also in the LW Online Help. it's specifically set up that way for ZBrush because apparently ZB handles displacement differently than LW, but 3DC can output in a number of ways, one of which is the one LW likes.

Larry I'm not too keen on sharing the files publicly, I'll PM you a link.

05-04-2009, 10:28 PM
I loaded it up, added a dome light and rendered this:

05-04-2009, 10:43 PM
Now that looks nicer than what I get, Did you do anything with the displacement map?

Here you can see mine in 3DC, it looks like it has much more depth to it.

05-04-2009, 11:00 PM
In LW the mormal map doesnt appear to have much detail.
I used the node setup exactly as it came in.
The only thing I did was up the render subpatch a bit and
increase the amount of displacement in the slider right next to
the bump displacement tool in the displacement tab.

05-05-2009, 12:36 AM
I started the scene over from scratch and got it. It seems that every time I had a map in the Deform Tab nodes and it doesn't do anything in there, but if I put it in the Surface Editor it worked fine. Thanks for your patience.

05-05-2009, 03:13 AM
Glad its working. I didnt try it in the deform Tab. Ill see what happens there.

05-05-2009, 11:42 AM
Well "working" meaning it's doing something. It almost looks like the entire mesh is displacing the same amount all over. Like for example the eye's and mouth appear to be closing shut if I raise that displacement amount in that slider you mentioned even just a little.

05-05-2009, 01:19 PM
Hi Phil,

I've been using the 'standard' ZB node setup to get 3DC displacement into LW for some time now, it works pretty well. If the vector from the Spot Info Normal node is giving odd results, try the Smoothed Normal output instead. I've had to adjust the Multiply value in the node tree fairly low at times (as much as .015), and for each displacement map the value is different. This is in part due to the scale of models and LW's default use of 1m as a basic measurement. So if you made the model on a scale of centimeters instead of meters, the Multiply value would have to be scaled accordingly to account for it. Apologies if this doesn't sound logical, teaching is not my strong point and vector math is all Greek to me anyway. It would make much more sense to me if they had actually made a displacement image node like they did for normal maps.

Hope this helps, good luck!


05-05-2009, 02:20 PM
Thanks, what output option are you using from 3DC for the displacement map? Zero is black, zero is gray, normalized, not normalized?

05-05-2009, 02:26 PM
Just a quickie (busy here) post

Zero for LW is grey, that is the setting I usually use

05-05-2009, 02:28 PM
Thank you, I was wondering about that.

05-05-2009, 03:21 PM
Geo beat me to it. Grey = 0, Normalized (I think). I think Normalized vs Non-Normalized can be accounted for by using smooth normal for normalized and geometric normal for non. I think. I've been tinkering with the sculpting and painting for a while, so I haven't output displacement recently.

05-06-2009, 12:08 AM
OK interesting. I got it working using the normal Displacement nodes, not the surface editor with some strange things going on. First I had to use the Color output dot from the Image node. That was WAY blown out, so I had to reduce the opacity of the image all the way down to 1%. That works, but the bump is inverted. Like things that should be indented creases are showing as raised bumps. See attached. I tried inverting it, but then it doesn't show at all, no matter what the opacity is.

05-06-2009, 01:48 AM
Thanks, what output option are you using from 3DC for the displacement map? Zero is black, zero is gray, normalized, not normalized?

I told you that in post #10 where I wrote, "Since LW sees perfectly middle gray as 0 or neutral, and values above or below that as the actual displacement." ;)

05-06-2009, 06:34 AM
Yes thank you I was asking Oliver because he said he was using the ZB setup, and ZB exports zero as black.

05-06-2009, 12:12 PM
Yes thank you I was asking Oliver because he said he was using the ZB setup, and ZB exports zero as black.

The term 'ZB set-up' term is a bit of a misnomer really, my bad. ZB is as easy to customize with its output as 3DC, maybe even more so. Anyway, the output is determined by the settings you put into ZMapper, and pixologic developed a few presets to match displacement needs for Maya, 3DS, etc. When I said the ZB method, I meant using the ZB node setup that LW has put together to get ZB displacement in.

To make sure we're all on the same page here as to how to set up a displacement node for images, I'm attaching a sceen cap of one of my nodes. Phil, notice the connection is going from the luma value of the image node, not the color. The multiply value for this node tree is .0015, but your values may differ.


For those not familiar with nodes, reading this node tree is fairly easy. Luma from an image usually gives a scalar value in the range of 0-1. So the subtract node is actually setting the value back by .5, making black a value of -.5, and white a max value of .5, and setting grey as 0. This results in positive scalar values where the displacement pushes out, and negative where it goes in. This value is then multiplied by a fractional value that allows the user to scale the displacement strength. This is done incidentally through the aptly named scale node, which is used to apply the displacement vector to the mesh's surface normal derived from the spot info node. Since the nodes and vectors are all math-based, in theory you could set up a node to use the 'Black as Zero' output as well, but this is the one Newtek provided.

Tweaking this tree should give you the results you're looking for Phil. Remember that it may not look 'as good' as a multi-million poly sculpt until you add a normal map and/or bump map.

Hope this helps.


05-06-2009, 01:30 PM
Thank you I actually did figure it out with this tree. Last night, I'll attach a couple examples. I think some of my confusion comes from the LightWave help file. It shows a screenshot of those same nodes and says:

Note: In the image above, there is a subtract node, then a multiply node. Subtract - In LightWave, black is usually used as no displacement and white as full displacement, but ZBrush is different. ZBrush uses black as a negative displacement (displace in the opposite direction of white), mid grey as no displacement, and grey as full displacement. To do this subtract 0.5 so that instead of the image going from 0 to 0.5 to 1, it goes from -0.5 to 0 to 0.5. Multiply - Instead of making the image go from -0.5 to 0 to 0.5, we would really prefer it to go from -1 to 1, so multiply the image by 2. However this node also has the added bonus on controlling how far we want to displace the vertices, especially because we will displacing them by a default distance of 1 meter!

Which seems to be the opposite of what I'm seeing here, unless I read it wrong. It looks like that is telling me black is zero, while this thread said gray is.

BTW, the above quote is the reason I called it the ZB setup, just for lack of a better term.