Physics interactable foliage

In this set of videos i will show how to make physics interactable foliage (aka. stuff that bends away when we walk through them). I will base some of the content off the already aquired knowledge from the ragdoll tutorial series i also posted on the forums here, so check that out too for more info on the Angular Motors and how they work.

Here’s a video showing what we will create.




(last update)

Hope you enjoy. And as always, comment on the videos if you find stuff that could be done in a better way or have problems with it.

I spend a lot of time making free/ad-free tutorials covering UE4/Mixamo/Maya/MotionBuilder/Mocap and basically anything gamedev related. Click the button below if you want to support me.


Nice buddy, want more! :slight_smile:

I was looking for something like this for a long time, looking forward to it.

Cool can’t wait :Dyour tutorials are great

Nice :slight_smile: Did you already tested the performance impact?

Thanks for the kind words and i hope to be able to make the tutorials once im back from work. To be honest im not entirely sure how to best test the performance, so maybe someone else can pitch in with info on that.

Really looking forward to this!

Very nice. Good Job!!!

Nice ! can you do a tutorial on baked cloth animations like instead of realtime physics maybe bake the physics and import into Unreal ? I cant find a good tutorial that can help me achieve this …

Uploaded WIP2 video… explanations being uploaded later this week.

Also interested in performance impact with large foliage fields.

Regarding performance impact, i’ve so far only tested inside the editor with only this fern. Which is setup with a base lod + 2 additional lod’s ranging from about 2k triangles to i think it was about 200. I’ve never tried to make foliage before, so i guess im not the right person to judge if this is a very complicated foliage? Also depends highly on what platform/quality you aim for i guess. Anyway, the tests i’ve made was with this fern with 750.000 of them spread out. And that seemed to perform well.

Now the real trick is to limit the number of dynamic foliages and there you can tweak it in various ways, all depending on the usecase.
Just a few things that pop in mind:

  1. Convert dynamic foliages to static foliages when they’re not in the active viewport (or if it’s a multiplayer scenario, consider any active viewport)
  2. Only allow converting a maximum number to dynamic foliages at one time
  3. Adjust on the complexity of the meshes
  4. Minimize the use of tick event, by limiting various code to run on a timer

My conclusion after having experimented with this for a week now, is that performance is something you need to consider carefully with this approach, but still with some tinkering, it can produce some very nice results.

Please try to measure dynamic vs static foliage performance with same base mesh and same scene.

If i have over 1000 dynamic foliage active, the performance on my machine starts to suffer. So lets just say that this setup is not optimal :wink: No need to test further on that i think.