Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Simple and efficient way to make Obi Fluid rise/lower in a cylinder container
#6
(18-12-2020, 06:54 PM)zkkzkk32312 Wrote: hey,

yes I am using mesh colliders for the tank,
but its relatively low poly, only 150 verts and 98 tris.

so I tested it with Burst,
it starts with 20 fps but goes up to around 55 after a few seconds.
I shell keep tweaking the values on solver/blueprint.

do you have any suggestion on runtime particles adding/removing?

Zack

Hi, 

If your particles are big enough, each one might need to collide with many triangles in the mesh collider. This can quickly add up to thousands of contacts, even with relatively few particles. Distance fields guarantee only one contact per particle (just like primitive colliders) and are much more robust.

Tweaking things at random in hopes to improve performance is going to take a lot of time and effort. Use the profiler, it will tell you exactly what needs to be adjusted. If you need i can help you interpret your profiler data.

By default Burst uses asynchronous compilation, so the first few frames will be noticeably slower in editor. You can force synchronous compilation in the burst menu. See: http://obi.virtualmethodstudio.com/tutor...kends.html

You can’t add/remove particles at runtime unless they’re part of an emitter(*).That would cause runtime memory allocation and GC spikes, which are highly undesirable. For this reason, Obi always preallocates memory if possible, and avoids runtime allocation.

(*)Just call emitter.Emit() and emitter.KillParticle() when needed. These activate/deactivate existing particles in the emitter particle pool, no alloc.
Reply


Messages In This Thread
RE: Simple and efficient way to make Obi Fluid rise/lower in a cylinder container - by josemendez - 18-12-2020, 07:54 PM