Newton 2.0: the power of compound collision!

Share with us how are you using the powerrrr of the force

Moderator: Alain

Newton 2.0: the power of compound collision!

Postby JernejL » Sun Sep 28, 2008 10:21 am

Newton 2.0 compound collision are a excellent way to simulate concave object shapes, and it works great for spaceships, the simulation is done in single precision newton world:
http://www.youtube.com/watch?v=m25rkDDKhw0

This works great and fast for space simulation since most of the time AABB boxes are separated apart and when a rare and unfortunate collision event occurs the response works the way players would expect.

Ship sizes:
excalibur (the ship driven around): 16.84 units across bounding box
space station (DS9): 55.49 units
orange ship (hutet): 16.27 units

I used john ratcliff's approximate convex decomposition code to decompose the objects to convex hulls since currently there is no useful free alternative to his library

Each object there except the planet has 100 to 300 individual collision pieces in the compound collision to reprisent the shape of the object.

example closeup of a object compound collision (it's not perfect but it is as good as ratcliff's code can make it without manually slicing it up):
Image
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0: the power of compound collision!

Postby Julio Jerez » Wed Oct 01, 2008 9:20 am

wow I did no see this one.

are you usn doubles for such big worlds?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Newton 2.0: the power of compound collision!

Postby JernejL » Wed Oct 01, 2008 3:03 pm

No, this is all singles, and i did not do much testing on how far can the ships go, but i assume i could easily have a whole solar system..
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0: the power of compound collision!

Postby Phantom » Wed Oct 01, 2008 10:47 pm

Hi Delfi,
Where can I get john ratcliff's approximate convex decomposition code from?
I have tried googling and found his blog sites, etc. but I haven't noticed any links to actual binary or source code...

EDIT: never mind, I think I found it at this site: http://www.amillionpixels.us/sourcecode.htm

BTW, are you the same Delfi who is on the http://www.pascalgamedevelopment.com web site? :)

cheers,
Paul
User avatar
Phantom
 
Posts: 9
Joined: Sun Oct 30, 2005 10:28 pm
Location: Hobart, Tasmania, Australia

Re: Newton 2.0: the power of compound collision!

Postby JernejL » Thu Oct 02, 2008 6:01 am

Phantom wrote:BTW, are you the same Delfi who is on the http://www.pascalgamedevelopment.com web site? :)


Yes that's me, guilty as charged :D

Btw, if you want it, i have built a DLL version of his library with some modifications that still loads obj-like files and outputs just hull vertex clouds, which i can use in newton to build compound collisions. this is useful if you have a model preprocessing app like this game uses.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0: the power of compound collision!

Postby Phantom » Thu Oct 02, 2008 6:33 pm

Delfi wrote:
Phantom wrote:BTW, are you the same Delfi who is on the http://www.pascalgamedevelopment.com web site? :)


Yes that's me, guilty as charged :D

Btw, if you want it, i have built a DLL version of his library with some modifications that still loads obj-like files and outputs just hull vertex clouds, which i can use in newton to build compound collisions. this is useful if you have a model preprocessing app like this game uses.


LOL :) I'm easy to pickout from both sites due to my mug shot!

I'm sure the DLL would be handy for me at some point, thanks :-)

cheers,
Paul
User avatar
Phantom
 
Posts: 9
Joined: Sun Oct 30, 2005 10:28 pm
Location: Hobart, Tasmania, Australia

Re: Newton 2.0: the power of compound collision!

Postby Leadwerks » Thu Oct 02, 2008 8:55 pm

If you use my Phygen tool in the dev forum, you can just make that shape out of an OBJ mesh and the tool will convert it to a serialized collision shape.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Newton 2.0: the power of compound collision!

Postby Phantom » Thu Oct 02, 2008 9:18 pm

Leadwerks wrote:If you use my Phygen tool in the dev forum, you can just make that shape out of an OBJ mesh and the tool will convert it to a serialized collision shape.


Neat! Thanks Leadwerks :-)

Erm, maybe this is a "stupid question (tm)" ;-) but where do I find the dev forum?
cheers,
Paul
User avatar
Phantom
 
Posts: 9
Joined: Sun Oct 30, 2005 10:28 pm
Location: Hobart, Tasmania, Australia

Re: Newton 2.0: the power of compound collision!

Postby Leadwerks » Fri Oct 03, 2008 12:43 am

The Newton 2.0 forum.
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Re: Newton 2.0: the power of compound collision!

Postby JernejL » Fri Oct 03, 2008 3:20 am

Leadwerks wrote:If you use my Phygen tool in the dev forum, you can just make that shape out of an OBJ mesh and the tool will convert it to a serialized collision shape.


I thought you used same code from john ratchliff in your tool as well, at least parameter settings looked very very similar and they both use .obj input..
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0: the power of compound collision!

Postby BigM » Sat Jan 03, 2009 8:52 pm

Hi there Delfi,

I was thinking compound collision would be a great addition to the newton 2.0 wrapper for the 3D Gamestudio lite-c scripting language (made by VeT, http://tinyurl.com/6l7y9v). Can you share your DLL?

In the case of lite-c, models are created in Conitec's .mdl format. During runtime one can iterate through all the vertices and extract a vertex cloud from there. My question is: if I load a concave model, and create a concave vertex cloud from there, will I be able to create a compound collision using your DLL?

Many thanks
BigM
 
Posts: 1
Joined: Sun Oct 08, 2006 9:07 pm
Location: Lisbon, Portugal

Re: Newton 2.0: the power of compound collision!

Postby JernejL » Sat Jan 03, 2009 11:04 pm

Once you have a vertex CLOUD it is impossible to find out the shape again.

The dll is here: http://mathpudding.com/temp/extconvex.rar

But it only takes .obj input.. which means it uses files and stuff like that.

the rar has a dll, example app with dll function declaration and sample .obj included, it generates .bch files which start with a uint32 vertex count followed by vertex3f vertices which make up the hull which repeat until EOF.

I suggest you use the original source: http://www.amillionpixels.us/sourcecode.htm and make your custom library.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1578
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Newton 2.0: the power of compound collision!

Postby VeT » Tue Feb 03, 2009 3:12 pm

hi BigM
i made my compounds to the contest, but forget to include it :mrgreen:
now that works again in v16

http://www.opserver.de/ubb7/ubbthreads. ... 70&page=15
1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy
LiteC+Newton2 download: http://hosted.filefront.com/NeArGa
LiteC+Newton2 discussion: http://tinyurl.com/6l7y9v
VeT
 
Posts: 84
Joined: Thu Jul 31, 2008 11:31 am

Re: Newton 2.0: the power of compound collision!

Postby smallping » Thu Jul 01, 2010 3:50 pm

To Delfi:

I am a new beginner using newton dynamics.

And I want to use compound collision, so I must use convex decomposition for my concave models.

My models are *.obj file format coming from CAD system.

I read your articles about this as the following, but I donnot know how to use your DLL.

Can you give me an example about how to use it ?

My email is : goodglxpj@hotmail.com

Thank you very much.
smallping
 
Posts: 4
Joined: Fri Jun 25, 2010 1:47 pm


Return to User Gallery

Who is online

Users browsing this forum: No registered users and 20 guests

cron