Page 2 of 4

Posted: Fri Feb 24, 2006 12:58 pm
by Inf0Byt3
But I would like to use Ogre engine. What about this?

http://walaber.com/?action=showitem&id=9

Could this be translated for our own needs???

Posted: Fri Feb 24, 2006 1:46 pm
by Thalius
Borrowed from Fred's ODE Code:

Code: Select all

    ; Box body is a bounding box body (more will come like sphere and capsule)
So Fred's on it .. for example with a capsule you will be able to do your wheels easly.

Currently if you want to fiddle out something id focus on the rest like the cars Body, movement, scenery and so on ( lots to trick about.. :lol: ) . Otherwise do it yourself you could probably use some hack inbetween frames aswell with a spherebody and limit its movements per frame ( hacky .. but i could imagine it could work ).

EntityPhysicBody():

Code: Select all

EntityPhysicBody(#Entity, #PB_EntityBodytype)

Bodytypes:
#PB_Entity_StaticBody 
Static body is trimesh based, so very precise

Note:
As far as i gathered static Body's are copyd in the static register where they remain in place. Due this not every vertex of all with the static colliding objects has to be compared each collision. This type is ideal for Scenery and Levelobjects that remain in place and where most precise calculations are needed. It seems this functions make use of the OGRE's internal Octree based Scenery system as even with complex models you get high fps rates.

#PB_Entity_BoxBody
Box body is a bounding box body
#PB_Entity_SphereBody
Sphere body is a sphere based body

About Walaber:
As you can see here theres a Wrapper for DBPro:
http://walaber.com/?action=showall&type=library

i could imagine if somone would want to port / write a wrapper for PB it would be usable, tho dunno what Fred's planning to implement later on yet.


As for storing Triangles in an external File ( if you want to fiddle out some yourself ). Comtois posted some nifty lil code he wrote along with an OGRE xml converter.

See here:
viewtopic.php?t=17978

Cheers,
Thalius

Posted: Fri Feb 24, 2006 1:58 pm
by Inf0Byt3
Thalius, thanks for this very usefull information.
(more will come like sphere and capsule)
Now that's cool. With this, the engine is 90% complete (at least i think so) :D
you could probably use some hack inbetween frames aswell with a spherebody and limit its movements per frame ( hacky .. but i could imagine it could work )
I thought at this, but i don't know how to limit it's moves on an axis. :( I hope Fred will release the capsule part in the next beta or the final version of PB4.0.

On the other hand, I could use Comtois's code to store the wheel's triangles, but how to make them collide with the ground plane??

Posted: Fri Feb 24, 2006 3:40 pm
by Inf0Byt3
I am now creating a wrapper for Newton. I'll post it here (if i ever) finish it.

Btw, I could use some help on making/translating some demos when the wrapper is done (my c++/DB knowledge is allmost 0) ;) Anybody wants to join?

RESOLVED!!!!
I get this error when trying to build:
viewtopic.php?t=19811

Posted: Sat Feb 25, 2006 8:38 am
by dontmailme
I was a bit dissapointed that Joints were not included in the OGRE/ODE update for PB4.

However I wanted to start playing with Physics in PB so had a look at all the wrappers available for other languages.

There is a great wrapper here http://www.lcuriel.arrakis.es/kode/index.htm

It includes a physics editor and:-

System Based on Entities
- Each Entity can have: Body, Geoms, Meshes, Joints, TriMesh
- All Ode Joints are supported (Contact Used during CallBack)
- All Ode Geoms are supported (Non Capped Cylinder via contrib)
- Can Import Meshes (So it is a World Editor too!)
- Full Support for TriMeshes
- Customizable ODE Params (steps, contacts, etc...)
- Direct Export to B3D code (Using own ODE Wrapper, i think that B+ is supported too)
- Direct Export to C++ Code (the Ode Part)
- More Support to Export if Asked.
- Suport for Hierarchy Models (must link in the Editor)
- RagDolls and Vehicles in the example library included.
- Online Library with free physics worlds for free!
- Exporter And Importer for XODE (XML - ODE format 1.0r23)

It costs 14,95 Euros and is worth every penny if you are interested in Physics and cannot wait until this functionality is in PB!

Try out the demo, all I had to do was convert the decls file to a PB include file with prototypes (can supply if u are interested!) and then change some of the Blitz code into purebasic code.

I currently have a nice Jeep which is drivable around the track in Fred's Circuit demo, which rocks!

I'll post a pic when I can, but none of the capture utilities can get a screenie for some reason, I'll have to write some code!

Oh, and if enough PB users buy this wrapper then Kurix might change the editor to output PureBasic code as well :D

Posted: Sat Feb 25, 2006 10:24 am
by Inf0Byt3
WOW, that's great. I am a bit dissapointed too. I 've downloaded ODE and looked at the functions and PB covers just a few ...
an supply if u are interested!
That would be awesome. Can you send me the source please? This would help me a lot...

BTW, if tou need any help, I could create a wrapper for ODE in no-time ;)
Thanks!

Posted: Sat Feb 25, 2006 12:01 pm
by dontmailme
Pics :D

Image

Image

and yes, the tyres roll and it has a suspension (of sorts), I'm still very much newbie at this ODE lark, but I'm hoping to get better :)

Posted: Sat Feb 25, 2006 12:05 pm
by Inf0Byt3
Wow that's cool. Nice pics!!! Can you send me the include file please? I wouldn't like to wait until this will be implemented in PB...
Great work!

Posted: Sat Feb 25, 2006 5:56 pm
by Pureabc
Great work, dontmailme, the pics are very impressive.
I have been looking for a Physics Engine to use with PB. The ODE seems very promising from your work.
Are you using the ODE dll or BlitzKODE.dll? Could you post the wrapper file?

Thanks.
:D

Posted: Sat Feb 25, 2006 5:57 pm
by Inf0Byt3
Yeah, that would be great :D :D :D
BTW, Pureabc, i could make a wrapper for ODE.dll

Posted: Sat Feb 25, 2006 6:04 pm
by Pureabc
Alex,

A wrapper for ODE.dll would be excellent!!

Thanks.

:lol:

Posted: Sat Feb 25, 2006 6:06 pm
by Inf0Byt3
Ok, i'm starting it now. But i need you to make me a favour for this :) Will you make/translate some examples for it ???

Posted: Sat Feb 25, 2006 6:24 pm
by Nik
Me wants to test drive dontmailmes example :roll:

Posted: Sat Feb 25, 2006 6:28 pm
by Inf0Byt3
That would be cool. I hope he'll release it soon :D
I tried to trick the sphere geometry collision, but no result :(. So i guess I'll have to wait until dontmailme shows us some action!!! (and of course until I finish the ODE wrapper :) ).

Posted: Sat Feb 25, 2006 6:59 pm
by DarkDragon
Image
Image
Image
Image

I haven't seen such kart-games for a while. The last I've seen was Moorhuhn Kart. They don't need much physics.

Btw.: Played on a Notebook with VIA S3 Unichrome IGP (OpenGL 1.2)

:D