Improving particle collisions detection

Hello Blend-Maniacs!

I’m having an issue with particles and collision objects. For my particle emitter, I’m using a fractal subdivided sphere and for my particle I am using a basic subdivided cube. My collision object is a subdivided floor-plane.

My problem is that when the cube particle collides, it’s not colliding at it’s edges, but the center of the cube. Therefore the edges of the cube are passing through the floor. I’d like the collision to happen so that the entire cube stays above the floor. Is this possible? Also the rotation of my particles is very fast. Maybe someone knows a way to slow this down a little??

Thanks for any help!


Particles only support sphere based collision detection.
You can increase the radius of that sphere, it may work for a cube…?
There is no way to solve this problem other than moving your simulation into the BGE where mesh based collision is supported.

Thanks Atom. Any idea how I can create the initial spraying action in BGE to get my cubes moving??

You can use the standard particle system to create the initial particles in space. Then when they are all spread out. Convert the particle system to a single mesh. Then apply your physics settings to that single mesh. Then put that mesh in edit mode and issues a spearate loose parts on the mesh. All the original particles will become individual meshes inheriting the physics settings. Then you can just press P-Key to observe the BGE physics animation.

Thanks again Atom. Now I’m really a noob. Can you tell me how to convert my particle system to a mesh and how to separate the mesh. I cannot find these operations on Google.

Here is a mini-tutorial:

Start with the default scene.
Add a particle system to the default cube.
Create another cube or any object and name it “particle”.
Change the render type from Blender Render to Blender Game. (or the physics parameters will be different)
Switch to the physics TAB and change the physics type from Static to Rigid Body. (adjust any other physics attributes at this time as well such as Radius to match your mesh size)
Switch the render type back to Blender Render.
Move the particle to another layer.
Select the cube with the particle system.
Change the particle system to render as object. Choose the “particle” as the Dupli Object.
Select and position the particle system up above where you want it.
Run the particle system forward in time until you see all the particles that you want.
You should see a dotted black circle around each particle. This is their collision radius. If you don’t see it you have set the radius too small.
Press SHIFT-CTRL-A or from the menu of the 3DView Object/Apply/Make Duplicates Real.
Now you will have a bunch of real mesh objects that are participating in a physics simulation.
Switch the render type back toBlender Game.
Under the Game menu along the top choose Record Animation.
Press the P-Key and wait a minute or two.(sometimes I can’t see the physics object moving but with record animation turned on they are being auto keyframed for you).
Press ESC key to stop the physics calculations after a short time.
If all goes well, you can press Play on the timeline and all your objects that were previously controlled by the particle system are now controlled by the physics system.

I just worked through the tutorial and here is my scene setup. Open this scene and press the P-Key while the mouse is over the 3DViewport. Press the ESC key after a short time. Then press Play in a timeline window. In my example you should see a kind of explosion. This is because all the physics objects are in a collision state on the first frame. They are too close to their neighbors and try to immediately move away from them. You can also add a floor plane so the particles will have something to fall upon.

Attachments

25_particle_to_physics.blend (1.63 MB)

Atom

This is great stuff. The collisions are much more box like now.


I still seem to be having a problem with things passing through the floor. I suspect this is a problem with the way I’ve set up the game physics. Not that this is exactly what I’m trying to create, but this example seems to have very accurate collisions happening.

So it seems like it’s possible…