Advertisement Jump to content
Sign in to follow this  

How to create AABB tree for dynamic mesh?

This topic is 1657 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


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!



Share this post

Link to post
Share on other sites

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 :)

Share this post

Link to post
Share on other sites

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?

Share this post

Link to post
Share on other sites

@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.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!