I'm trying to build a custom collision shape for bullet that could handle collision on a planetary scale.
Previously i was updating a triangle mesh shape according to what my lod system was doing on screen but that proved unrelyable and bullet was slowing down to a crawl when the system pushed more the 4k triangle in the mesh.
So rightnow i'm thinking about building a custom shape for this purpose that would be built on a principle similar to the heightfield terrain but for a sphere.
So i have 6 face of data for the heightmap but i'm strugeling build the processalltriangle() function because i need to determine wich face are inside the aabb and then determining wich part of the face are within the aabb.
If anyone has ideas or papers ont he subject that could help it would be great.
Custom collision shape : Planet height field
-
- Posts: 77
- Joined: Tue Dec 27, 2011 11:51 am
-
- Posts: 20
- Joined: Fri Dec 10, 2010 3:39 am
Re: Custom collision shape : Planet height field
Unless you're talking about tiny planets, you won't be able to realistically have a heightfield that size with which to perform physics against. It'd be a better bet to have a system that loads in physics heightmap tiles in the area immediately surrounding the camera.
-
- Posts: 77
- Joined: Tue Dec 27, 2011 11:51 am
Re: Custom collision shape : Planet height field
Orriginaly i was using a heightfield based on 6 heighmap but then i rewrote my planetay renderer not i'm thinking more then more to write a function heightfield.
One that woudl build the mesh from the generating function.
One that woudl build the mesh from the generating function.