Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Bullet Physics Library Wrapper for DBPro

Author
Message
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 18th Nov 2013 00:08 Edited at: 24th Apr 2015 16:40


Bullet Physics Library 2.82-r2704 Wrapper for DBPro

If you're unfamiliar with Bullet Physics Library check out this link.

http://bulletphysics.org/wordpress/

It is used in movies, games, Blender, and Maya.
We are making a game engine and decided to use Bullet as our physics engine.
It will be wrapped into one dll. You will not have to include a dll with your exe.
We are creating a clean code base so it can be updated with newer versions of Bullet easily.
We have rebuilt the Bullet library to use double precision; it will provide better accuracy for large scale areas in DBPro.
We have coded the dll to handle a "Lost Device" in DBPro, all DBpro resources are managed.

01/06/2014
Ragdoll video Uploaded

02/01/2014
Updated to Bullet Physics Version 2.82-r2704
Added Kinematic Character Controller

02/28/2014
Added a max velocity check for all dynamic objects.
Added Constant Collision Detection Motion Clamping
to prevent "tunneling" of fast small objects.

03/24/2014
Added a CSG Boolean clipping algorithm to the Voronoi fracture.

03/26/2014
Added CSG Union, Intersection, Difference commands

01/26/2015
Added debug drawer for collision shapes and constraints
Added the V-HACD Library for convex decomposition of complex objects.
Added creation of compound objects.

04/18/2015
Released New Alpha version with Convex Hull Decomposition Demo

04/23/2015
Released New Alpha version with Fracture Demo for Destruction Physics.

http://www.stabinthedarksoftware.com/forumdemos/BulletPhysicsWrapper042315.zip




Updated the list of Commands
Features wrapped




[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 18th Nov 2013 00:08 Edited at: 9th Apr 2014 22:28
This is a early test of the Voronoi Fracture.
This can be used to make walls that can be destroyed by fracturing
in real time.



Update on the Voronoi Fracture Features
It can be fractured on 3 different axis.



Updated Voronoi Fracture, We can now fracture complex geometry.



Destruction using Fixed Constraint Joint



[b]Ragdoll Working With Animated Model



[b]CSG Boolean Operations Commands




WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 18th Nov 2013 00:09 Edited at: 9th May 2015 23:00
Ragdoll and Ray Casting




Convex Hull Decomposition



Character Controller To Ragdoll



Alpha Release Demo





Fracture Demo(Destruction Physics)



Added command for fracturing limbs



WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Kezzla
15
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 18th Nov 2013 19:34
that fracturing looks really cool! a very promising looking project. I am watching this one. great work.

Burn retina, burn!
seppgirty
FPSC Developer
14
Years of Service
User Offline
Joined: 3rd Jul 2009
Location: pittsburgh, pa.
Posted: 19th Nov 2013 00:39
This is way beyond me but looks really good. Keep it up!!

gamer, lover, filmmaker
MrValentine
AGK Backer
13
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Nov 2013 04:40
Just tagging in...

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 19th Nov 2013 21:06 Edited at: 19th Nov 2013 21:10
When I saw the fracture algorithm in Bullet I thought this would make a great destruction feature in DBPro.
I wanted something like the Apex destruction in NVIDIA Physics.
We first tried to wrap Newton Physics which had a fracture algorithm but the cohesion was to slow.
Newton Physics had fallen behind in there development so we switched to Bullet.
Some of the math got a little tricky but luckily my son has the Computer Science Degree. We both work on this project together.
Thanks for the encouragement it is motivating.

I have posted a new video showing the voronoi Fracture features.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 3rd Dec 2013 02:57
@Stab in the Dark software

breaking things in games is good

breaking things out side of games can be good ;o) :oP

umm any chance this could expanded to cloth tearing ?

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 3rd Dec 2013 03:09
@Stab in the Dark software

forgot anther one

Liquids

Dark Physics one the rout to do much better than it was
then it just stopped short

