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.

DarkBASIC Professional Discussion / Fun with ODE Physics

Author
Message
BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 28th Dec 2008 04:57
I have noticed the same problem with the default ODE library
that comes with DBPro.

I also rotate the static objects the opposite way just as you did,
create the ODE intance of the object, then rotate the object the right way for DBPro to display.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 28th Dec 2008 05:02 Edited at: 28th Dec 2008 05:30
I'm looking into that right now although it is a bit strange and I don't see anything out of the ordinary yet but I'm sure I can find it. I also haven't been working on this as much as I wanted to over the holiday, unfortunately it kept me busy.

Edit: Actually if it is the exact opposite I could just reverse the rotations, it seems to work when I tested it, but if it is not the exact opposite then it could be a much bigger problem.

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 28th Dec 2008 22:50
Ok there does to be a few problems with using a specific function, dRFromEulerAngles, in ODE to transform a matrix from Euler Angles. I might actually have to right my own function to transform it myself, hopefully it isn't to much above me.

In other news I fixed a problem with destroying joints and joint groups, those functions now work without crashing.

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 10th Jan 2009 08:01 Edited at: 11th Jan 2009 22:26
Whew, after a long time of struggling over this problem I think I finally got it. I wrote my own code to convert the Euler Angles dbp uses to a matrix that ode uses because the built in one used a different convention that wasn't even documented and it was also a pain to find out which direction the matrix went.

But enough of that its working and I'm happy. I put this release as rc2 so its not the final version yet, I'm having some problems with the joint feedback commands right now which I hope to fix for rc3 or the final release of 0.4 if I don't spot any other bugs. Anyway same download links which I shall post again and if you spot a bug or something tell me with broken code if you can so I can fix it...maybe.

Rar - http://teroton.com/dbpode/DBProODEDLL.rar
Zip - http://teroton.com/dbpode/DBProODEDLL.zip

Edit: Quick Update, I added in 4 new commands because I realized I didn't have them when I was making an ode demo. I also fixed the keywords file because there was a problem with that too.

After you got the update you can try out my little Ragdoll demo showing ODE + DBP handling ~60 ragdolls.

Screenshot -




Outscape
15
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 11th Jan 2009 23:37 Edited at: 11th Jan 2009 23:40
my pc cant understand
jG=ODE Find Free Joint Group()

i cant seems to get these demos compile correctly


Your sig has been erased by a mod again because it's still way taller than 600x120!
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 12th Jan 2009 00:39
Hmm...did you put the DBProODERelease.dll in your plugin-user folder and make sure to delete the DBProODEDebug.dll if you have it?

Outscape
15
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 12th Jan 2009 00:41
this fails too
Ode Create Joint Group 1


Your sig has been erased by a mod again because it's still way taller than 600x120!
Outscape
15
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 12th Jan 2009 00:48 Edited at: 12th Jan 2009 00:51
ah i didnt delete the debug one
[EDIT]
awsome stuff dude


Your sig has been erased by a mod again because it's still way taller than 600x120!
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 12th Jan 2009 00:55
Thanks, glad its working for you

jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 16th Jan 2009 03:47
Nice Job Slayer! I have been playing with physics myself - TokoMak in DarkGDK to be exact - I think you'll enjoy it as much as I enjoyed your tornado walls

http://forum.thegamecreators.com/?m=forum_view&t=143488&b=22

--Jason

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 16th Jan 2009 04:13
Thanks, seems you've done a lot with it in a pretty short time, ragdoll and vehicles. I only just recently attempted some ragdoll physics.

jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 16th Jan 2009 04:19
Yeah... I've been cramming though. You know - your joints system looks actually more intuitive than what I'm faced with to control joints... namely Quaternion Math (bleech) but... perhaps you are doing the same stuff under the hood...

I think I like your joint limit constructs better than what I'm faced with ... it's quite peculiar. The rag dolls demonstrate they work - but GOSH they are a pain to set up!

--Jason

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 16th Jan 2009 06:20
Quote: "Yeah... I've been cramming though. You know - your joints system looks actually more intuitive than what I'm faced with to control joints... namely Quaternion Math (bleech) but... perhaps you are doing the same stuff under the hood..."


