Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ObiPathSmoother influences physics?
#2
(26-03-2020, 10:35 AM)TheMunk Wrote: So I was trying to optimize my scene by lowering the smoothing levels of ropes not on camera - hoping that would lead to faster mesh/line rendering. 
However, I've noticed doing this on one of my ropes influences its physics:



Code:
private void OnBecameVisible()
   {
       SetVisuals(true);
   }

   private void OnBecameInvisible()
   {
       SetVisuals(false);
   }

   private void SetVisuals(bool state)
   {
       onCamera = state;

       //will only reappear if solver is enabled
       if (_obiSolver.enabled)
       {
           /*if (_ropeExtruder)
               _ropeExtruder.enabled = state;
           if (_ropeLineRenderer)
               _ropeLineRenderer.enabled = state;
           */
           if (state)
               _obiPathSmoother.smoothing = ogPathSmoothingLevel;
           else
               _obiPathSmoother.smoothing = 0;
       }
   }
If I disable the script, the simulation is more stable (and correct) - if enabled the rope particles (close to dynamically updated static attachments) will freak out.

Is this expected behavior? Isn't the smoothing only for visuals? not for physics?

You're right: smoothing only affects rendering. It is performed as a post-process after simulating each frame, its results are not feed back to the simulation in any way.

I can't reproduce any differences in physical behavior when changing smoothing. Can you give more details about your setup?
Reply


Messages In This Thread
ObiPathSmoother influences physics? - by TheMunk - 26-03-2020, 10:35 AM
RE: ObiPathSmoother influences physics? - by josemendez - 26-03-2020, 10:58 AM