you could not pick the color of the liquid
but the c++ version that Nvida release gave the option

all the other physics engines have take care of objects but
only up to a certain point

the computers have gotten much better in the last 4 years
now it's time to max things out ;o)

I spent $1400 on a laptop last year to make games with
and since c++ or like it is beyond me

DBP is my best option and with a new physics addition
I can achieve what I want

to move side ways - is to move forward
Since a Strait line gets thin fast
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 4th Jan 2014 00:40 Edited at: 4th Jan 2014 00:41
This project got delayed a little.
Just a quick update to prevent this post from getting locked.
We had a ram failure on our main machine.
Another project that pays the bills had to take priority.
The holidays and a couple of snowstorms also delayed it.

Quote: "umm any chance this could expanded to cloth tearing ?"


Yes Bullet does have tearing cloth.
I have not wrapped those functions yet.

I have been working on rag doll. I will have a video soon.
I am working on being able to create the ragdoll at any frame of animation,
then have it go ragdoll with the force applied from the impact.
My goal is to setup rag doll so it is very easy to design
a custom rag doll for any model. We have a ragdoll editor in
development.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 7th Jan 2014 01:33 Edited at: 8th Jan 2014 20:15
New video uploaded showing ragdoll working.
We finally figured out all the crazy rotations between Bullet and
DBPro.

We can now stop at any frame of animation and create the ragdoll.
One more thing to code for the ragdoll is dividing up the mass of the
ragdoll components based on the weight you set for your model and the volume of the capsules.

01/07/2013
Edit: Finished the code for setting the models weight. It now calculates the mass based on the weight and volume of the ragdoll bones.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 13th Jan 2014 21:01
@ Stab in the Dark software,

Looks really good - when are you releasing the plugin and what is the price tag? ....

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 14th Jan 2014 19:56
Quote: "Looks really good - when are you releasing the plugin and what is the price tag? ...."


We are not exactly sure when it would be ready for release.
We have a solid base done, so now it is only a matter of building on it.
Yesterday we built a dynamic character controller; we plan to also add a kinematic character controller.
When we first started prototyping we were not accounting for a scale so we had to do a little rewrite to implement scale.
For example when using a FPSC model it is about 72 units tall, based on that you could say that the model is 72" or 6ft tall.
We can then pass this into the plugin and it scales the Bullet physics world to match. Any unit of measure can be used.
This method is better than increasing the gravity to get accurate physics results.
We have not really thought about price yet. Our original plans were to wrap bullet physics to be used in our game engine.
We have a game engine editor in development that is also a dll, which is hooked up to a base game engine that you can build on.
The game engine editor will have a physics designer that will use the Bullet Wrapper. The game engine editor will help design custom
ragdolls to work with any model. Some people will not want to use our engine or editor so we will release the physics wrapper separately.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 22nd Jan 2014 00:06
@Stab in the Dark software

if "Bullet Physics "

gives me the option the other "Physics engines" did not then
you can put me down for buying it


liquids is one that was not complete in "Dark Physics"
you could not change the color and it seemed the math for it
needed more refining

it was nearly there

also cloth needed more added to it

i had seen one example dun with just the basic commands of dbp
but with my limited skill set i was at a loss to to use it

to move side ways - is to move forward
Since a Strait line gets thin fast
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 1st Feb 2014 15:33 Edited at: 1st Feb 2014 17:39
Quote: "if "Bullet Physics " gives me the option the other "Physics engines" did not then"


All physics engines will probably give you much the same options.
We chose to wrap Bullet for DBPro because we were not happy with the way
the other physics engines were done for DBPro.

"Newton Physics" and "ODE Physics" had become obsolete.
"Dark Physics" was dependent on a NVIDIA graphics card to run fast.

I guess this is why Lee chose "Bullet Physics" for "FPSC Reloaded" as well.


Quote: "liquids is one that was not complete in "Dark Physics""


Bullet Physics does not have liquid physics.
Since Bullet Physics is open source I researched what it would take to add liquids.
Real time liquids can be simulated by Bullet Physics with the addition of Smoothed-particle hydrodynamics code.
Unfortunately it is computationally demanding and would not run in real time in DBPro.


Our goal is to get Bullet to perform well with DBPro and be simple to use.

Here is an update on progress so far.

1.Physics will run at the same speed regardless of frame rate, this is handled by the dll.

2.Ragdoll can be used for any model with bones. The model will not have to made in any special way.
Ragdoll parts made out of capsules for smoother ragdoll physics.
Simple setup or fully customizable bones and joints.

3.Destruction physics, Voronoi fracture of most convex hull shapes.
Fracture on three separate axis, or all three together.
All fractured pieces are low poly DBPro objects.
Auto UV texturing of the shattered pieces.
Physics joint holds the pieces together until enough force is applied.

4.Kinematic Character Controller which stays in sync with physics.
Controller can fully interact with all physics objects, static, rigid and kinematic.
Auto detects size of model for controller creation.
Stair climbing, and slope detection.

P.S. WOW! We made the December Newsletter. We consider it an honor.
I guess this means we will have to finish this project.LOL

http://www.thegamecreators.com/pages/newsletters/newsletter_issue_130.html