I havent had to mess with Quaternion math as of yet (but ODE does have a few functions to do automatic conversions for me to matrices or back if I need to). Although having to convert Euler angles to a matrix did turn out to be more of a pain then it should of because I accidentally went through the matrix the wrong way(not enough documentation on ODEs matrices).

I'm pretty happy with the joints to although I do have a lot to add, mainly allowing more parameters to be set for joints and receiving feedback from it.

JPM_fr
16
Years of Service
User Offline
Joined: 13th Dec 2007
Location:
Posted: 17th Feb 2009 13:24
I've got a problem with the ragdoll function
Find Free Object()don't want to work

bug v107 fpsc error 8003
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 25th Apr 2009 19:53 Edited at: 25th Apr 2009 19:59
Wake up Slayer

Cylinder has a problem, it turns always to zero angle when ODE starts.

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 30th Apr 2009 03:39 Edited at: 30th Apr 2009 03:57
Sorry, I've been busy and didn't notice the thread

Quote: "I've got a problem with the ragdoll function
Find Free Object()don't want to work"


IIRC, this is part of IanM's Matrix1Utils dlls - http://forum.thegamecreators.com/?m=forum_view&t=85209&b=18. I'd download it as it is a great addition to DBP too.

Quote: "Cylinder has a problem, it turns always to zero angle when ODE starts."


Will check it out once I have time. Hopefully I have time to program over the weekend.

Edit: Ok maybe I couldn't resist a quick update.

I just uploaded the dll(in a rar) with the updated command, also because I haven't touched this project since January I don't know if I broke anything so report any bugs you find.

Attachments

Login to view attachments
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 2nd May 2009 18:13
Fine, cylinders turn now as they should... but there is still something wrong in cylinders body. They slide when they should spin. They act more like a cube. And sometimes they are hanging in the air (little over the ground).

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 2nd May 2009 23:13
Hmm...must be the way they are handled. Lee made the function and the way he made it was using a cube and a sphere which is probably why it works like that. I'll see what I can do to make it work more like a cylinder.

