3D Particle Collision

mst1228's picture

Hi. I am trying to accomplish an application similar to the video below:

http://vimeo.com/9022191

At the moment, I'm just trying to figure out the particle system and collision. I have attached a composition that is a basic example of where I'm at. I have a simple particle system emitting particles across the top of the screen. They are falling down and colliding with a 3d object which is in the middle of the screen. I have a few questions:

First, is there an easier way to do this same thing without using any of the 3d objects? It is eventually going to be projected onto a flat 2d plane, so I don't really need the 3d objects. I just didn't know how to do the particle collision without using them.

Second, the particles are definitely colliding with the 3d object in the composition, but they seem to be colliding too early. Almost as if the 3d object was higher on screen than it actually is. Any idea why that would be happening? The 3d object I'm using is a .stl model that I exported from Google SketchUp. Maybe that is the problem?

Third, is there any way to make the particles collide with themselves? The way I have it setup in the example, they don't ever contact each other. But I have used some other forces in the particle system in other tests, and they don't collide.

If anyone has any ideas or pointers I would greatly appreciate it. Thanks in advance for anything you might be able to help with!

PreviewAttachmentSize
3d_collide.zip64.22 KB

idlefon's picture
Re: 3D Particle Collision

I don't have kineme3d so couldn't open your comp.

Regarding simple particle systems, I suggest using JavaScript or OpenCL (latter is much faster). This way you can add features to your system. Especially if you want them colliding with each other, OpenCL is the only way I can think of.

jersmi's picture
Re: 3D Particle Collision

Actually looks like they may have used Box2D. Though it's a limited feature set, have a look at franz's Box2D plugin (1024 blog).

mst1228's picture
Re: 3D Particle Collision

The Box2D from 1024 Blog seems cool, a lot like what i need. But like you said, limited feature set. Is it possible to get into the insides of a Quartz plugin and tweak around with that? How are these plugins usually built anyways?

mst1228's picture
Re: 3D Particle Collision

Actually, I could do almost everything I need with this Box2D plugin. The ONLY exception at this point is the limitation of a custom static object. I can add static objects, but they can only be exactly the same as all the other objects (different sizes, colors, etc).

So basically, does anyone know if there would be a way to use a custom shape just for a static object? Or is that a limitation to the Box2D framework?

Thanks.

franz's picture
Re: 3D Particle Collision

what custom shapes do you need exactly ? Totally custom ?

benoitlahoz's picture
Re: 3D Particle Collision

Hi,

Box2D needs convex polygons with less than 8 vertices. But if you can triangulate your shape to obtain a lot of smaller triangle shapes you can add them to a unique "body".

That's exactly what I'm working on actually...