[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 1st Feb 2014 17:31
@Stab in the Dark software

i see your point
liquids dose take up a lot more cpu and gpu time
than if it was just a few objects

liquids need thousands of object to give
the look i would after

it occurred to me that using mutable objects
that know how they are to deal with each other
the effect i am looking for could be achieved

and with the help of

Dark Occlusion & Dark Imposter
with Bullet Physics

i could chive the intend look

i know there is till a bit of math to put in place but
with the 3 of them talking with each other then i would be set
and so would others

to move side ways - is to move forward
Since a Strait line gets thin fast
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 28th Feb 2014 20:48
We have been working on some performance enhancements.
We have added the ability to limit objects to a max velocity.
We have thoroughly tested limiting velocities and are satisfied with the performance.
We do not want objects moving so fast that they are not on screen long enough to be seen.
With the ability to set a max velocity for each object it is easy to simulate a sheet of paper falling compared to
a bowling ball.
The next problem we tackled is "tunneling". This is when objects are moving too fast that they move past the point in
one physics simulation step that a collision detection would be done.
The results are objects passing through another object, and small objects compound the problem because they do
not have to move as fast to move their overall size in one simulation step.
We have solved this problem by implementing constant collision detection motion clamping.
Basically it turns on constant collision detection when an object moves at a speed at which it would tunnel.
We have thoroughly test CCD motion clamping and are satisfied with the performance.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 25th Mar 2014 04:35 Edited at: 25th Mar 2014 04:37
New Feature !!!!

The Voronoi fracture in Bullet Physics was limited to convex approximations of the original object and did not preserve the UV data.
In the process of trying to find an efficient method for UV mapping the Convex hull shards we made a huge advancement with our Voronoi fracture feature.
We found the best way to preserve the UV data was to use a CSG algorithm to clip the convex hull shards to the original object.
The next hurdle was to auto UV map the interior faces of the shards. We were able to do this with a DirectX UV mapping tool.

The result is we are now able to fracture most complex objects.

We posted a video showing the results.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Barry Pythagoras
10
Years of Service
User Offline
Joined: 14th Mar 2014
Location:
Posted: 28th Mar 2014 15:32
It looks great! The ragdoll seems to lose it's mapping. Is there a demo to try?
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 29th Mar 2014 13:06
This is excellent! I tried again and again to write a Bullet wrapper for DBPro, but failed because I was far too inexperienced back then. Of course these days I could do in a shot, but I don't have the time with my current AppGameKit project and my planned DBPro project.

Loving the voronoi fractures!

Will be following this project - if the price is reasonable I may consider it over Dark Dynamix for my future (big) DBPro project

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 31st Mar 2014 19:46
Barry Pythagoras

We are working on getting a Demo ready.
The ragdoll is not loosing its UV mapping. Those are capsules that make up the ragdoll bone structure. The capsules are only visible for demonstration.

Clonkex
We found Bullet lacking in documentation which has made it difficult but it is open source so we really can't complain.
The CSG is not part of Bullet we added that algorithm, which has produced good results.

Quote: "
Will be following this project - if the price is reasonable I may consider it over Dark Dynamix for my future (big) DBPro project "


Thank you, We will try and finish ASAP.

Posted new video of fractured objects using the fixed constraint joint.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 1st Apr 2014 01:55
Good work! I'd be interested in getting this plugin too!

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 2nd Apr 2014 09:12
Quote: "We found Bullet lacking in documentation"


Ah yes, it is. That was one of the things that got me stuck when I started implementing joints in my wrapper.

Quote: "The CSG is not part of Bullet we added that algorithm, which has produced good results."


If you could add standard CSG commands to the plugin as separate commands purely for CSG-ing objects without physics, that would be great! I've wanted good CSG commands a few times in DBPro

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 9th Apr 2014 22:25 Edited at: 9th Apr 2014 22:31
Quote: "If you could add standard CSG commands to the plugin as separate commands purely for CSG-ing objects without physics, that would be great! I've wanted good CSG commands a few times in DBPro "


We have already added the new CSG commands so they can be used separately from the physics.
The original CSG commands in DBPro never seemed to work right.

The new commands are Union, Intersection, A minus B, B Minus A.
The Boolean operations keep all the original UV data and Normals.
We create a new object with two limbs so you can have both textures on the one object.
Just uploaded a video showing the CSG in action. See Videos in first post.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 10th Apr 2014 03:09
Quote: "We have already added the new CSG commands so they can be used separately from the physics. "


Awesome! That's probably enough for me to buy it already!

Quote: "The original CSG commands in DBPro never seemed to work right."


Indeed they did not. I think from my tests ages ago I decided they were added purely for FPSCx9, and both objects had to be unrotated boxes, with object 1 being positioned at 0,0,0. So...a bit limited.

Quote: "We create a new object with two limbs so you can have both textures on the one object."


This is PERFECT! Excellent work, guys!

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th Apr 2014 14:09
Looking forward to seeing this finished - and for sale.

I've often wanted to use the DBPro CSG commands but have never been able to get them to work in a consistent and reliable manner which is a shame.

Your solution looks very promising indeed and I hope to buy it.



Powered by Free Banners
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 16th Apr 2014 22:39 Edited at: 16th Apr 2014 22:42
Quote: "Looking forward to seeing this finished - and for sale. "


While you are waiting here is a Demo of the new CSG commands.
There are several objects included to test with, but you can try your own objects.
One important requirement is that the objects can not have intersecting geometry.
Objects with intersecting geometry will prevent the CSG algorithm from closing holes.

Download directly from our website

http://www.stabinthedarksoftware.com/forumdemos/DBProCSGDemo.zip


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 30th Apr 2014 22:09
Try our object fracture Demo.
There are several objects included to test with, but you can try your own objects.
Objects should be solid with no holes for best results.
All feedback is appreciated.

Download directly from our website

http://www.stabinthedarksoftware.com/forumdemos/DBProFractureDemo.zip

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
GreenDixy
15
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 2nd May 2014 20:03
#1 When will this be released? #2 Are you able to adjust the strength of objects, So when you fracture them takes alot longer for them to break, And have smaller chunks.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 3rd May 2014 06:09
Quote: "#1 When will this be released?"


We are finalizing a beta release.
Based on our current development progress we should have a release in the next few weeks.


Quote: "#2 Are you able to adjust the strength of objects, So when you fracture them takes alot longer for them to break, And have smaller chunks."


Yes, you can adjust the cohesion between the shards and increase the number of pieces so objects take longer to break apart.

[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
swissolo
14
Years of Service
User Offline
Joined: 9th Jan 2010
Location:
Posted: 26th May 2014 20:12
This makes me want to use DBPro again Those are some pretty awesome results. Unfortunately, I can see the little seams in the pieces of fracturable objects Also, is there a way to pre-render and load fracturable objects?

Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 17th Jun 2014 10:57 Edited at: 17th Jun 2014 11:04
Quote: "Also, is there a way to pre-render and load fracturable objects?"


There would be, I assume.

EDIT: Hmm, that doesn't make any sense unless you read it the right way. What I meant is: There is, in all likelihood.

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 17th Jul 2014 05:57 Edited at: 17th Jul 2014 06:02
We have finished ragdoll and ray casting. Here is an example of how it can be used in a game.
The first part of the video shows a spike gun example. The second shows a regular gun. We will be releasing a demo soon.




[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 17th Jul 2014 18:00
Niiiiice! Looks like Source Engine ragdolls, which, coming from me, is a huge compliment Very stable, clean motion

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 18th Jul 2014 18:20
Thank you Clonkex
Our goal was to get a good looking ragdoll that is easy to set up for any model.
You can ragdoll from any frame of animation.
Using ragdoll physics helps because you can reduce the total frames of animation your model has by eliminating the die animations.
With a smaller total frames of animation your model will load faster and take less memory.


[img][/img]


WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Jan 2015 16:48
Unlock attempt...

I am the one who knocks...
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 11th Jan 2015 19:09
I forgot about this

to move side ways - is to move forward
Since a Strait line gets thin fast
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 15th Jan 2015 23:06 Edited at: 15th Jan 2015 23:08
This project is still being actively developed. It was a little delayed by some other projects which had higher priority.
I am currently finishing the collision shapes. As Bullet Physics Library is open source it has bugs that do not always show up in their demos.
I finally crushed the bug in the character controller which was not even a working Bullet demo. I copied some code from an Oger example,
to add to the character controller the ability to push dynamic objects. It took me longer than it should have to discover that Bullet was
ignoring an internally set flag and was having a collision with the ghost object that is used by the character controller. I am glad I caught this
bug because it will not haunt me when I set up triggers. I have the visual draw debugger completely finished which is nice to be able to see
the physics objects, constraints, and contact points. I am also using D3D in the dll to draw text with the debug information to the screen.
I need to figure out what is the best way to handle concave objects. In Bullet there is a GIMPACT shape which can create a dynamic triangle mesh shape.
After thorough testing I have determined it has too much instability to be practical for game physics. I am going to use instead the
HACD (Hierarchical Approximate Convex Decomposition) library.

http://kmamou.blogspot.com/2011/10/hacd-hierarchical-approximate-convex.html


This works well for complex objects that have concavities. However in some cases it creates too many convex hulls to
describe an object that has a large cavity (e.g. dumpster). It is better to manually decide on how many convex hulls should be
used to create the physics shape. I am adding a command that will take the DBpro object and create a convex hull for each limb
of the object and combine them into compound physics shape. My next post will have the results of testing this.
Here is a screen shot of the debug drawer in action.



WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 27th Jan 2015 04:59 Edited at: 27th Jan 2015 15:26
After thorough testing of the HACD (Hierarchical Approximate Convex Decomposition) library, it did not produce the results I wanted.
The good news is that Khaled Mamou wrote another library called V-HACD(Volumetric Hierarchical Approximate Convex Decomposition).

http://kmamou.blogspot.ca/2014/12/v-hacd-20-vs-hacd.html

I have finished coding the addition of the V-HACD library and testing shows great results. We now have the ability to automatically break down
a high poly complex object into low poly convex hulls that accurately describes the object. We could manually break down the object in a modeling
program which would be more accurate. However most people do not have the ability to create collisions shapes for all their objects manually.
The V-HACD library takes time to calculate the results so this is not something we would do at runtime. I am adding the ability to save out the results to
a bullet collision shape file which can be loaded at runtime. I have also added a debug shape drawer to be able to visualize the bullet collision shapes.
I use directx to draw on top of the DBPro rendering, since this is only used for debug purposes we do not want to create DBPro objects.

This image shows the collision shapes for the object in the
second screen shot. The dumpster object is good example because it
has a lot of concavity.

[img][/img]

[img][/img]

WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 27th Jan 2015 07:36
Quote: "After thorough testing of the HACD (Hierarchical Approximate Convex Decomposition) library, it did not produce the results I wanted.
The good news is that Khaled Mamou wrote another library called V-HACD(Volumetric Hierarchical Approximate Convex Decomposition)."


Really? Awesome! Having used Bullet before, I knew the HACD library didn't always produce great results, but I didn't know V-HACD existed! That's great news for you, I should think

Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 27th Jan 2015 19:28
Yes it is great news. My goal from the beginning has been to wrap Bullet so it is simple to use in DBPro.
The V-HACD library automates one of the most difficult problems when using a physics engine for 3d games.
After some more tweaking of the parameters I have gotten even better results.

[img][/img]

For those of you that use Blender, Alain Ducharme created a plug-in that uses V-HACD.

http://kmamou.blogspot.com/2014/12/v-hacd-blender-add-on-by-alain-ducharme.html

WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 27th Jan 2015 23:52
@Stab in the Dark software

so for every object with similar types a file will need to be created
beforehand ?

i guess on the object some of the files it will create will vary in size and time to load ?

on the getting the info part for each file will it need specs from
the user or will it be simple load a object and save the data for it ?

to move side ways - is to move forward
Since a Strait line gets thin fast
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 1st Feb 2015 15:59
Quote: "so for every object with similar types a file will need to be created
beforehand ?"

Not for every object only the objects that are concave and need to be decomposed into convex hulls.

Quote: "i guess on the object some of the files it will create will vary in size and time to load ?"


Yes, but the files an average will be very small(14kb).
Load time is negligible since the files are binary and loaded by the DLL.

Quote: "on the getting the info part for each file will it need specs from
the user or will it be simple load a object and save the data for it ?"


You will need to adjust some of the parameters for each object to get the best results.
Then it will be a simple load and save.
The more I test it the more I am impressed with the results.

I have added a progress bar for the VHACD computer and the ability to cancel out.
A very complex object may take several minutes to calculate.

WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 1st Feb 2015 22:01
@Stab in the Dark software

thanks

in my case with the laptop i have it should be only a few second per item

to move side ways - is to move forward
Since a Strait line gets thin fast
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 20th Mar 2015 22:52 Edited at: 20th Mar 2015 22:59
This is a short video about the V-HACD algorithm that is now fully implemented in the Wrapper.



WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 23rd Mar 2015 19:43
@Stab in the Dark software

That will help expand options for a game ;o)

now if this could be incorporated into AppGameKit 2
then android games will be more realistic

to move side ways - is to move forward
Since a Strait line gets thin fast
Clonkex
Forum Vice President
13
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 27th Mar 2015 01:14
@Stab in the Dark software

would it be possible to post a test program that
i could run on my computer to get a better of idea
how my system would do on the calculation ?

to move side ways - is to move forward
Since a Strait line gets thin fast
Naesa
18
Years of Service
User Offline
Joined: 21st Dec 2005
Location: Sweden
Posted: 29th Mar 2015 18:08
Really cool! I would love to see how this engine would handle character controllers
Stab in the Dark software
Valued Member
21
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 30th Mar 2015 05:12
Quote: "would it be possible to post a test program that
i could run on my computer to get a better of idea
how my system would do on the calculation ?"


I am currently working on a demo.

Quote: "Really cool! I would love to see how this engine would handle character controllers "


I already have character controllers working.
I will make a video now.

WindowsXP SP3,Vista,Windows 7 SP1, DBpro v7.7RC7
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.

Login to post a reply

Server time is: 2024-03-28 11:51:23
Your offset time is: 2024-03-28 11:51:23