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.

Program Announcements / QuickODE - Physics for DarkGDK

Author
Message
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 5th Feb 2010 16:28 Edited at: 24th Apr 2011 21:17



About QuickODE:

QuickODE is a free physics and collision library with native support for DarkGDK.
It is based on the Open Dynamics Engine.

Concept:



Current Release:

* Version: 1.01
* Date: April 24, 2011

Features:

* Rigid Body Dynamics
* Joints
* Forces and Torque

Package Contents:

* Library and header files
* Basic code sample

Latest Notes:

* QuickODE is currently in the process of a complete rewrite that started with version 1.0 and has limited features. All versions below 1.0 aren't supported anymore, but if you need help with older versions feel free to contact me.
* There is no need to include the libs manually like in previous versions. Just include QuickODE.h and make sure all files are in the right location.

Attachments

Login to view attachments
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 5th Feb 2010 21:44
Please report bugs & errors.
Comments and critics are welcome!

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 5th Feb 2010 22:53
Perfect! Great work _Pauli_ it really is useful! Will test it as soon as I can and provide some feedback! Good work again.
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 6th Feb 2010 13:59
Thank you!
I'm already developing some improvements.
Have fun.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
jeffhuys
17
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 6th Feb 2010 14:01
I'm sure a LOT of people over at DGDK will LOVE this!
Excellent!

You're the 'th to view this signature!
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 8th Feb 2010 21:12 Edited at: 8th Feb 2010 21:36
Fantastic! Testing it out now

EDIT: I'm having troubles getting it setup. I keep getting linker errors:


