Destruction Problems
#1
Hello everyone. New user to tyFlow for MAX 2023 here and I encountered a problem that I will try to explain below.


THE SETUP

We have a Box (200cm x 20cm x 40cm) with an interior Shell modifier (2cm) that is the object to be partially destroyed. An activator needs to be placed inside the box to destroy part of it, while the rest remains intact. Gravity and Ground collision need to be deactivated for the purposes of the scene, so the voronoi fragments float around.

THE PROBLEMS

1. The voronoi fragments once activated by the explosion fly outwards AND inwards, instead of flying only outwards, going inside the box. I have used both a PBomb and an animated Sphere collision object to destroy the object and it happens in both cases. (See wireframe image)

2. In the tyFlow documentation it is stated that tyFlow particles already have inter-particle collision but this si not the case with this simulation. The voronoi fragments that fly inwards, inside the box, instead of colliding with the box's interior, they fly through it. (See edged faces image)

I have also attached the tyFlow editor if someone wants to recreate the scene and check it out.

           
  Reply
#2
Don't mix Particle Physics with PhysX, they are completely different solvers.
Particle Physics is more of a grain simulator and can only use spherical collisions, while PhysX can use any shape (like voronoi fragment.. etc)

Your setup should be something like this.
BIrth object (box)
voronoi
PhysX Shape (you're just basically enabling PhysX there)
PhysX Switch (kinematic)  - you are making them non movable, but will be calculated by physX as collision object
Surface test (inside) - create new box to be used for this surface test, animate it how you want it, and whatever particle that is inside of it, will be activated...
_______________________...connect this surface test with new event, where you will only have...
PhysX Switch (dynamic) - this is where you activate particles that are inside the box
(I see many people place here another PhysX Shape... you don't need it... once activated, PhysX is automatically transferred into the new event... you only need PhysX switch to activate them)

Now, if you don't want default gravity and ground plane collision, just grab Tyflow icon, and turn that off in the PhysX options.

If you want particles to shoot outwards, you need some force to do it.
Maybe create a smaller box inside, and use surface force in the secind operator, and pick that box, and it will use box normals to shoot particles out.
Or maybe you can try adding force, and create spherical TyWind inside the box, and use that...

Keep in mind that some particles might now move, because they are stuck between non activated particles.
I sometimes animate scale a little bit down (from 100 to 90) to solve that...

Hope this helps.
  Reply
#3
(11-29-2022, 01:03 PM)d4rk3lf Wrote: Don't mix Particle Physics with PhysX, they are completely different solvers.
Particle Physics is more of a grain simulator and can only use spherical collisions, while PhysX can use any shape (like voronoi fragment.. etc)

Your setup should be something like this.
BIrth object (box)
voronoi
PhysX Shape (you're just basically enabling PhysX there)
PhysX Switch (kinematic)  - you are making them non movable, but will be calculated by physX as collision object
Surface test (inside) - create new box to be used for this surface test, animate it how you want it, and whatever particle that is inside of it, will be activated...
_______________________...connect this surface test with new event, where you will only have...
PhysX Switch (dynamic) - this is where you activate particles that are inside the box
(I see many people place here another PhysX Shape... you don't need it... once activated, PhysX is automatically transferred into the new event... you only need PhysX switch to activate them)

Now, if you don't want default gravity and ground plane collision, just grab Tyflow icon, and turn that off in the PhysX options.

If you want particles to shoot outwards, you need some force to do it.
Maybe create a smaller box inside, and use surface force in the secind operator, and pick that box, and it will use box normals to shoot particles out.
Or maybe you can try adding force, and create spherical TyWind inside the box, and use that...

Keep in mind that some particles might now move, because they are stuck between non activated particles.
I sometimes animate scale a little bit down (from 100 to 90) to solve that...

Hope this helps.

Thanks for the help. I will try your setup and will return with the results in due time Smile.
  Reply
#4
@d4rk3lf

Success!

First, the movement problem: I actually used a spherical tyIcon, positioned on top of the PBomb, inside the Speed operator and told it to direct the particles out of the Icon (Direction: Icon center out) which worked like a charm.

Secondly, the Collision problem: A little more tricky but you gave me an idea. So, I exported the particles that don't move (the broken box) as an object and used this as a hidden collision object, with a normal Collision operator, which also worked almost perfectly. Some fragments before they bounce off the box's surface they go through it for a frame or two but it won't be visible to the human eye.

Thanks for the inspiration Smile.
  Reply
#5
Cool.. glad I helped. Smile
  Reply


Forum Jump: