DX11.Particles Filter and Get Positions


#1

HI all and thanks to @tmp for the great contribution.

i am trying to readback the particle positions from a single Emitter but am a little lost on how to do this. Also i wanted to ask what the most effecient way would be if I only want to readback a single Position but from a certain emitter / group.

Attached is an example but which readbacks all positions. Can anyone point me in the right direction?

ParticleGetPos.v4p (65.4 KB)


#2

ReadBack don’t have any selection features, to make it work properly you will need to create buffer with only the particles you want to read back… Or to select only particles you need after readback…

In terms of perf any readback with any amount of vlues is slow by default…


#3

ParticleGetPos.v4p (72.4 KB)

Readbacks are always slow. So you should avoid them, if possible. Fastest way is to use the attributebuffer coming from the AsAttributeBuffer node and use it in further shaders. I don’t know what are want to do?

If you want to get one position only I would recommend you to use the centroid node.

You could also write a custom selection node that selects only one particle and combine this custom selector with the emitter selector and the boolean AND selection node. But this doesn’t make anything faster (in comparison to the current patch) since you still do a readback.


#4

Hi all, I’m trying to use a portion of particles from a System to be used as origin position for anther System, actually i’m reading back attributebuffers, but since Main system as a lot of particles ( at least 1M ), the whole toy became very slow.

I’ m using system in patch attached, any hints to achieve this result properly ?

Thank you very much

ParticlesRB_Vector3.v4p (12.5 KB)


#5

You prolly have to do it all in compute without readback some screenshot with descriptions and full patch would help


#6

did you check the help patch of Emitter (DX11.Particles.Emitter RWStructuredBuffer) ?