Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  ObiSolver.Lateupdate() bad performance
#3
(16-12-2019, 04:48 PM)josemendez Wrote: What version are you using? Obi 4.X or 5.X?

Rope resolution determines the amount of particles in your rope. Together with smoothing, this allows you to decouple simulation quality from rendering quality.

At the end of every frame, each particle is used as a control point for a bézier spline (generated using an extremely optimized version of the Chaikin corner-cutting algorithm). This algorithm outputs multiple curve points, depending on the smoothing parameter. At 0 smoothing, one point is created for each particle. As you increase smoothing, additional points in-between particles are added.

The renderer takes all these points as input and generates a mesh by placing a rope section at each point, generating vertices for each one, and stitching them together with triangles.

So the amount of points outputted after rope smoothing is what largely determines the renderer's performance. The amount of particles in the rope is the amount of points generated at 0 smoothing, and increases with higher smoothing values.

What's better for performance depends a lot on your needs. The rule of thumb is to use as few particles as you can get away with, then increase smoothing if rendering is too "blocky". You should almost never need smoothing > 0 if the rope has high resolution.


Using Obi 4.1.

Yes i guessed thats how particles and rendering was done, but whats bugging me the most is that it isn't the physics simulation that takes time but it seems to be the rendering and updating of the mesh/line. Isn't the line renderer supposed to increase performance "dramatically"? Weird when i don't seem to gain much more than 1-2 ms on the 3 ropes.
(thanks for the quick answer)
Reply


Messages In This Thread
RE: ObiSolver.Lateupdate() bad performance - by TheMunk - 16-12-2019, 04:58 PM