SPlisHSPlasH icon indicating copy to clipboard operation
SPlisHSPlasH copied to clipboard

Using GPU neighborhood search with python-Bindings and validation

Open MassimoErber opened this issue 4 years ago • 2 comments

Hi, thanks for this really interesting module.

I installed the module in Python using pip. Now i wanted to create my own Scenes but could not find a way how to set the Cmake-Flag for GPU-neighorhood search in python. Is it possible to change this flag in Python? The second issue is, how to change the gravitation term in Python? In my simulation I want to do a fluid simulation, without any gravitational force. I tried to use: sim.setValueFloat(sim.GRAVITATION, [0, 0, 0])

MassimoErber avatar Jun 11 '21 12:06 MassimoErber

Hi @MassimoErber, unfortunately the Python module does not come packaged with the GPU neighborhood search, it can only use the CPU neighborhood search. If you want to use the GPU neighborhood search you will have to compile the project from source.

Regarding the gravitational force: the parameter setting interface is unfortunately a bit incomplete. The gravitation is a float vector and setValueFloat is only for single vector values. If you want to try out simulations without gravity my suggestion would be to set the gravitation value in the .json scene file or to set it in the GUI. Setting of vector values from python has unfortunately not made it into the github release yet.

digitalillusions avatar Jun 11 '21 20:06 digitalillusions

Hi @digitalillusions,

thanks for the quick response!

MassimoErber avatar Jun 14 '21 06:06 MassimoErber