3D Physics with ZgeBullet

Use of external libraries (DLLs) from ZGE.

Moderator: Moderators

User avatar
VilleK
Site Admin
Posts: 2151
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK » Fri May 30, 2014 12:55 pm

That looks very cool! Let me know if you make a video of it running, I'll post it to ZGE's YouTube channel.

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 » Wed Jun 04, 2014 8:44 pm

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:

Code: Select all

// update model position and rotation
zbtGetPosRot(BodyId, CurrentModel.Position, CurrentModel.Rotation);
Old versions of related functions were renamed to *XYZ() variants; for example:

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);
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

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 » Sat Mar 14, 2015 6:36 pm

As a consequence of Google's announcement to terminate Google Code, ZgeBullet source code repository has been moved to GitHub.

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 » Mon Jun 08, 2015 2:03 pm

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

StevenM
Posts: 149
Joined: Thu Jan 20, 2011 10:03 am

Post by StevenM » Mon Jun 08, 2015 2:09 pm

I just updated ZgeBullet library to version 2.0
Awesome!

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 » Mon Jun 08, 2015 9:39 pm

Added demo #4 for fast local AABB collision detection based on ghost objects. Download it from here.
Attachments
scr7.png
screenshot
scr7.png (42.12 KiB) Viewed 12735 times

Imerion
Posts: 198
Joined: Sun Feb 09, 2014 4:42 pm

Post by Imerion » Mon Jun 08, 2015 10:19 pm

Awesome! This will be fun to try! :D

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 » Sat Jun 27, 2015 2:20 pm

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.

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: 3D Physics with ZgeBullet

Post by Rado1 » Fri Dec 04, 2015 11:18 pm

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.

User avatar
Barefists
Posts: 17
Joined: Fri Jan 01, 2016 4:25 pm
Location: Singapore

Re: 3D Physics with ZgeBullet

Post by Barefists » Sat Jan 16, 2016 2:42 am

Hi Rado, I've come to bother you on this channel as well, haha! :)
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.

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: 3D Physics with ZgeBullet

Post by Rado1 » Sat Jan 16, 2016 5:11 pm

Barefists 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.
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- ... _Filtering

In case of further questions... just ask :)

User avatar
Barefists
Posts: 17
Joined: Fri Jan 01, 2016 4:25 pm
Location: Singapore

Re: 3D Physics with ZgeBullet

Post by Barefists » Sun Jan 17, 2016 1:27 pm

Thanks! That's really helpful! :)

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: 3D Physics with ZgeBullet

Post by Rado1 » Wed Sep 07, 2016 4:43 pm

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 :-)).

Smags
Posts: 2
Joined: Fri Apr 14, 2017 7:22 pm

Re: 3D Physics with ZgeBullet

Post by Smags » Sat Apr 15, 2017 4:37 pm

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:
Bullet_Error.png
Bullet_Error.png (26.35 KiB) Viewed 11266 times
Here is the project File:
Midi_Bullet.zgeproj
(75.16 KiB) Downloaded 253 times
BTW - thanks so much for the Bullet Physics Library - it's awesome.

User avatar
VilleK
Site Admin
Posts: 2151
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: 3D Physics with ZgeBullet

Post by VilleK » Sun Apr 16, 2017 11:02 am

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.

Post Reply