View Full Version : Nodes - Using images as bump

02-12-2010, 06:17 AM

Never really got into nodes but I'm trying to learn how to use them at the mo.

I had a surface setup using the standard layers system which consisted of 2 grass images, layered up and blended using a procedural set to alpha.

A path/cobble texture, blended ontop using a weightmap/gradient.

Then I had 2 grass bump map images, blended together using additive mode with the weight map masking out the path.

So im trying to re-create this in nodes...

So far I have the colour maps all done, using mixers and passing in either a procedural or a weightmap controlled by a gradient node.

Thats all working fine; but now I'm trying to setup the bump map.

I need to mix 2 bump maps together, they have Bump outputs but I dont know what node to use to mix those 2 bump outputs.

I also need to mask out part of both maps using a weight map.

Any ideas?



02-12-2010, 07:07 AM
You can treat bump maps like you do colour, so you can mix them with a mixer node, or using the maths>vector nodes, to mix them up, they are basically 3 channels (x,y,z) so you can mix them with anything that mixes 3 channels (r,g,b[red] or x,y,z[blue]) - If you want to scale the 'height' of the bump, use the multiply (vector, blue) node and multiply them with a fractional value, such as for example 0.5 will make the bump 50% strong. or 2 will make it 200% strong. In my example I am using a constant node (set to 1 in this case) but you could put in any scalar value as an input (such as a weight map or another texture) as an input. Using a mixer node with an alpha mask (in this case I use the dots texture, but it could be anything with a black<>white range, such as a weight map input) you can blend 2 textures together, just as you would colour maps.

The important thing to note is: Lightwave won't let you connect a colour node (red dot) to the bump or normal inputs of the surface (blue dot). To get round this simply feed the colour channel through a vector node (such as the multiply node set to 1, or an add node set to zero so it doesn't change anything) and then it will accept the input. Just make sure its something valid or it'll look terrible :D

Captain Obvious
02-12-2010, 07:20 AM
You can use the vector 'Scale' node instead of using multiply. It basically scales all three vectors by the same amount.

02-12-2010, 07:25 AM
Ah great, thats sorted it :)

It was the conversion to vector that had me stumped.

Thanks for the help, much appreciated.


02-12-2010, 07:37 AM
Ken Nign also released a vector mixer tool http://www.lwplugindb.com/Plugin.aspx?id=c0011e45 specifically for doing that too :)

02-12-2010, 07:39 AM
One other quick question.

In the layers system, I can select Distance to Camera as an input param for a gradient.

How would I do the same thing in nodes?

I dont see that option in the gradient node (I want to fade out the bump based on distance).


02-12-2010, 08:28 AM
I had to investigate to reminds myself how you do it LOL

Use the maths>vector>distance node to derive the distance from an object spot (any object in the drop down selector) to the object spot (it's coords) so LW knows where it is in space. You could also use a 'layer' node and just use the standard gradient in there too :D

Dpont also added some extra spot info nodes, such as the 'nearest point' node, which you can use points as an input for the gradient. You could use such gradients at any point in the tree to scale a bump map using either a multiply or vector scale node.