PDA

View Full Version : Weightmap from collision


Psycrow
08-14-2008, 09:03 PM
Hi there,

I'm trying to write the collision data from a particle simulation and a polygon mesh into a weightmap. The weigthmap value should be 1 at the nearest vertex of the collision with the particle, and 0 when there is no collision. Should be easy, but i just can't find the solution.
Anybody got any ideas?

so long...

grahamef
08-15-2008, 12:25 PM
When you get point locations from a geo query, you can only read attributes at those points. You can't set data. Therefore, the ICE tree needs to be on the mesh with the weightmap.

What the tree needs to do is:

- Get its own PointPositions and use that to get the closest points on the cloud.
- Daisy-chain that to get the velocities.
- Use Basic Collide to see whether the particles will collide.
- If the collision location is close enough, set the weight value.