Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Obi Softbody on SpeedTree
#1
Hey there.  I'm looking to incorporate softbody physics into our environment pipeline, to replace a few overlapping systems that don't all affect each other fluidly.

A simple question:  Does Obi Softbody work on SpeedTrees in Unity?
Reply
#2
(01-09-2019, 02:34 AM)JordanSliz Wrote: Hey there.  I'm looking to incorporate softbody physics into our environment pipeline, to replace a few overlapping systems that don't all affect each other fluidly.

A simple question:  Does Obi Softbody work on SpeedTrees in Unity?

Just replied to your PM.

The answer is not directly. Softbodies only work on SkinnedMeshRenderers. However nothing stops you from using the mesh asset generated by a Tree component, on a SkinnedMeshRenderer. Tried it and works like a charm.

A word of warning though: If your intention is to get soft body physics on all trees in your game, this is a very bad idea ™.

Trees usually are simulated via procedural functions affecting vertex displacement in the vertex shader (wind, simple repulsive forces against spheres, etc). This is much faster and works well with LOD systems.

kind regards,
Reply
#3
(02-09-2019, 07:18 AM)josemendez Wrote: Just replied to your PM.

The answer is not directly. Softbodies only work on SkinnedMeshRenderers. However nothing stops you from using the mesh asset generated by a Tree component, on a SkinnedMeshRenderer. Tried it and works like a charm.

A word of warning though: If your intention is to get soft body physics on all trees in your game, this is a very bad idea ™.

Trees usually are simulated via procedural functions affecting vertex displacement in the vertex shader (wind, simple repulsive forces against spheres, etc). This is much faster and works well with LOD systems.

kind regards,

Does this system replace the vertex displacement shaders of the tree object? Or displace it on top of the existing shader?  

Seems like something I could manage with quality settings and LODs to control physics near to player only.  What do you mean by "simple repulsive forces against spheres"; is this a feature of Speedtrees?
Reply
#4
(08-09-2019, 04:04 AM)JordanSliz Wrote: Does this system replace the vertex displacement shaders of the tree object? Or displace it on top of the existing shader?  

Neither. It skins the mesh to a bone hierarchy. This happens in the CPU, before any shaders kick in.

(08-09-2019, 04:04 AM)JordanSliz Wrote: Seems like something I could manage with quality settings and LODs to control physics near to player only.  What do you mean by "simple repulsive forces against spheres"; is this a feature of Speedtrees?

When I said "simple repulsive forces against spheres", I was referring to a very commonly used way of approaching procedural animation using the vertex shader. In unity they're implemented as spherical wind zones:
https://docs.unity3d.com/Manual/terrain-WindZones.html
Reply
#5
(09-09-2019, 08:09 AM)josemendez Wrote: Neither. It skins the mesh to a bone hierarchy. This happens in the CPU, before any shaders kick in.


When I said "simple repulsive forces against spheres", I was referring to a very commonly used way of approaching procedural animation using the vertex shader. In unity they're implemented as spherical wind zones:
https://docs.unity3d.com/Manual/terrain-WindZones.html

So then, while we want to be careful about using softbody physics on too many trees, it does work.  They bend with wind, via the vertex shader, but then bend to physics with bones?  Effectively, both types of bending work as they should?
Reply