Deformation demo.

Show what you made with Bullet Physics SDK: Games, Demos, Integrations with a graphics engine, modeler or any other application
Post Reply
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Deformation demo.

Post by mi076 »

Small deformation demo, gimpact shape used.

Video: http://www.youtube.com/watch?v=oALjGVzN8v4

Download: http://code.google.com/p/game-ws/
Select deform_rXXX.7z.exe (self-extracting archive).

Usage: Run demo.exe (in "release" folder).
W,S,A,D and mouse to move.
LMB click to shoot.
F9 switch debug mode (collision triangles and points are visible in debug mode).
ESC to enter GUI / release mouse.


---------------------------
P.S. See also the attachment "HitTriangleDemo.zip" below.
Last edited by mi076 on Sat Nov 06, 2010 3:59 pm, edited 1 time in total.
ramsampath
Posts: 19
Joined: Fri Sep 05, 2008 8:54 pm

Re: Deformation demo.

Post by ramsampath »

hello,

thanks for your demo.

i am trying to use GImpact shapes with GImpact, both deforming shapes as collision shapes..., I update the positions and am calling postUpdate(), but for some reason the collision detection fails.

i was wondering what you had to do in special to get bullet to recognize collisions for deforming GImpact shapes.

thank you.
ram.
mi076
Posts: 144
Joined: Fri Aug 01, 2008 6:36 am
Location: Bonn, Germany

Re: Deformation demo.

Post by mi076 »

I use ray test :
create custom ray callback result with access to LocalShapeInfo (index, subpart id),
register Gimpact collision algorithm and create Gimpact mesh shape.
Send ray, get index, access Gimpact shape's vertex data. Process and, optionally, modify it (deform).

Attached is very very minimal Bullet-like example of above... i have posted it somewhere already... this is little updated version.
but for some reason the collision detection fails.
BTW, just an attempt to guess : may be you are using custom "contact added callback" (it has index and subpart id too, if available)? Have you set

Code: Select all

body->setCollisionFlags(body->getCollisionFlags()|btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK);
Thanks..
Attachments
HitTriangleDemo.zip
(616.07 KiB) Downloaded 1104 times
ramsampath
Posts: 19
Joined: Fri Sep 05, 2008 8:54 pm

Re: Deformation demo.

Post by ramsampath »

thank you - it seems to work.
Post Reply