Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


How to add a building into bullet physics world?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 Medo3337   Members   -  Reputation: 680

Like
0Likes
Like

Posted 14 November 2012 - 05:06 PM

I have made a complicated building in 3Ds Max and looking to load it into bullet physics, which collision shape should I be using to load the building mesh?

The mesh will be LPD3DXMESH.

Sponsor:

#2 Krohm   Crossbones+   -  Reputation: 3245

Like
0Likes
Like

Posted 15 November 2012 - 03:28 AM

btBvhTriangleMeshShape. But I recommend building a set of simple hulls instead (it has been that way for ages and it appears to work faster for me).

#3 Medo3337   Members   -  Reputation: 680

Like
0Likes
Like

Posted 15 November 2012 - 05:43 AM

I tried btBvhTriangleMeshShape, it's not working, I see that other meshes are intersecting with the building.

#4 Krohm   Crossbones+   -  Reputation: 3245

Like
0Likes
Like

Posted 15 November 2012 - 07:04 AM

What other meshes?

#5 Medo3337   Members   -  Reputation: 680

Like
1Likes
Like

Posted 15 November 2012 - 01:31 PM

Other meshes include terrain (btBvhTriangleMeshShape), btConvexHull to load .x file box, etc...

Edited by Medo3337, 15 November 2012 - 01:34 PM.


#6 Krohm   Crossbones+   -  Reputation: 3245

Like
0Likes
Like

Posted 17 November 2012 - 02:34 AM

I mean: how do you create them?
Of course nobody expects terrain to be moved away... or perhaps it should?

#7 Medo3337   Members   -  Reputation: 680

Like
0Likes
Like

Posted 18 November 2012 - 04:17 AM

The terrain will not be moving, so it's mass is set to zero and I'm using one single terrain and trying to setup a building over it.

#8 argeze   Members   -  Reputation: 127

Like
1Likes
Like

Posted 22 November 2012 - 03:25 PM

The terrain will not be moving, so it's mass is set to zero and I'm using one single terrain and trying to setup a building over it.


You terrain having 0 mass is a static object. So an object which do not move and allow other dynamic bodies to interact with.

If your building should also not move, then it should probably also be a static object, so a btRigidBody with also 0 mass. But you need to place that building yourself on a position in the world. So of course, depending where you place it, the terrain might intersect with it and this is perfectly fine. Static objects can intersect each other and won't affect the simulation.

Just make sure you do not place dynamic objects at initial position that intersect with static ones.

SO just build the shape of the building with simple shape for starting like the btBoxShape, then set the mass to 0 and create a btRigidBody with it.
Add it to the world at the position you want the building to be in the world and you are set.

Edited by argeze, 22 November 2012 - 03:30 PM.


#9 Medo3337   Members   -  Reputation: 680

Like
1Likes
Like

Posted 25 November 2012 - 01:33 PM

@xexuxjy: Should the whole building be one single mesh even if the building is more than one floor (including the ladder)?

If I have 3-4 floors building for example, there will be a marble ladder like in the following photo:
Posted Image


How do I make the characters be able to move over the marble ladder?




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS