tyFlow Forum
Spawn and collision - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: Spawn and collision (/thread-2845.html)



Spawn and collision - nobo - 01-12-2022

Hello,


I'm a new Tyflow User.
I try to make a simulation with a ball in a tube.
I want every collision with a boll make two child particule and delete parent.
It's ok, for the first hit, but i can't do it for the second et next hits.

i have use physX shape, physX Collision and spawn.
Have you got an idea to do this?

thanks
best regards
Bruno


RE: Spawn and collision - tyFlow - 01-12-2022

Set your Spawn operator to "PhysX Collision" mode and set its timing to Continuous as well. That will spawn particles at PhysX Collision locations.


RE: Spawn and collision - nobo - 01-12-2022

Thank you for your help.

I try to active Spawn operator to "PhysX Collision" mode and set its timing to Continuous.
But when the ball hit for the first time the tube, 3ds max freeze and i need to restart  the application.
are there any parameters to set in the physX tab?


RE: Spawn and collision - tyFlow - 01-12-2022

You'll need to filter your events a bit....what's probably happening is the particles are being spawned on collision, then all those new particles are generating their own PhysX contacts and spawning more particles, and those particles are spawning more particles, etc, etc...so you could go from 1 particles to 1000000 particles very quickly.

Easiest solution is just sending out the new PhysX collision spawned particles to another event, so they don't spawn their own PhysX collision particles.


RE: Spawn and collision - nobo - 01-12-2022

I plug Spawn Operator to a new Event/PhysX collision. 3ds max don't freeze but I have too many particules.
I just want to have two particle child for one collision.


RE: Spawn and collision - tyFlow - 01-12-2022

Yea the PhysX collision mode generates a particle for every impact point.

If you just want 2, go back to your old setup and create an event loop. Send collided particles to another event for spawn, then send them back to the first event to wait until the next PhysX collision impact. Don't use PhysX collision mode in the Spawn op.


RE: Spawn and collision - nobo - 01-12-2022

once again, thank you for your help

I have make loop with the physX collision and spawn.
I don't undestand , If i want to have just two particles i must set offspring to 2 and spawn to 30%, otherwise i have many particule.

however, the first hit make two particules it's ok. But the second hit don't make 2 particules
did I make a mistake with the loop?


RE: Spawn and collision - tyFlow - 01-12-2022

Don't send your spawn particles back to the previous event....you want to keep those separate and have them in their own event (send them out to their own event). Just send the original particles you use to spawn back (with a Sent Out operator at the end of Event_006).

If you upload the file I can show you.


RE: Spawn and collision - nobo - 01-13-2022

Sorry, I didn't understand what I should link.
I would like some help, here is my file

thanks again