What to do with notused quads in a one surface per

Community Forums/General Help/What to do with notused quads in a one surface per

RemiD(Posted 2016) [#1]
What to do with notused quads in a one surface per emitter particles system ?

Hello, :)

In my particles system, there are different emitters and each emitter is one mesh with one surface, there are different quads which are part of the emitter surface, there are particles which are pivots created/deleted when needed, each particle is associated to a quad (part of the emitter surface)

I first update the particle pivot, and then depending on its scale, color, alpha, position, orientation, i can modify the associated quad (its vertices)

Since the quads are precreated in the emitter surface, some quads are used and some quads are notused depending on the number of active particles.
So what should i do with the notused quads so that they are not considered for the rendering ?

Some good infos here :
http://www.blitzbasic.com/Community/posts.php?topic=60857
but not sure what is true or false...

Thanks,


Kryzon(Posted 2016) [#2]
I would collapse all vertices of the quad to the same location, and make that location be somewhere way outside of the camera vision (outside of the region formed by the near and far planes).
A large value like (1 Shl 30) put on all coordinates.


Matty(Posted 2016) [#3]
I'm speaking from memory here but I think it is accurate. Once again there is a lot of chatter about this over the years and some good information mixed in with misinformation.

From memory:

If any part of a surface is visible blitz will consider the entire surface's vertices for rendering.

That limits your options somewhat since whether you make them transparent or simply position them a long way from the origin blitz will consider them as to whether to be rendered or not.

Potentially the fastest way for blitz - and this is conjecture - would be to simply move those vertices out of the range of the camera, OR to have them face away from the camera so that backface culling will take care of it (unless you are using double sided triangles).

Hope that is of some assistance.
from Matt


RemiD(Posted 2016) [#4]
Thanks for the answers, the trick to position all vertices of the quad at the same position is very good if it produces the expected result.


Unfortunately, after some tests, a single surface system per emitter is not fast enough because there are too many quads (vertices) to update... (around 4000 quads so around 16000 vertices).
But i have an idea on how to produce a similar effect by using a several frames texture on rectangleshapes and by modifying the uv coords of the vertices of each rectangleshape so that it would seem that there are particles spawned at different times and having a different behavior. Not sure if it will work or look similar enough or nice enough but worth a try.