How to create AABB tree for dynamic mesh?

Started by
4 comments, last by Twerdster 9 years, 9 months ago

Hi,

I am trying to design a program for mesh to mesh collision detection and response for clothing simulation.

Mesh A is an avatar with polycount of around 2k.

Mesh B is a triangle mesh representing a piece of clothing with around 6k triangles.

My avatar mesh is deformed using linear blender skinning and wont be influenced by the clothing mesh.

I have some questions regarding this scenario:

1) Is an AABB tree well suited to this problem?

2) If I detect only cloth triangle collisions against the AABB tree for the avatar then

what is the best way to update the AABB tree for the avatar every timestep?

3) Is it even necessary to update? Could I just rebuild the AABB tree every frame for the Avatar? Is that a good way of doing it

or will it kill my framerate.

3) I dont intend to use OpenCL or CUDA for this. Are there any GPGPU methods for this kind of interaction

using only OpenGL?

Any help will be greatly appreciated!

Advertisement

I haven't ever done a similar topic, so this is just my gut feeling. I would say to use a simplified version of your cloth and just create an AABB from that, rather than using the full thing. For that type of interaction, you just want to detect when the contact is made, then you can switch to a more detailed calculation when it is detected.

Can you post an image of what you are trying to do? It sounds like an interesting scenario :)

edit -- misunderstood the OP

To claify a little bit:

The cloth is a general triangular mesh. The simulation is physics based using verlet integration (easily swapped).

I want to create an AABB tree for the avatar and then find collisions of the cloth vertices with the avatar and

am not interested in cloth self collision (currently).

If the avatar was static then this wouldnt be a problem and I wouldnt need to ask anything.

However the avatar is dynamic because its mesh is deformed by a skeleton using linear blend skinning.

So this means that the AABB tree I build will need to be updated or rebuilt every frame.

I want to know where I can find a good reference for updating the AABB tree or if its not even worth it for

2-4k triangles and maybe its just better to rebuild it. Is this the right approach? What are the alternatives?

Just approximate every character bone with sphere(our couple) and do bruteforce test.

http://www.iquilezles.org/www/material/breakpoint2007/breakpoint2007.htm

@kaelle_h: Thank you. I went to the link you put and got lost in a world of awesome. Apart from the cloth idea everything on that site is mindblowing.

This topic is closed to new replies.

Advertisement