#help with shader graph pls
1 messages · Page 1 of 1 (latest)
I think you want the vertical gradient to multiply the offset, not the computed world position :
thx it helped smh
I wanted my trunk to swing with the foliage, but can you help me with that?
please
or thats my leaves which are shifting
Instead of posting a video, could you post a high resolution enough screenshot of the vertex part of the shadergraph with readable node names ?
I don't know how you did the wind effect for the leaves, but the principle behind trees wind is the following : The wind offset needs to be cumulated from the root of the tree that is static to the tip of the leaves that have the most movement.
Very often this is done my storing a sort of "wind mask" in the vertex color or secondary UVs of the trunk/leaves, an apply this mask on the exact same wind displacement logic (to have the trunk/branches/leaves in sync).
Here for example you are using the UV.y to mask the wind on the trunk. But for the leaves to follow it, even if they are using the same wind noise, they also need to have this masking information.
I wanted to do it with the help of the preview, but I couldn't make the trunk seem to move either.
so that the trunk remains stationary at the bottom and moves slightly behind the leaves at the top.
IDK how the tree you have is build, but what you could do is use the object position as single source for a base noise that affects the trunk and the leaves.
Then you need a way to have a uniform vertical mask to have the trunk sway and the leaves follow. Currently your using UV.y for the trunk, but I'm pretty sure it's not the same for the leaves.
You could instead use the Y coord of the object space position.
That way the leaves should follow the trunk.
Then you need a mask from the base to the tip of the leaves to have individual sways. Maybe UV can be used for that.
idk what to do