Search found 44 matches

by ktfh
Sun Oct 01, 2017 10:05 pm
Forum: General Bullet Physics Support and Feedback
Topic: Issue with box shapes glitching into each other
Replies: 4
Views: 5996

Re: Issue with box shapes glitching into each other

I found vehicles are best simulated with a btMultiSphereShape that approximates the body, the rounded corners glance off walls and terrain better than cubes or the more angular convex hulls.
by ktfh
Sun Aug 20, 2017 1:33 am
Forum: General Bullet Physics Support and Feedback
Topic: pybullet running headless but capturing video to a file
Replies: 1
Views: 4428

Re: pybullet running headless but capturing video to a file

Xvfb and ffmpeg? I think I've also used the xorg dummy display driver on servers with a gpu to run more demanding opengl programs headless
by ktfh
Sat Aug 05, 2017 4:10 am
Forum: General Bullet Physics Support and Feedback
Topic: Rotation of a character to alter its orientaiton
Replies: 2
Views: 4704

Re: Rotation of a character to alter its orientaiton

use btCollisionObject::setWorldTransform if you want to alter position or orientation, example:

Code: Select all

btQuaternion newrotation(0,0,0,1);
object->setWorldTransform(btTransform( newrotation, object->getWorldTransform().getOrigin()));
by ktfh
Sat May 27, 2017 3:43 pm
Forum: General Bullet Physics Support and Feedback
Topic: btBvhTriangleMeshShape and streamed 3D models
Replies: 4
Views: 13399

Re: btBvhTriangleMeshShape and streamed 3D models

To avoid fragmentation I would precalculate and serialize all the btBvhTriangleMeshShape, then use pools of fixed sized allocations equal to the largest mesh and bvh and recycle the allocation when the object is streamed out. I think the serialization format is fairly simple but you would have to wr...
by ktfh
Wed May 03, 2017 11:07 pm
Forum: General Bullet Physics Support and Feedback
Topic: Fracture Demo child Transform question
Replies: 2
Views: 4178

Re: Fracture Demo child Transform question

you probably want to grab the compound collision shape for the object and iterate over its children. if(fractureObject->getCollisionShape()->getShapeType() == COMPOUND_SHAPE_PROXYTYPE) { btCompoundShape* compoundShape = (btCompoundShape*)fractureObject->getCollisionShape(); for(int i = compoundShape...
by ktfh
Mon May 01, 2017 4:39 pm
Forum: General Bullet Physics Support and Feedback
Topic: Error when installing on Linux
Replies: 2
Views: 4844

Re: Error when installing on Linux

your probably missing xlib development headers and stuff, On ubuntu and debian "apt-get install libx11-dev"?
by ktfh
Tue Apr 25, 2017 6:10 pm
Forum: General Bullet Physics Support and Feedback
Topic: Kinematic body motion -- how to make "smooth"?
Replies: 13
Views: 12982

Re: Kinematic body motion -- how to make "smooth"?

Im not sure if this is the problem, but if you don't clear forces in your pre tick callback and have a variable frame rate the applied force can be doubled or more when frames are dropped. void preTickCallback(btDynamicsWorld *world, btScalar timeStep) { world->clearForces(); world->applyGravity(); ...
by ktfh
Sat Apr 08, 2017 3:24 pm
Forum: General Bullet Physics Support and Feedback
Topic: Running Bullet raytests in Parallel
Replies: 5
Views: 8050

Re: Running Bullet raytests in Parallel

Can you paste a full stack trace? It might help a bit. Both the crashes you described though seem to have been caused by the btDbvtNode stack being shared across threads. Compiling bullet lib with BT_THREADSAFE should have created an array of 64 stacks. Double check your compiling and linking to the...
by ktfh
Thu Apr 06, 2017 9:18 pm
Forum: General Bullet Physics Support and Feedback
Topic: Strategies for Dealing with Large, Complex Terrain
Replies: 16
Views: 36618

Re: Strategies for Dealing with Large, Complex Terrain

Really cool seeing the terrain rendering in action. I am curious whats the scale of your planet? I thought jittery floating point accuracy problems become apparent after a few dozen km, assuming 1.f = 1 meter.
by ktfh
Thu Apr 06, 2017 8:22 pm
Forum: General Bullet Physics Support and Feedback
Topic: Running Bullet raytests in Parallel
Replies: 5
Views: 8050

Re: Running Bullet raytests in Parallel

btDbvtBroadphase::rayTest isn't thread safe by default. I think you need to build bullet with BT_THREADSAFE defined, possibly some other requirements for setup. check out lunkhound's thread he implemented it all http://www.bulletphysics.org/Bullet/php ... =9&t=10232
by ktfh
Mon Mar 27, 2017 8:45 pm
Forum: General Bullet Physics Support and Feedback
Topic: btBvhTriangleMeshShape and Bullet limitations
Replies: 4
Views: 6325

Re: btBvhTriangleMeshShape and Bullet limitations

I would guess your convex primitives aabb overlaps all or most of the btBvhTriangleMeshShape even when not colliding, so all 10k triangles in overlapping volumes are being tested for collision against the primitive. A bvh would accelerate collision detection for something this complex if its scale w...
by ktfh
Mon Mar 27, 2017 5:00 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Best method for firing projectiles from camera?
Replies: 7
Views: 10593

Re: Best method for firing projectiles from camera?

still stuck on this? I think you almost had it figure out. something like this should offset and shoot your bullet forward or backward. float power = 10.f; glm::vec3 forward = glm::mat3(glm::inverse(ViewMatrix)) * glm::vec3(0,0,1); glm::vec3 origin = cameraPos + forward; glm::vec3 vel = forward * po...
by ktfh
Sun Mar 19, 2017 11:16 pm
Forum: General Bullet Physics Support and Feedback
Topic: [SOLVED] Best method for firing projectiles from camera?
Replies: 7
Views: 10593

Re: Best method for firing projectiles from camera?

Cameras tend to be represented in opengl with a view matrix and projection matrix, create a 3x3 rotation matrix or a quaternion from the view matrix and multiply that by a forward vector like (0,0,1) to get a normal that points where the camera looks. Add this to offset your rigid body's creation lo...
by ktfh
Sun Mar 19, 2017 8:46 pm
Forum: General Bullet Physics Support and Feedback
Topic: Objects with a mass of zero don't collide
Replies: 5
Views: 6846

Re: Objects with a mass of zero don't collide

You could implement this with a btGhostObject , they maintain an array of overlapping objects, I think you would still have to perform a contactPairTest for each overlapping object to get btManifoldPoint where they touch. You might also find the btKinematicCharacterController useful too http://bulle...