#Sine wave shader difficulties

1 messages · Page 1 of 1 (latest)

neon dome
#

Hi I created this sine wave shader for the trees in my current project, Id like the base of the trees to ideally stay still. I know one way to do this is through editing the bounds of the object or shader and I'm not entirely sure of how to do that however and have heard it can be quite complicated. If anyone has any suggestions that would be great!

brave cradle
#

That range could be calculated from vertical position in world space or in objects space, or from the object bounds, or baked into the mesh geometry in vertex color or UV channel for example

neon dome
neon dome
brave cradle
#

I guess the simplest is to use Position node in object space, and Remap the Y value so the lowest and highest vertical positions you want for the sway map to 0 and 1
May want to Clamp it also

#

Bounds method may offer more flexibility if you have different sizes of trees using the same shader

neon dome
brave cradle
#

And you don't want to Add the position range into your vertex deformation, but multiply the deformation by it