"So hold your head up high and know, it's not the end of the road"
Up-coming Action-Adventure game!
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 8th Feb 2010 21:40
Was just about to post about this! I compiled the ODE library but I get the same linker errors (yes, I've added the library and the headers in Tools -> Options -> VisualC++ Directories)
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 9th Feb 2010 12:00 Edited at: 9th Feb 2010 12:07
Ok, I'll have a look at it.
Samples that I use QuickODE in, compile fine for me.

You should check this:

- Set runtime to Multithreaded /MT in project properties.
- Include QuickODE.lib in additional dependencies (together with ODE this should look like this:
'QuickODE.lib ode.lib' )
- Make sure you included QuickODE.h where needed

Hope this helps & thanks for trying!

EDIT:
I'll add a properly set up project to the next release plus a walkthrough how to setup QuickODE & ODE for DarkGDK.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 9th Feb 2010 13:01
Don't know if I have the right paths to the compiled libs. After I compiled ODE I was able to compile and run the demos, that's for sure. Now, I have the following lines added to the 'lib' section in VC++ Directories:
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 9th Feb 2010 14:49
Well, not quite sure about that. I have the habit of just copying each lib I use into the Dark GDK\Lib folder, because I use Dark GDK in almost every project anyways.

Don't know if it helps,
but my setup is like this:

C:\Programs\Dark GDK\Lib\vs9\ode.lib
C:\Programs\Dark GDK\Lib\vs9\QuickODE.lib
C:\Programs\Dark GDK\Include\ode\ode.h
C:\Programs\Dark GDK\Include\QuickODE.h


Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 9th Feb 2010 17:23
^Odd, it never generates me an 'ode.lib', usually I have the following libs after compiling and building ODE:
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 9th Feb 2010 18:04
Yes, that's correct.
So then you take for example ode_singled.lib. This is the ODE Single Precision Debug Lib. Rename it to ode.lib (or change additional dependencies to ode_singled.lib) and put it where it can be found by VC++ (e.g. C:\Programs\Dark GDK\Lib ).

I knew I should have come up with a "How to setup for QuickODE" guide right from the beginning...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
zapakitul
17
Years of Service
User Offline
Joined: 1st Mar 2007
Location: In my world
Posted: 9th Feb 2010 18:27
Hm, sorry to say it, but still doesn't work... Don't know what I could be doing wrong hm....
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 9th Feb 2010 20:16 Edited at: 9th Feb 2010 20:21
No problem, I hope we can figure this out!
This is also the first time I published a library, so there must be some things gone wrong...
Others may have this problem too!

So here is the ODE Lib I use (attached).
You can try it with this, and report if it's working or not.
I wonder what could be wrong...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.

Attachments

Login to view attachments
heyufool1
15
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 9th Feb 2010 21:37
Thanks _Pauli_! Got it working with that library.

"So hold your head up high and know, it's not the end of the road"
Up-coming Action-Adventure game!
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 9th Feb 2010 22:05
Glad you got it working! I hope you like it.
Update coming soon...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 1st Mar 2010 16:50 Edited at: 1st Mar 2010 16:51
Hey Pauli, I'm having a nightmare at the moment deveoping my physics library and just thought might be able to help.

The physics obviously rotates and positions the objects for you, so you just need to set the object to the same rotation and position, in PhysX there is no easy way to get the rotation in euler angles, they are only accessible as matrices or quaternions, do you work with matrices(or quaternions) in your plugin?

If not, not to worry, if you do you may be able to help me, thanks.

_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 2nd Mar 2010 02:32
Yes sure, no problem.
This was all kind of hard to figure out and took me quite a while. But I've written a quaternion to euler function:



This converts the given Quaternion to Euler angles and saves them in a DirectX vector3.
If I remember right your using PhysX, so you will have to change a few things!
Hope this helps you!

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 2nd Mar 2010 06:21
I hope you get character controller done. ^__^
And maybe some mesh destruction to debris. That would be nice if ODE has that.

Good work.

When a person has nothing but a dream, can he dare to dream.
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 2nd Mar 2010 13:36
A character controller isn't that hard to do, I basically have one working already.
What I'm working on right now (with this project) is Ragdoll functionality and improving Raycasting.

Mesh destruction seems to be complicated, I'll have to take a look at that...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Mar 2010 16:51
Quote: "This converts the given Quaternion to Euler angles and saves them in a DirectX vector3."


Pauli, it worked, I could just kiss you, but I wont.
I spent my whole week off last week trying to get a solution to this problem and couldn't do it, you have saved my life.

I was updating my objects directly using dbSetObjectWorldMatrix(), but this caused issues as it does not update the internal data for the object(rotation, position), it is fine this way for most cases, I suspect that it is also alot quicker but if you want a camera to follow that object you would need to do it the way you have showed me.

I will probably have two update functions now, a fast one that updates the matrix directly and a special one using your function for if the user needs to know its orientation in euler angles(for camera etc).

I will do a speed comparison when I get a chance and I will let you know what the difference is, in case you are interested.

Also, am I o.k to post that function on the PhysX forum? Some people were helping me there and it would be good to show them the solution.

Thanks again.

_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 2nd Mar 2010 16:59 Edited at: 2nd Mar 2010 17:00
Quote: "but I wont"

THANKS!

Yes, as I said, it took me quite a while to figure it out! I had to go through lots of weird math sites
But I'm glad you got it working for PhysX, too.

I also tried to update my objects using rotation matrices, but couldn't get it to work! I didn't even know that dbSetObjectWorldMatrix exists, so thanks for that!
The way I use my QuaternionToEuler function is fast enough for me, didn't have issues for now...
But it would be great if you could tell me the results of your comparison!

And yes, you may post this function on the PhysX forum.
I'm glad if people can make good use of it.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Mar 2010 17:22
I just done a quick comparison and I don't really see any big difference, I will have to do a more detailed one before I decide whether to have two update functions or not, but so far so good

I also spent ages on physics/math sites and got quite a few functions that claimed to convert quat to euler but never quite worked for me, I then went down a different route of trying to create my own camera so I could update it with matrices but that was a huge can of worms lol.

haliop
User Banned
Posted: 11th Mar 2010 09:13
can this be implented to Vehicle vs Terrain?
like a car driving on a terrain?
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 11th Mar 2010 13:08
Yes sure, just add the terrain as a static mesh.
There is no such thing like a built-in vehicle controller at the moment (I'm working on it) but you could easily compose one with the available rigid body types and connect them with various joints. You can create what ever vehicle you like.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
haliop
User Banned
Posted: 11th Mar 2010 15:17
awesomeness!!
haliop
User Banned
Posted: 11th Mar 2010 16:26
cant get it to work
Multi threded Debug is on
every dll and header are in the right place as shown here
additional dependecies are like wrote here
and even the lib you gave the other poset , downloaded that

i ran the Demo
and this is wht i get , which is the same as above


hope to hear from you soon.
nadav.
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 11th Mar 2010 18:59
Ok, well...
Damn I need this stuff sorted out for everyone somehow, major problems occuring.

So I guess 'QuickODE.lib' and 'ode.lib' are in the right place?
Have you inlcuded BOTH of these libs in additional dependencies?
Have you included the header?

I'll have to take a deeper look...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
haliop
User Banned
Posted: 11th Mar 2010 19:23 Edited at: 11th Mar 2010 19:25
ofcurse
let me show you
in screenshots so you can see for yourself , maybe something is wrong but i doubt that

well , maybe its something with the installation of ODE itself
as far as i know , i did premake4.exe vs2008

then inside Visual C++ Express ive done
ReleaseSingleLib

copied the renamed the lib file but at the end used the one you uploaded which is 2.5 mb larger then what i built.

so here are the screenshots of a project containing the demo.cpp
that you published:







p.s the languge to the right is hebrew ..
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 11th Mar 2010 19:46
Quote: "the languge to the right is hebrew"


yeah I thought like "right to left reading?"
but no problem at all...

So, I think I see your mistake:

Have a look at the attached image.
You put the Libs in 'Additional Library Directories'.
See where they really belong to:
Linker > Input > Additional Dependencies

Hope that will fix your problem!

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.

Attachments

Login to view attachments
haliop
User Banned
Posted: 11th Mar 2010 19:49
hmm nice but still dosent work

alotugh now ive encouterd something i do not understand really
if it works for you and not for me its a bit wierd...

this is the error:
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 11th Mar 2010 19:56
Wow, now that sounds bad!

You are using the 'ode.lib' from one of my posts here right?
Both 'ode.lib' and 'QuickODE.lib' where built using the same compiler! I only use VS2008!

But you're using the same so I don't quite see what's the problem

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
haliop
User Banned
Posted: 11th Mar 2010 20:00 Edited at: 11th Mar 2010 20:07
hmm yeah thats why it was suprizing
ok , i will download the ODE.lib again
and the quickode again maybe download for one of the 2 was curropted


does ODE use any enviorment varible?

second edit: downloaded both again
and getting the same problem...

i have no idea what to do .. so . i'll be patient
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 11th Mar 2010 20:17
Ok, sorry I can't recompile the libs right now, because I'm a bit running out of time! Sorry for that, I will post here when I've done that.

Quote: "does ODE use any enviorment varible?"


As far as I know NOT. No additional DLL, variables, defines, or anything needed!

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 12th Mar 2010 00:23
@haliop:

I just saw that you wrote:
Quote: "Multi threded Debug is on"

in one of your posts above.
You should set it to Multithreaded (/MT) !
Maybe it works then...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
haliop
User Banned
Posted: 12th Mar 2010 06:32
chaned it but still get the same error. hmm

maybe i have not installed ODE right
can you give me a walk trough on how you did it?

btw . once its done
you can count on me ,making you a tutorial on how to set up things in order for it to work !

still dont know if i'll use images or just text i guess i'll combine them , so you can continue to work on it , while i'll make you a nice presentation on how to install it to work!

well thats if you want if ofcourse
haliop
User Banned
Posted: 13th Mar 2010 14:01
nothin yet?
haliop
User Banned
Posted: 14th Mar 2010 06:28
hi i may have an idea about the solution, i didnot checked it yet
but here is my thought ,

my GDK is updated to 7.4a latest updated
but instead of using DirectX SDK Aug 07 im using
DirectX SDK FEB 2010 , maybe that is the problem?
kklouzal
14
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 14th Mar 2010 20:53
I am curious as to who would perform better? PhysX or ODE? Are there any comparisons that have been done you could link me to? Or if you just know for a fact one is faster/more features/less buggy or if the physics are more true to life than the other?

Add me to your MSN!
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 15th Mar 2010 20:58
@haliop:
Sorry dude, I had to take the weekend off from programming! But I will get back at you in the next days, as I find time to work on QuickODE again.
But the DirectX SDK thing sounds reasonable! I hope we can figure something out together.

@kklouzal:
Yes, that's an interesting comparison! But I guess your referring to matty halewoods PhysX wrapper? I think we're both in very early stages of our wrappers, so we first have to make things more stable and reliable...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
kklouzal
14
Years of Service
User Offline
Joined: 15th May 2009
Location: Arizona
Posted: 16th Mar 2010 00:40 Edited at: 16th Mar 2010 00:42
Then we shall see!

EDIT: & I wasnt making a comparison, I was trying to find out of there have been any comparisons made

Add me to your MSN!
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 17th Mar 2010 01:28
I just finished a Vehicle Sample, that will be part of the next QuickODE release coming soon.

Check it out here.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 27th Mar 2010 00:20
Here is a small update for everyone interested in QuickODE.

First of all I have to say that I just put this together in a hurry, because I'm about to go on vacation for the next week (to end this snowboard-season in the French Alps with my buddies).
Basically this contains my QuickODE lib 0.81 (including a new sample) and a compiled version of ODE as it could be found somewhere above in this thread.
I didn't have enough time to properly compile QuickODE again, so please be patient if it doesn't work for you right now. At least it did for me so there is a chance...

When I'm back I will continue work on the promised verison 0.82 and some new samples.
As this is just a minor release, I did not update the main post, so I just attached it here.

I hope it will be useful for somebody!

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.

Attachments

Login to view attachments
LOLdaniel
14
Years of Service
User Offline
Joined: 19th Nov 2009
Location: LOLEVERYWHERE
Posted: 31st Mar 2010 02:37
this is a great library..thanks

Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 25th May 2010 23:35
Keep the good work on this. I am thinking of using this!

_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 26th May 2010 16:58
Nice, I'm glad about people actually using it!

Ok, I've had a bit of time off this (since it's working good for my needs) but I promise to be back on it soon!

Any suggestions, critics, things you want included?

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 26th May 2010 18:15
Yeah one big suggestion, ODE is wierd to install. Could u make a small PDF tutorial? Or point me to one?

_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 26th May 2010 20:58
Quote: "ODE is wierd to install. Could u make a small PDF tutorial?"

Ok, I'll try to find some time for this, since this is very important.
I wonder if it's possible to include a whole lib into another lib, that would simplify things a lot...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 30th May 2010 16:10
Yup, good luck with it.

_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 12th Jul 2010 19:54 Edited at: 12th Jul 2010 20:13
UPDATE:

Ok people, big news today! I've been working on the new QuickODE version 0.9 in the past days and it's finally ready for release.

Here are the main improvements:

- The whole physics simulation can now be easily switched to 2D mode! All movements and rotations then take place on a 2D plane (X/Y axis only) while the simulation remains consistent. This is useful for all sorts of 2D games like platformers or puzzles (this makes QuickODE comparable to Box2D for example).

- Added a 2D sample to introduce the new functionality.

- Improved users manual with additional setup instructions.

- Bug fixes...

The new version is attached to this post as well as to the first (updated) post in this thread.
Please report any bugs and issues. Comments & critics are welcome!

EDIT:
A compiled executable of the new 2D sample can be found here.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-18 03:53:22
Your offset time is: 2024-04-18 03:53:22