# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 4 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: Giant static forestPosted: Sun Apr 01, 2012 4:00 pm

Joined: Sun Jan 29, 2012 10:01 pm
Posts: 49
I have a giant forest with trees to collide with but just adding them as static rigid bodies gives poor performance because they are in the same broad phase as dynamic bodies.
Can I modify the height field class to return cones and other shapes from each tile in a low resolution grid?
If not, I could let the modified height field point to triangle shapes to transform per vertex but taking any shape would be more reusable.

Top

 Post subject: Re: Giant static forestPosted: Wed Apr 04, 2012 12:38 pm

Joined: Fri Dec 10, 2010 3:39 am
Posts: 15
wait, so are they all trimeshes right now?

Top

 Post subject: Re: Giant static forestPosted: Wed Apr 04, 2012 1:17 pm

Joined: Sun Jan 29, 2012 10:01 pm
Posts: 49
They are cone shapes with hand written dimensions right now. I have a list of triangles in the graphical model that I can read directly inside a collision shape but a cone shape would avoid multiplying each vertex with a transformation matrix each time they are used for collision.

My idea is to look up all shapes in the cells that overlap the query AABB and return all shapes who's AABB intersect with the dynamic body's AABB. The Query AABB is the dynamic body's world space AABB + tolerance for how much the static bodies are outside of their cells in the grid.

Top

 Post subject: Re: Giant static forestPosted: Sun Apr 22, 2012 11:48 am

Joined: Sun Jan 29, 2012 10:01 pm
Posts: 49
Now when I have my debug drawing working, I see that the reason for the bad performance is invalid calculation of world space bounding boxes. Every tree's bounding box is stretched to the center of the world so that the tree for static bodies do nothing for the speed. I don't use compound shapes for the cones and I place them at their initial locations before adding them to the world.

Edit:
Calling setInterpolationWorldTransform after calling setWorldTransform with the same transformation when placing static bodies solved the bug.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 4 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Google [Bot] and 4 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities