How to register my own physics simulation

Hello, I’ve asked before but it was during the conference so maybe someone is more likely to answer now…

I’d like to create my own physics simulation and use it in blender. I have been able to pass mesh data to and from numpy arrays and create a basic PBD rope using a workaround to force blender to update the viewport but I’d like to be using the same baking and caching logic that blender’s simulations do a.k.a. the blue line on the timeline where frames have been cached.

How do i register my own simulation in blender?

Hi, probably better/faster to look at geonodes and make yr own solver.

Have a look at some Erindale and Cartesian Caramel on YouTube for examples of the simulation zone.

Hope that helps.

Geonodes is cpu bound right? I’m looking to use cupy or Taichi for gpu acceleration

1 Like

Yes mostly however 4.1 has some gpu instancing in experimental

Sverchok I think has Pulga physics and is more mature than Geometry nodes.

Hope that helps

oh that’s interesting. How does that work? is it just cuda? thanks

https://nortikin.github.io/sverchok/docs/nodes/pulga_physics/pulga_physics_solver.html

Have a look here, looks like Numpy.

thanks but i’m really looking to code my own but using blenders timeline caching system

1 Like

You’re almost definitely going to need to get into the C++ source code and make your own fork of Blender to do this. You don’t have access to what you need through the Python API

1 Like