"Leaf waving in the wind"-Animation

Hello guys and girls,

so in my current project I want to animate a simple low-poly leaf-mesh (created in Blender) similar to this

.
It should look like the leaf is waving in the wind without being attached to anything.

For clarification: the leaf is positioned in the middle of the screen and it should look like it’s floating while the user is able to move it through the scene via touch-control.

I thought about using different leaf-states to morph between, but there must be an easier solution to this. Any suggestions? Thanks a lot for everone helping :slight_smile:

Welcome back @Brewcrew-MJ

This is a question not a tutorial and as such it should be moved. @carolhmj are you are able to do that?

1 Like

Sure can! :smiley:
I think one way to achieve that effect can be soft bodies: Soft Bodies | Babylon.js Documentation (babylonjs.com)

1 Like

Thanks a lot for the feedback!

So for my case - if I understand Cloth Soft Bodies correctly - i would have to create a ground-plane, morph it into my leaf-mesh, anchor it to an inivisible object not affected by physics, so the user can move the leaf through the scene without it falling down, and then create some physics representing the wind. Those physics then probably need to alternate in force and direction so the leaf-mesh is constantly changing its form. Is that what you are suggesting @carolhmj

Thanks a lot :slight_smile:

Hello,
The above solution using cloth soft bodies and involving physics seems to have way to much impact on performance (and is also too complex to implement) speaking about leaves (thousands of em?)
There was this grass topic using a fur material that could may be apply to leaves as well?
Else, I don’t think the shape of the leaf necessarly needs to change, it could just wingle and rotate.
For that I would rather try with a solid particle system.
My opinion only.

Edit: And I forgot to mention that I would absolutely LUV to see convincing trees with wind animation in BJS. In fact, I was even thinking of making some (but then, it’s a lot of work :wink:

1 Like

Hello,
I also would absolutely love to see animated trees in BJS, but for my current project I only need one single Leaf animated kinda realisticly looking. That’s why I think fur material as well as a SPS aren’t what I am looking for.
I agree, physics are probably way too much for my project. But my attempts to achieve the desired outcome via simple rotating/wiggling all failed, as the leaf needs to kinda bend in different directions. Probably i need to go back to my initial idea using different states of the leaf-mesh and morph randomly between them.

Ok apologies, I was so excited I did read ‘leaves’ instead of ‘leaf’ :face_with_monocle:
I should may be learn to read the text before replying :pleading_face:
In that case, the above does not apply (obviously :wink:

Yes, that sounds good. Here is a recent post with a nice morph you can may be use for inspiration.
GL with your FX and project,

2 Likes

If physics is not an option, maybe using a custom vertex shader could help a bit. For example, pass the shader a perlin noise texture and time. Then, modulate the vertices of the leaf by a time-position dependent texture lookup. Maybe make it a bit dependent on the distance to the center of the leaf, and instead of directly modulating the position, use the texture to determine the magnitude of the angle to rotate relative to the center. Add in a time-dependent rotation transformation too for the overall leaf. Half baked thought, there’s probably some kinks to iron out.

2 Likes

Hello @Brewcrew-MJ just checking in, was your question answered?