25-10-2023, 07:12 AM
Hi,
I have two emitters parented by the same solver on the scene. Their particle systems are turned as I don't need it. And I want to apply spatial queries to both of the emitters fluid particles.
What is the best way for an efficient query on the both actors at the same time ?
The obvious method is setting a for-loop on an actors solverIndices and make the query and open another for-loop for going through the results. But what is the better way if I would like to combine a query on both emitters ? Running a for-loop on each actor separately ?
Another question is; I see a a significant framerate drop when running a spatial query. Would it be an idea to use a compute shader for running a similar process ?
Meaning that, sending the sover positions array to the compute shader on each update step and then getting the simplice proximity results from the compute shader. I have used compute shader for N-body gravitational system simulation and it has a similar nested for-loop obviously.
thank you for your directions.
I have two emitters parented by the same solver on the scene. Their particle systems are turned as I don't need it. And I want to apply spatial queries to both of the emitters fluid particles.
What is the best way for an efficient query on the both actors at the same time ?
The obvious method is setting a for-loop on an actors solverIndices and make the query and open another for-loop for going through the results. But what is the better way if I would like to combine a query on both emitters ? Running a for-loop on each actor separately ?
Another question is; I see a a significant framerate drop when running a spatial query. Would it be an idea to use a compute shader for running a similar process ?
Meaning that, sending the sover positions array to the compute shader on each update step and then getting the simplice proximity results from the compute shader. I have used compute shader for N-body gravitational system simulation and it has a similar nested for-loop obviously.
thank you for your directions.