Hey,
I'm using World Position Offset and Vertex Paint to paint some height into a ground plane. The problem is, I don't know how to choose which axis the mesh gets offset on. At the moment, it just kinda off goes off diagonally in every direction. Maybe it depends on which channel of the vertex paint im using?
Does anyone know how to restrict it to one axis? I tried masking it out, using constant clamps etc., but I really don't know what I'm doing.
Thanks
Replies
Yep! Painting it in white will cause it to go off on all axises, thus giving a sort of diagonal offset.
To restrict it to the different axises, simply paint using only one channel, ie Red, Green or Blue. You will find that the UDK widget represents the direction in form of colour.
If you then want to increase the strength of the offset it gets a bit trickier. You then have to take the red channel from the vertex node and multiply it with a red constant. Respectively, you'll have to do so for each channel you use, and then add them all together using an 'add' node.
And to get offset in the opposite direction, you need to use a new channel. Say the alpha channel if you're already using the others. And multiply the alpha with a negative red, green or whatever you fancy.
Cheers
Thanks very much, that worked perfectly.
The separate channel outputs give you a greyscale image. So, a RGB value of 128, 128, 128 then converts to 0, 0, 128 when put together correctly (ie. being multiplied by a blue constant : 0, 0, 1).
Just like the different channels in PS.
No worries
I usually use it for doing patchs of snow, fog or a creepy flesh pulsing effect.