Page 3 of 3

Re: CarSuspensionDemo and tank movement

Posted: Thu Sep 26, 2013 9:43 pm
by Norbo
after Space.Update completed, so that next "physics" frame will react to the change?
Yes, or if you're using Space.Update(dt), perhaps at the end of a timestep since multiple timesteps can occur in each call to Space.Update(dt), unlike with Space.Update().

You could use the Space.EndOfTimeStepUpdateables.Finishing event as a notification of the end of a time step if you're using the Space.Update(dt) variant.
What will happen to entities after joint would brake - will them retain any momentum they had on the time of the break?
Removing/turning off the constraint just means that, during the next update, that particular constraint will not constrain motion anymore. Everything else continues as normal. Connected entities won't freeze or anything weird, so yes, they will retain momentum.

Re: CarSuspensionDemo and tank movement

Posted: Thu Sep 26, 2013 11:07 pm
by sergiusz308
Great.

I'm building content exporter from DCC tool to support in-game engine creation of the bepu entities. DCC physics engine by default uses convex shape, even if it could be box, cylinder or any other primitive type. I understand that convexhull entity in general is more expensive to simulate, but do you think it'd make differences for a such simple entities like box to use convexhulls instead?

Is it feasible to use Triangle entity to simulate multiple particles? I.e. to use triangle entities to compute all the movement and then game engine will use their world transforms to "replace" them with desired 3d models?

I'd like to simulate simple object distruction - have a box and after detecting required impulse aplied to the entity replace it with a several other objects, that will simulate broken pieces with some initial impulses aplied to them - do you support such a situation?

Re: CarSuspensionDemo and tank movement

Posted: Thu Sep 26, 2013 11:25 pm
by Norbo
I understand that convexhull entity in general is more expensive to simulate, but do you think it'd make differences for a such simple entities like box to use convexhulls instead?
Depends on the simulation. Best way to know is to try out a sample simulation to see how it behaves and performs.

When it comes to tooling, I generally prefer biting the bullet and supporting the physics types directly. While a Box might behave and perform similarly to a boxy ConvexHull, the same is not true of spheres, capsules, cylinders and other rounded shapes. The direct primitives will have a significant advantage.

Is it feasible to use Triangle entity to simulate multiple particles? I.e. to use triangle entities to compute all the movement and then game engine will use their world transforms to "replace" them with desired 3d models?
I'm not clear on what the goal is, but spheres would likely work out a lot better than triangles for particles specifically.
I'd like to simulate simple object distruction - have a box and after detecting required impulse aplied to the entity replace it with a several other objects, that will simulate broken pieces with some initial impulses aplied to them - do you support such a situation?
Replacing a box with a set of debris entities will work perfectly fine. This isn't specific to destruction, but it gets the job done simply.

The only explicit support for destruction-like behavior is the CompoundHelper, which is used to split compound bodies. It was used by an unreleased implementation of stress-based destructibility for a game prototype. I intended to eventually release the destructibility bits, but I just haven't gotten around to it. It probably won't show up any time soon since it will require some effort to clean up and generalize. It can definitely be done, though :)