toggy
18
Years of Service
User Offline
Joined: 6th Jun 2005
Location: Serbia
Posted: 4th May 2009 04:23 Edited at: 4th May 2009 04:24
@ Juso
If you add some friction and a mass to cylinders they start to spin,but it`s bugy...



@ Slayer Nice work man!
I use Newton, but I like the simplicity in ODE!
Keep going!

Nik
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 5th May 2009 16:55
@Toggy
Yep, when adding friction and mass you clearly see how the body acts something between a cube and a sphere, like a rounded cube
toggy
18
Years of Service
User Offline
Joined: 6th Jun 2005
Location: Serbia
Posted: 5th May 2009 21:50
Yeah,I see that...
Well that is a simplification of collision checking in order to get faster response from engine and to define a body with less vertex points,I suppose...
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 6th May 2009 03:44
It seems the reason Lee used a cube and sphere to create a crude Cylinder was because at the time there was no Cylinder to Trimesh collision or Trimesh to Trimesh collision(according to his note). However after a quick google it seems they fixed that recently so I switched it back to using the Cylinder class instead.

Hope this works more to your liking Juso (not exactly quick spinning in your demo but it doesn't act like a rounded cube ).

Attachments

Login to view attachments
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 6th May 2009 19:11 Edited at: 6th May 2009 19:11
Sorry Slayer, but even there is some different behaviour with the new dll but its no better... or can someone with different mass and friction settings get the cylinders act better?
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 7th May 2009 04:44
Well I'll see what I can find out about cylinders and look at some of the ODE demos however I might be a bit busy for a while (I'll try to squeeze in some development time).

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 7th May 2009 14:45
No need to rush, take your time and take some or
z i l c h vortex
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: united kingdom
Posted: 7th May 2009 21:11 Edited at: 8th May 2009 18:42
Is this still being upgraded or is it not being updated anymore.

life is short but so am i
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 May 2009 17:55
Could you release the latest source,I wanted to add the code for grabbing the DBO objects limbs,I will make it available to all.

Thanks



Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 18th May 2009 04:39
Quote: "Could you release the latest source,I wanted to add the code for grabbing the DBO objects limbs,I will make it available to all."


Here you go.

Attachments

Login to view attachments
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 May 2009 16:59
Thanks I'll post back here when I get changes made, with an example




Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 28th May 2009 14:00
@ Slayer, why your ODE dll needs d3dx9_35.dll? Therefore people need to update Directx August -08 version, DBPro needs only Oct -06 version.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 10th Jun 2009 01:45
Sorry I haven't checked this out in a while. I was using the DirectX August SDK for DGDK too. Although I can download the Oct 06 version and recompile it, there shouldn't be any problems with that.

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 18th Jun 2009 05:31
A finally got a big update with a huge bug fix and a nice new feature too .

First off I compiled it with the Oct '06 SDK just like DBP is.

Next, while testing new features I found out I was returning floats wrong and so all the commands returning floats were effectively messed up, which should now be corrected. Let me know if you find any problems with it though.

I have also changed some of the parameter names, those that said angle I changed to anum because of how misleading saying angle can be .

Last, but best of all (I think) is the addition of the raycasting commands. Pretty simple to use and you will be able to find the position of the rayhit along with the normals and depth.

My quick tech demo showing it off.



Enjoy.

Attachments

Login to view attachments
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 18th Jun 2009 08:16
i think i'll be using this plugin in my games because of how powerful it is in its simplicity.

which is a big deal because i'm one of those people who was thinking of writing his own collision plugin instead of even using sparky's.


Remember those old guys? They made epic renders, I think one of them was called DaVinci, and all they used was MS Paint. Sometimes it's just skill....
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 23rd Jun 2009 21:58
Thanks, if you have any problems or notice any bugs feel free to post it here too

Oh and I forgot to mention on the topic of cylinders, I doubt I'll be able to do anything for it as this is the way it was made in ODE.

The next things on my todo list are

-The Heightfield geom which will let have collisions with terrain by giving a heightmap and a few parameters.
-Test out the joint feedback commands more to hopefully make breakable joints work
-I might also add in a few extra secret things, its a secret partly because if my ideas don't work then no one will know about it

Aguilae
14
Years of Service
User Offline
Joined: 24th Jun 2009
Location:
Posted: 24th Jun 2009 20:15
Hi Slayer, could you release also the updated source?, there might still be something odd?
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 24th Jun 2009 21:10
i can't get it to work ;_;

my dynamic box falls right through the static one




Remember those old guys? They made epic renders, I think one of them was called DaVinci, and all they used was MS Paint. Sometimes it's just skill....
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 24th Jun 2009 23:30
Quote: "Hi Slayer, could you release also the updated source?, there might still be something odd?"


It is attached to the post, could you also tell me what problems you noticed so I can try to fix them.

Quote: "i can't get it to work ;_;

my dynamic box falls right through the static one"


That seems to be a bit weird. I guess it must be because of the size of the objects. If the first object is bigger or the second smaller it would work. I'll see why that happens though.

Attachments

Login to view attachments
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 25th Jun 2009 01:11
i got it working




Remember those old guys? They made epic renders, I think one of them was called DaVinci, and all they used was MS Paint. Sometimes it's just skill....
Mummy Killer
15
Years of Service
User Offline
Joined: 4th Oct 2008
Location: Slovenia
Posted: 26th Jun 2009 12:48
cool

Mummy Killer
djbneben
17
Years of Service
User Offline
Joined: 6th Jan 2007
Location:
Posted: 23rd Sep 2009 23:47
hi,
I would like to use ODE for my game (VC++), so I took the last "dbpode.rar", then I put the folder in the directory. I installed ODE (ode.org), then added directories "include" option in VC++. I added "DBProODERelease.lib" in the options then the DLL "DBProODERelease.dll" in directories of my game. the game run but I have an exception when it is in ligne "ODE_Start ()".
Where is the problem?

.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 24th Sep 2009 02:55
Hi, this dll was made for dbpro and it needs dbpro to run even if you did call the commands from the dll. If you want to use it with VC++ then I would use ode directly.

djbneben
17
Years of Service
User Offline
Joined: 6th Jan 2007
Location:
Posted: 24th Sep 2009 14:06
ok, but I have used this method to an old program with version v0.3, and it works good (with the DLL DBPro!)! I just want to make a program with the latest version of DBPode, but that does not work !

it is easier to use this DLL that pass directly through ODE, that's why I did it!

Thx

.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Sep 2009 18:53
Perhaps its easier to code - and that might be ideal for you. However I might try going directly to ODE for the advantage in speed alone by eliminating a "middle layer".

It may or may not be significant enough to matter for your needs, but in my projects, I need to save every clock cycle I can or I start running into performance issues.

--Jason

djbneben
17
Years of Service
User Offline
Joined: 6th Jan 2007
Location:
Posted: 24th Sep 2009 19:10
Hmmm I would see if I have time to get into ODE, but for now I'm runing DBPode, I just set everything to zero and it's good!

Jason, can you show me with "ODE" how do you translate this code?



.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.

Attachments

Login to view attachments
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 25th Sep 2009 04:56
Well, I also doubt how well you can use the dll in c++ because I control the objects in dbpro directly from the dll. This means it needs the globstruct pointer from dbp, something you can't really supply from c++, and if you don't have this it would render most functions pretty useless.

Are you using DGDK? Just wondering because I may try and write a quick guide to get ode to work in dgdk but haven't since I didn't think many people want to use ode. Though if I did I wouldn't expect it anytime soon I've been short on time since summer ended.

jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th Sep 2009 05:14
I totally understand the no time thing. I have been busy with work and I haven't personally been able to do any game stuff lately though some doing work in my company have (lucky folks).

I wish I could have a summer break just to code whatever I wanted...ahh... I'm trying to get there! LOL

--Jason

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 29th Sep 2009 04:49 Edited at: 29th Sep 2009 04:57
Quote: "I totally understand the no time thing. I have been busy with work and I haven't personally been able to do any game stuff lately though some doing work in my company have (lucky folks).

I wish I could have a summer break just to code whatever I wanted...ahh... I'm trying to get there! LOL"


Yeah, ever since I got a job in the summer I've been to tired to work if I had time.

But I've suddenly felt some motivation to work so I got a nice little update for you all(v5.0 rc 1).

First, sorry, but since I got a new computer I hadn't installed the DX 9.0 Oct 06 SDK but the Aug 07 so you will need the Aug 07 runtime for this which I'm sure most of you have. Next update I'll be sure to compile it with the Oct 06 SDK.

I've fixed a few bugs, one in attach joints so now it allows a 0 in the objects parameters. This means you can either attach an object to the static environment or detach objects from the joint(basic method to break joints). I've also fixed a small bug in Ode Get Joint Body to return the correct value when their is no body.

I also took the time to look at the Plane2D joint and fixed that so you'll be able to use it. I've also made a little demo, nothing exciting, to show it works.



Last, I've put in the Joint Param Functions (check this if you want to use it - http://opende.sourceforge.net/wiki/index.php/Manual_%28Joint_Types_and_Functions%29#Stops_and_motor_parameters ). A list of the functions (untested) -



For a list of params check the link and scroll down to the yellow table; the params go in order starting from 1.

I have also rearranged my site so the download is now at - http://teroton.com/downloads/DBProODEDLL.rar, which I will attempt to keep updated. As for the source I've decided to keep that on an svn respository so if you want it then use this url - http://svn.xp-dev.com/svn/SlyOdeWrapper/trunk/. Keeping it on an SVN just makes it easier for me to update it.

I'm also currently working on a joint feedback/breakable joint demo so you should expect that soon.

Edit: Eh might as well give you a little taste of breakable joints, current wip demo ;p



djbneben
17
Years of Service
User Offline
Joined: 6th Jan 2007
Location:
Posted: 2nd Oct 2009 20:32
Slayer93, can you make a little help of your commands ?

Thx

.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 3rd Oct 2009 00:36
Quote: "Slayer93, can you make a little help of your commands ?"


If you mean documentation, then I have been working on it a bit, but I can never really get myself to sit down and do it. Terrible of me I know, but I'll see if I can get myself to do it someday.

For now if you have questions about any of the commands ask me here and I'll try to help

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 Nov 2009 17:26
Slayer93 I would like to build the source myself,Ive been having a little trouble. Can you give us info on how your building the ODE verision that you are using or give the files that you built so we can build the source as well.My goal would be to add code for an objects limbs.

Custom,intel,2.4GHz,1024mb,ATI X1500 256mb,

The coffee is lovely dark and deep,and I have code to write before I sleep,and I have code to write before I sleep.

Login to post a reply

Server time is: 2024-05-07 14:18:57
Your offset time is: 2024-05-07 14:18:57