Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Renderable Particle Count
#2
(29-08-2017, 11:33 AM)PhantomBadger Wrote: Is there a way to get the number of Renderable particles used in the Oni Solver's Rendering stuff? The intent is to use this in tandem with the Oni.GetRenderableParticlePositions and Oni.SetRenderableParticlePositions methods.

Cheers

Not directly, because there's no good reason for knowing it.

Remember that each actor allocates a certain amount of particles from the solver. These particles don't have to be contiguous, so very often you´ll find that scattered groups of particles in the solver arrays actually belong to the same actor.

You could add together the amount of particles used by each actor (actor.particleIndices.Lenght) and that would be the amount of renderable positions, but there's no real use for this.

The correct way(s) to get renderable particle positions are either:
A) Get ALL of them, passing the solver's max particles as the amount of positions to retrieve. 
B) Use each actor's particleIndices array to retrieve positions for a particular actor.

if you haven´t yet, see:
http://obi.virtualmethodstudio.com/tutor...icles.html
Reply


Messages In This Thread
Get Renderable Particle Count - by PhantomBadger - 29-08-2017, 11:33 AM
RE: Get Renderable Particle Count - by josemendez - 29-08-2017, 11:48 AM
RE: Get Renderable Particle Count - by josemendez - 29-08-2017, 12:09 PM