3D Physics with ZgeBullet
Moderator: Moderators
ZgeBullet has been updated to version 1.3 which provides simpler setting of position and rotation for simulated objects/models. Now, you can write simply:
Old versions of related functions were renamed to *XYZ() variants; for example:
All demos were reworked to the new library version and next ZGE beta/release will contain it as well.
Downloads are available at: http://googledrive.com/host/0BxwfQ8la88 ... FkycjcxM0k
Code: Select all
// update model position and rotation
zbtGetPosRot(BodyId, CurrentModel.Position, CurrentModel.Rotation);
Code: Select all
// update model position and rotation
zbtGetPositionXYZ(BodyId, CurrentModel.Position.X, CurrentModel.Position.Y, CurrentModel.Position.Z);
zbtGetRotationXYZ(BodyId, CurrentModel.Rotation.X, CurrentModel.Rotation.Y, CurrentModel.Rotation.Z);
Downloads are available at: http://googledrive.com/host/0BxwfQ8la88 ... FkycjcxM0k
I just updated ZgeBullet library to version 2.0. The main changes are:
- updated to the latest Bullet version - bullet3-2.83.5,
- new Ghost object, Kinematic character controller, and a few new constraints,
- API uses xptr to Bullet objects (collision shapes, collision objects, constraints, etc.) instead of previously used integer identifiers,
- some old functions changed signatures,
- several optimizations in function implementations,
- added Doxygen documentation; compiled to .chm help file,
- DLL compiled with Visual Studio 2013
- etc.
See the detailed change log here.
Download from here.
Consequences:
- better performance (e.g., 1000 active and interacting physical objects are rendered with ca. 60-70 fps on i7-3630QM 2.4GHz + AMD FirePro M2000)
- backward API incompatibility
- updated to the latest Bullet version - bullet3-2.83.5,
- new Ghost object, Kinematic character controller, and a few new constraints,
- API uses xptr to Bullet objects (collision shapes, collision objects, constraints, etc.) instead of previously used integer identifiers,
- some old functions changed signatures,
- several optimizations in function implementations,
- added Doxygen documentation; compiled to .chm help file,
- DLL compiled with Visual Studio 2013
- etc.
See the detailed change log here.
Download from here.
Consequences:
- better performance (e.g., 1000 active and interacting physical objects are rendered with ca. 60-70 fps on i7-3630QM 2.4GHz + AMD FirePro M2000)
- backward API incompatibility
During preparing new physics-based effects for FL-Studio Visualizer, I updated ZgeBullet to v2.1. The main features are:
- Support for multiple simultaneous world simulations.
- Functions for setting position and rotation of rigid body.
- Fixed setting of rotations.
Full version history see here. Win 32+64 DLLs, ARM shared libraries, help file, ZGE external library file, and demos download from here.
- Support for multiple simultaneous world simulations.
- Functions for setting position and rotation of rigid body.
- Fixed setting of rotations.
Full version history see here. Win 32+64 DLLs, ARM shared libraries, help file, ZGE external library file, and demos download from here.
Re: 3D Physics with ZgeBullet
As part of preparing a "technology" for my new physic-based 3d space flying game I updated also ZgeBulet to version 2.3. The main motivation was to improve and fix rotations and to use Bullet's internal quaternion coputations instead of having this math in ZGE expressions. Thanks to this, ZgeBullet provides quite comfortable means to simply implement movement of an object (airplane or spaceship) in 3D space.
See the version history for details. Download ZgeBullet v2.3 from here. All "official" ZgeBullet demos and FL physic-based effects work. It has already been pushed to ZGE git repo, so next beta release of ZGE should have it included as a built-in external library.
See the version history for details. Download ZgeBullet v2.3 from here. All "official" ZgeBullet demos and FL physic-based effects work. It has already been pushed to ZGE git repo, so next beta release of ZGE should have it included as a built-in external library.
Re: 3D Physics with ZgeBullet
Hi Rado, I've come to bother you on this channel as well, haha! ![Smile :)](./images/smilies/icon_smile.gif)
Is there a way to do collision masking? I'm trying to do a raytest on one particular rigid body to see where I hit it, ignoring all other bodies.
![Smile :)](./images/smilies/icon_smile.gif)
Is there a way to do collision masking? I'm trying to do a raytest on one particular rigid body to see where I hit it, ignoring all other bodies.
Re: 3D Physics with ZgeBullet
Collision detection of objects can be filtered by setting object's group and mask (zbtSetCollisionFilterGroupAndMask). Masking was not working for "normal" raycasting (zbtRayTest), but I today added a new function zbtRayTestFiltered which allows filtering for raycast; simply set group and mask for ray to be collided only with objects for which the filtering matches. Just download the 2.4 Beta version of the library from here and see the help file for function descriptions. To understand collision detection filtering better, you can see e.g. http://www.bulletphysics.org/mediawiki- ... _FilteringBarefists wrote:Is there a way to do collision masking? I'm trying to do a raytest on one particular rigid body to see where I hit it, ignoring all other bodies.
In case of further questions... just ask
![Smile :)](./images/smilies/icon_smile.gif)
Re: 3D Physics with ZgeBullet
Thanks! That's really helpful! ![Smile :)](./images/smilies/icon_smile.gif)
![Smile :)](./images/smilies/icon_smile.gif)
Re: 3D Physics with ZgeBullet
I just released next official version of ZgeBullet 2.4 for win32, 64-bit, and Android ARM. You can download it from GitHub.
I was testing v2.4 Beta for longer time on my projects and there were no problems with it. Release 2.4 contains no additions to Beta, except it is compiled against the latest official release of the Bullet library with latest VS2015 and Android NDK (therefore it is little bit larger
).
I was testing v2.4 Beta for longer time on my projects and there were no problems with it. Release 2.4 contains no additions to Beta, except it is compiled against the latest official release of the Bullet library with latest VS2015 and Android NDK (therefore it is little bit larger
![Smile :-)](./images/smilies/icon_smile.gif)
Re: 3D Physics with ZgeBullet
Rado, I'm working on a midi event triggered bullet physics project that runs in FL Studio. This uses an FL Studio midi out channel to convert midi input in to projectile spheres based on the note and the velocity of the note. Sometimes it works fine and sometimes it doesn't:
[youtube]https://www.youtube.com/watch?v=4rTpLMLczF8[/youtube]
I'm getting an error and some other weird thing is that my bullet physics effect interacts with your bullet physics effects in FL Studio, like they a sharing the same physics world on separate layers. Your bullet physic effects in FL Studio don't have issues like this, so I'm doing something wrong - but I can't figure it out. It's a stubborn error. Sometimes a PC restart doesn't even fix it. Odd thing is sometimes it does start working again.
Here is the error: Here is the project File: BTW - thanks so much for the Bullet Physics Library - it's awesome.
[youtube]https://www.youtube.com/watch?v=4rTpLMLczF8[/youtube]
I'm getting an error and some other weird thing is that my bullet physics effect interacts with your bullet physics effects in FL Studio, like they a sharing the same physics world on separate layers. Your bullet physic effects in FL Studio don't have issues like this, so I'm doing something wrong - but I can't figure it out. It's a stubborn error. Sometimes a PC restart doesn't even fix it. Odd thing is sometimes it does start working again.
Here is the error: Here is the project File: BTW - thanks so much for the Bullet Physics Library - it's awesome.
Re: 3D Physics with ZgeBullet
Cool stuff Smags! If you can't get it working and Rado1 can't help then please report this problem on the ZgeViz forums later and I will take a look.