#Sine wave shader difficulties
1 messages · Page 1 of 1 (latest)
Fundamentally you just multiply the strength of the sway by a range that represents the tree's verticality
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
totally did it wrong but this looks funny lol
How would I represent the range in the Shader Graph? What I initially did was create a float variable for the Y value of the mesh in the scene then multiply that by the strength like this.
Your verticality multiplier has to be sourced from a variable that changes over vertical distance, such as the ones I listed
Properties are per material so they're always the same value regardless of where positionally you read the value
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
this is what i ended up trying, along with several other things without the correct effect. Is there anything specific here I might have done wrong or I might have interpreted your suggestion wrong? Thank you for the help
Yes, Clamp node has wrong input
And you don't want to Add the position range into your vertex deformation, but multiply the deformation by it