View Full Version : Y Coordinate question displacement

05-03-2007, 05:12 AM
I have created this mountainscape for my background using a displacement map - I thought I'd shade it mountainy with maybe snow on the tops using y-coordinate, but cant seem to get it right using a gradient - I had 0-1, with the color change at .5, how do I know what numbers to put in? How does this normally get done? I been trying for a couple of hrs and just thought it might be quicker to ask! :help:

Also I had strange problems (I'm using 9.2) I did the mountain first, but then when I copied it into the main scene, it didnt work, I had to add the rest to the existing scene as an added object, or else the displacement just wouldnt work - whats that all about? (or shouldn't I ask!) :eek:

05-03-2007, 05:11 PM
Oh, its version 9 I'm using, not 9.2 as stated! (dunno why I put that)

Did the tutorial on the lw page, got the following result, not quite what I wanted tho - any willing helpers out there?


05-05-2007, 12:26 PM
I usually do something dumb like add a new light to the scene from the lights tab so its at zero xyz and give it ranged fall off in the properties tab, I then go to one of the side elevation views and drag the range slider for its fall off till the circle matches the height of the hill. Now all I have to do is read off the amount in the lights numeric fall off field and I know the height of the hill.

05-06-2007, 08:39 AM
Simon, instead of a gradient node try adding a color layer in the node editor. Use gradient. Choose "Y Distance to Object". That should work.

05-06-2007, 02:50 PM
Thanks, thats helpfull, and I'm getting there

What I really would prefer tho, is say I use a turbulence and have colors in it, then add some white snow into the upper Y areas of the mountains, but only in the one channel, so that it has that naturally fallen look, rather than the cut off line in Y

I used a Y coord, and also an an incedent angle, to put more snow below that cut off line, but I'm sure there is a way to do this better with mixers, math nodes, or alpha transapancy or something?


05-06-2007, 04:21 PM
Here's my latest effort -


05-06-2007, 06:41 PM
At last I'm figuring out whats going on - lw doesnt register the size of displacement in the gradient node but works fine in the layers methid - (thanks serge) the measure the mountain was a great tip too so thanks also to Gerry. I did this one with layers, its taken me so long to get my head round so many things in lw, so thanks again for a ll the tips which help me to carry on!


05-07-2007, 07:38 AM
It seems that the gradient node has the same problem as the old surface editor (non nodal system), namely that texturing is occurring prior to displacement. So the gradient doesn't take the displaced geometry into account.

There are two ways (that I know of) around this. The first is what I descibed above: use a color-layer-node and choose the gradient there. Or, what I would do is save the displaced object as a new object (in Layout: file>save>objects>Save-Trans-Object). Then you can use a gradient node if you want. Other advantages are that you can more easily adjust your model if needed, and it keeps your workflow cleaner (no displacement map).

05-07-2007, 08:17 AM
Yes, I was meaning to come back and say I did indeed export the displaced mountain and texture it in the penultimate version there - thus the gradients were working pretty much as normally expected!