gridshape particles with jit.gl.multiple
Hi,
I'm trying to transform 3D particles created with jit.p.shiva, jit.gl.multiple and jit.gl.gridshape in a jit.phys.world. I want the particles to be attracted by a jit.phy.body so I can interact with them. I'm using jit.phys.multiple with jit.phy.world and jit.phys.body like in the Day 5 of this physics Patch a day : https://cycling74.com/tutorials/00-physics-patch-a-day/. When I'm enabling jit.gl.physdraw I see that some things is workings, and others not.
- My particles that are going up displays physics data but not those going down.
- The gravity settings don't do anythings
- The jit.phys.ghost settings don't do anything.
Can someone help me with this?
Regards.
if you want to mix a particle system with the physics simulator, you can't simply plug the particle positions into phys.multiple. if you do, the particle positions will override any physics simulation forces on the particle.
instead, you can use the particle positions to calculate values for a phys.multiple force matrix. to do this, take the current phys.multiple position (P) and the particle target position (T), subtract P from T, and scale by some parameter representing strength (S).
Force vector = (T-P)*S
pack this force vector into the force matrix, and play with the different parameters, such as strength, gravity, damping, and phys.ghost parameters.
jit.gen is perfectly suited to calculate this force vector. the physics patch-a-day Vortex demonstrates some of these concepts.
Cool thanks, I will try this later in April (I'm on an other show right now...) and will give you feedback!
Regards
Hi,
Finally I had some time to play with this! But unfortunately it is really over my knowledge... I don't really understand how to use the different matrix of jit.p.shiva to control a particle system with jit.phys.multiple. I searched on the forum and tried a lot of things for 3 hours and I'm not more advanced than last year.
If nobody can help me on this one, I don't think I will be able to do it!
Regards.
LR
Hi,
Son here is where I am today. I used the jit.gen from the Vortex patch a day, but I don't know if I have to change something in it. I also don't know what to send in the position matrix of the jit.phys.multiple so the particles system position add up with the phys positions.
LR