#Interactive Wind Shader for your Foliage...

1 messages · Page 1 of 1 (latest)

dark python
#

Hmm It also seems only to happen with this style of sprite, and only when they are close

novel parrot
#

Afaik it's related to how sprites are batched so they can be drawn together. In this case those batches are changing as the player runs through since they need to sort correctly still.
I'm unsure on a good way to solve the problem.

#

I think removing the world position from the UV of the noise should fix it? (But then each tree is using the same UV and so offset is the same)

dark python
#

Yeah batching might be right - well actually i did try to remove the world position correction but the issue seemed to persist 😒

novel parrot
#

Are the sprites scaled too? That might affect it

dark python
#

hmm yes their parent is scaled. Gimme a sec

#

Seems like it's not happening as persistant when i revert the scaling. Now ofc i have to redo the sprite import so they fit in the game world again

novel parrot
#

I think scaling shouldn't matter if you use World space instead of Object on the Position node (the one going into Split). Then Transform from World to Object.

dark python
#

like this right?

novel parrot
#

Ah sorry, I meant Transform after the Combine

dark python
#

genious!

#

thanks a bunch the transform worked

novel parrot
# dark python thanks a bunch the transform worked

Nice. The trees all sway at the same time though right? Or did this fix that too?

If the world pos offset doesn't work, I'm thinking that an alternative could be to use the Vertex Color as a seed to the Random Range node to provide an additional offset (Add to current offset in Tiling And Offset node).
That way as long as the trees are coloured differently, they should also sway differently.

#

Though that might look a bit too random, not sure