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
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 13th Oct 2008 09:17 Edited at: 31st Dec 2009 04:12
Here is an update ODE wrapper. I have been updating a version Raven had and made it compatible with the latest SVN source of ODE and VSC++ 2008. It is also free and open-source.

What's New -
I've been adding plenty of new things to the ODE wrapper which is now over 200 commands. The original wrapper only had ~70-80 commands.



Update Log -



ToDo List -

- Fix and test all commands because I was to lazy to do it the first time.
- Documentation!

- Plane Geom - v0.5
- Capsule Geom - v0.5

- Heightfield Geom - v0.6
- Convex Geom(maybe) - v0.6
- Body Torque and force - v0.6

- Offset Geom - v0.7
- Collide Bitfields -v0.7
- Utility Functions e.g. dBodyGetRelPointXXX - v0.7

- Body Damping - v0.8
- World Damping - v0.8
- Body Kinematics - v0.8
- Get Functions e.g Get Mass/Length - v0.8

- Get ODE Wrapper to work with DBC(maybe)/DGDK - v0.9
- Update Trimesh/heightfield geoms (instead of delete/recreate) - v0.9

- Add multiple geoms to one body - v1.0
- Message Errors(maybe) - v1.0
- Multithreading(maybe) - v1.0

** Beyond v1.0? **
- Built-in Vehicles
- Save/Load Ode States
- Composite Objects
- Spaces

Examples -

Ragdoll -


Downloads -

ODE VC++ Project and DBPro DLL
SVN - http://svn.xp-dev.com/svn/SlyOdeWrapper/trunk/

Just DBPro DLL
Rar - http://teroton.com/downloads/DBProODEDLL.rar

Feel free to ask any questions, post bugs, and have fun!
Don't forget to show what you do with ODE in here . I'll also try to keep the first post up to date with whats new in ODE.

Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 13th Oct 2008 19:24
Wow I can't believe I missed this . I'm a noob when it comes to physics so there's not much I could do here but I'm sure someone will find this very useful (especially if they haven't bought Dark Physics).

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 13th Oct 2008 20:30 Edited at: 13th Oct 2008 20:31
I'm no wiz at physics either but ODE does make it easy. If you look at my example you just have to setup your objects and ode update will do everything else for you.

But since there isn't any documentation I guess I should explain how to create joints.

Just to note you can't link joints to static objects, only dynamic objects.

Ok, once you create all your objects that you need for the joints you have to create a joint group. Basically a joint group is a bunch of joints, although they don't have to be linked together it should be on the same set of objects because when you want to delete joints you have to delete whole joint groups.

Next you have to create the type of joint you want which you put into a joint group.

Once you do that you have to attach objects to the joints. You use ode attach joint to do it.

Last thing you have to do is setup the type of joint so it works correctly. On the hinge , ball-n-socket, and slider joints you set where the joint is with the anchor commands. The axis commands tells ODE which way the joint can move (the Ball-n-socket doesn't have one because it can move in all directions). The set fixed command remembers the relative position and rotation to keep it the same.

So once thats all set up you can apply forces, throw objects at it and it should work fine, all you have to do is call ode update.

Oh and if anyone finds a problem with a command don't forget to tell me so I can try to fix it.

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 15th Oct 2008 18:06 Edited at: 15th Oct 2008 18:07
@Sly...

What DBPro version it needs? I tried in two different comps (1.063 and 1.069). Both crashed. Could you send an exe?

I think last DBProODEDebug.dll which did run in all machines was Mike's (TGC-team) dll in november 06.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 16th Oct 2008 02:08
Quote: "What DBPro version it needs? I tried in two different comps (1.063 and 1.069). Both crashed. Could you send an exe?"


Weird, just tested it on my laptop (it has 6.9, my desktop has 7.0 beta 5) and they both worked. Is there any error message you could tell or show me? Could you also check if you have a duplicate ODE.dll in either your plugins-licensed, or maybe your plugins folder?

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 16th Oct 2008 19:26 Edited at: 16th Oct 2008 19:26
I checked all folders: plugins, plugins-licensed, plugins-user

It stops running immediatelly without any messages both when compiling with F6 and when running exe (made with F4).
I try it later today in my laptop and install 6.9.

So does this work in all other comps than in mine? Testers wanted!
trogdor
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Portsmouth, VA, USA
Posted: 16th Oct 2008 21:21 Edited at: 16th Oct 2008 21:47
I get a crash while compile when debug on 7.0 beta9 on Radeon HD 2400 Pro, WinXP Pro. If just F5 then the generated app crashes.

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

Attachments

Login to view attachments
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 17th Oct 2008 04:13 Edited at: 17th Oct 2008 04:17
This is weird, I've uploaded an exe that test ode so if you guys can try that to see if it works for you. Could you guys also try using just ode start to see if its from the beginning or just a certain command. Really weird that it seems to work only for me right now.

Thanks for the help

Edit: Almost forgot the exe

Attachments

Login to view attachments
coolgames
18
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 17th Oct 2008 04:31
I started editing the ODE dll a while back. People were experiencing these crashes when I was doing it. Good luck!
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 17th Oct 2008 05:45
Quote: "when compiling with F6 and when running exe (made with F4)"
do you mean "compiling with F5 and when running exe with F6" or are you using an IDE other than the default or codesurge?
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 17th Oct 2008 12:03 Edited at: 17th Oct 2008 12:04
I'm using default ide, same result with F4, F5 and F6.

Slayer's exe crashed in every machihe I tryed.

Should Mike tell how he compiled the original dll ?!

I think ODE is very very useful cause its so tiny, about 0.5 megs (Ageia is 50 megs), so it should get far more attention on these forums.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 18th Oct 2008 05:48
Quote: "Slayer's exe crashed in every machihe I tryed."


Hmm...a long shot but do you have Visual C++ Express on your computer? if you don't try to download this version I compiled in release and see if it works (make sure you delete the debug dll). Long shot but worth a shot

Attachments

Login to view attachments
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 18th Oct 2008 16:44
No VC++ on my comp so I tried but no progress, it stops even if there is only "ode start" in source.

What if there is something wrong in the way you make that dll? Can you make a dll without any ode commands, a dll with only "hello world" -text or something simple? I think this is worth of experiments
trogdor
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Portsmouth, VA, USA
Posted: 18th Oct 2008 18:21
@Slayer93
I tried your exe demo at work on 6 XP, 1 Vista, and 1 Win 2000, and crashed right away on all the work ones. I installed VC++ redist dlls but did not help.

your posted EXE works only on my home computer. I dont know whats on my home machine that runs the demo.

After shooting few balls on the plank I usually get
Error - Object number not found : 11
Then crash.

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 18th Oct 2008 21:44
I'll try to compile the dlls different ways when I get back to my dev computer later, this is a bit wierd though.


Quote: "After shooting few balls on the plank I usually get
Error - Object number not found : 11
Then crash."


Don't worry about that I messed something up in the demo

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 19th Oct 2008 12:35
@trogdor
Those office comps may not have enough fresh DX9.

@Sly
In my laptop demo doesnt do anything, no messages, no program window, only rustle on hard disk
trogdor
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Portsmouth, VA, USA
Posted: 20th Oct 2008 18:12
@Juso
The office systems have latest DX9. I run other DBP apps no problem.

@Sly
on windows 2000 I got this error "MSVCR90D.dll is not found" Could that be it?

I've installed VC++ redist dlls but that was not one of them.

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.

Attachments

Login to view attachments
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 20th Oct 2008 18:58
Yes, those msvcr**.dll and also md5.dll and mfc71.dll have caused trouble for years. I have those in dbpro\compiler folder

My version is msvcr71.dll
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 21st Oct 2008 04:55
Sorry I haven't fixed the problem yet.

Quote: "on windows 2000 I got this error "MSVCR90D.dll is not found" Could that be it? "


I compiled it with MDd runtime which does require that dll but Juso has it so I don't think that is the problem that it crashes.

I'm a bit busy but will try to work with it tomorrow.

Have either of you tried to compile the demo with the released version of the dll as I didn't see you guys mention it.

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 21st Oct 2008 13:07
@Sly

You mean "DBProODERelease.dll", it didnt change anything as I earlier mentioned (18th Oct).
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 22nd Oct 2008 00:20
Oh just making sure

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 28th Oct 2008 05:54 Edited at: 29th Oct 2008 02:43
Ok, I think I got it working, after a bunch of googling to find out how to compile it redownload it here -


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

Hope it works

Edit: Fixed these links

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 28th Oct 2008 14:14
Page not found
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 28th Oct 2008 14:46 Edited at: 29th Oct 2008 02:42
Sorry, try this

http://teroton.com/dbpode/DBProODEDLL.rar

Edit: Changed it so there is no space in the name, now you can actually click it

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 28th Oct 2008 17:01
It works, It really works
I tested two comps with 6.3 and 7.1.
Congratulations Sly !
trogdor
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: Portsmouth, VA, USA
Posted: 28th Oct 2008 20:10
confirmed here as well.
Demo works 6.9, and 7.1b4

If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 29th Oct 2008 01:06
Awesome, now after two weeks of trying to get this to work I can finally update it. And to all interested in the source, I'll release an update this weekend.

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 2nd Nov 2008 04:01 Edited at: 2nd Nov 2008 04:02
Update!

Ok well I've added in a few get commands so you can get joint feedback, anchor and axis position for all joints. I have also added in Universal Joints and Hinge2 Joints. All this puts 141 commands into the plugin so far, nearly half of them are the new joint commands. And with that I added in a small keywords file (doesn't tell the parameters just highlights the keywords).

Next on my to do list is...
* Make a Demo showing off some cool physics thing
* Add in PR, PU, Piston, Angular Motor, Linear Motor, and Plane 2D Joints
* Make some really basic documentation to start people off

Same download links as above and all the commands are in the read-me which will shortly be added to my website.

Edit: I forgot to mention I also uploaded the new source which also has the same filename, if anyone wants to look at it.

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 2nd Nov 2008 11:30 Edited at: 2nd Nov 2008 12:16
Great progress Sly

Could you also check some strange behaviour in ODE ?
When ODE is running it seems to reserve memory about 1 meg per second or 100 megs per minute. In few minutes it fills all memory! You can watch this 'countdown' in your Windows Task manager -> Performance -> Physical Memory.

In my other comp (with dual 2 core) it takes only 10 megs per minute so its not so alarming but strange anyway. ODE is obviously piling a stack and dont release it enough?
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 15th Nov 2008 09:25
Not sure how to solve the problem right now sorry. It seems it is coming from ODE Update and it is coming from a step function in the ODE library so I don't think there is much I can do to fix it but I'll try some different versions to see if I get different results. Thanks for telling me though because I would have never noticed it.


On a totally seperate note here is a demo I made with ODE. At first I tried to build a wall with joints but it didn't pan out so well (fell down most of the time) so for fun I put an angular velocity on all of them and it sort of creates a cool tornado effect.



Screenshot attached of what it looks like although it compresses pretty quickly.

Attachments

Login to view attachments
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 16th Nov 2008 14:51 Edited at: 16th Nov 2008 14:57
@Slayer

You should use box as a ground (not plain) like this:

Make Object box 1,200,10,200
`Xrotate Object 1,90

and you should add mass and friction to each object like this:

Ode Set Body Mass tempobj,20
Ode Set Contact Fdir1 tempobj,50

and for some strange reason object's any dimension cant be less than 7
So "Make Object Box tempobj,2,10,2"
should be something like:

"Make Object Box tempobj,20,100,20" (easiest way is to multiply all dimensions with 10)

and posion object .... changes accordingly too.

And maybe 10 rows of objects is too much. The structure collapses for its own weight.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 16th Nov 2008 19:41
I still have a lot to learn about ODE apparently, anyways thanks for the help Juso. Here is an update incase anyone wants to see what I actually had in mind for this demo. Anyway I'll be updating some more stuff in ODE hopefully by next weekend.



Math89
20
Years of Service
User Offline
Joined: 23rd Jan 2004
Location: UK
Posted: 16th Nov 2008 20:55
I am making a DBPro physics library for ODE using your DLL. Until now, I have made a few setup commands for an easier initialisation and some force fields effects.

The project is attached, if you are interested.

Attachments

Login to view attachments
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 17th Nov 2008 00:20
Really cool Math89, love the force fields you did. Can't wait to see what else you can do and if you have any problems or bugs let me know, same for everyone else who is using this too, because I want to make ODE a much better plugin for DBP.

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 18th Nov 2008 09:46
And here is first rag doll with ODE:

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 23rd Nov 2008 02:45
Awesome job Juso, I've been wanting to see a Ragdoll demo with ODE (partially why I have been updating the ODE wrapper too).

I also found out why the memory usage for ODE keeps on rising after looking into it more. It wasn't actually a memory leak or a fault with ODE. It seems Lee put made it add in all the collision messages each update on the callback and the only way to clear it was to retrieve the messages using ODE COLLISION GET MESSAGE. So if you didn't use that command it would never clear the messages resulting in a steady rise in Memory Usage. But it is also not enough to just call it once because one message only contains data for one collision and there can be plenty of bodies colliding each update. So you would have to make sure you get all the messages and it can be somewhat useless if your not even using the collision data.

Basically, I added four new commands for messages to make it easier.

Ode Enable Messages - turns back on collision messages
Ode Disable Messages - ode update won't add messages for you to get
Ode Get Number of Messages() - retrieves the number of messages
ODE Clear Messages - deletes all messages

If you use Ode Disable Messages you can't use any of the message commands (they will either crash or not work, obviously).

If you don't want to Disable Messages, you could enable them at any time though, you could use ODE Clear Messages, which clears all messages that haven't been read.

Then there is ODE Get Number of Messages(), I might shorten the name later because that's a mouthful, which can gets the number of collision messages. Really I use this to test how many messages where left but since it could serve some use I left it in there instead of removing it.

But that's not all I added. I was able to add in Angular Joints, all the commands for angular joints are in the read-me. The bad news about this though would be how PR, PU, Linear Motor, Piston, and 2D Plane joints don't seem to be in the ODE lib that I have, I though I had the latest one besides the SVN because it is a snapshot, but that doesn't seem to be the case or they haven't added in those joints and the Wiki lied to me.

So I'll be adding those when I update if it has the commands otherwise I'll be updating some other stuff for ODE. Maybe more on the collision system of ODE?

To end on something good, I also updated the keywords file to show the parameters for each command.

The Downloads are the same(for the source and the dll), which are in the first post and a number of my other posts, no point in writing the same download link each time.

Please tell me if you find any bugs, problems, or show off any demos no matter how small

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 27th Nov 2008 12:16 Edited at: 27th Nov 2008 12:19
Extremely good work Slayer, it takes days or weeks us to experiment with all these exciting new features

However there is some strangeness in ODE... eg the size of cube cant be less than seven. Spheres can be smaller.

Here is code with falling cubes size 7 and 4.



So could you check what is wrong with small cubes (boxes) and why small spheres work correct?
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 29th Nov 2008 23:16 Edited at: 30th Nov 2008 01:53
Quote: "So could you check what is wrong with small cubes (boxes) and why small spheres work correct? "


Weird, will check it out.

Edit: Had a look and Lee put that boxes cannot be smaller than 7 or it will escape the geometry (used for collision) so it might be a limit you have to deal with. I could remove it but I'll run some test to see what happens exactly.

Edit again...

Okay, well after reading an old thread about ODE IanM said Lee put those values in for FPSC only so it has been removed from the dll. But before I release another update I'll be adding in more commands or fixing any problems.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Dec 2008 01:32
Bump!!!

Finally got to see this thread.


I have a smalllllll request of you, maybe it can be but maybe not. If not, don't worry about it.

Can you add in an option to specify a model structure to be used for collision? The model won't have limbs or animations and will be completely solid. This would be great for providing semi-realistic collision for high poly models. You could just lower the polycount of the higher poly model and use the low-poly version as the collision model.

Long shot, but I figured I would ask.


I was amazed to see that Juso made a small ragdoll demo using this system. Would it be at all possible to make a ragdoll out of a character model?


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 2nd Dec 2008 02:56
Quote: "
I have a smalllllll request of you, maybe it can be but maybe not. If not, don't worry about it.

Can you add in an option to specify a model structure to be used for collision? The model won't have limbs or animations and will be completely solid. This would be great for providing semi-realistic collision for high poly models. You could just lower the polycount of the higher poly model and use the low-poly version as the collision model.
"


Yes, that should be possible. I think I am going to change some of the core functionality of how the plugin works too. So you could create more than one space (for optimizations) and multiple geoms (for collision) or different geoms to do what you described.

Quote: "
I was amazed to see that Juso made a small ragdoll demo using this system. Would it be at all possible to make a ragdoll out of a character model?
"


It should be possible but it would take a lot of work. I'm pretty sure all the types of joints can make it but applying it to a skinned model or a model with limbs would take a lot more work.

Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Dec 2008 08:57
Sounds awesome!! I'm not sure of the best way to set up a ragdoll "compatible" model, but what I had in mind at first was a model with limbs so that I could probably trigger the ragdoll at any point for it (Set up the necessary parts for the model when I need to) but I'm guessing that that's not the most efficient way of going about it, huh?


The one and only,


Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 2nd Dec 2008 23:19
Not sure, I haven't really tinkered with ragdoll to much. But it's worth a shot to try and get any sort of ragdoll working. But right now I don't think you can add bodies to limbs, might be something to look into for the future I suppose.

Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 6th Dec 2008 05:12
Okay, I finally got an update out. Although it is a minor one, so minor in fact I decided to just call it v0.3.2, but I will be doing a major update next so I decided to just release this now. They have the same download links, but I didn't update the source, download just the dll. Source will be updated next release.

Changes...

I removed the limitation of a minimum of 7.0 units for bodies. I have also added in one new command (actually it is an overloaded command of ODE CREATE TRIANGLE MESH). Hope this is what you wanted Plystire.


You now have an additional parameter for ODE CREATE TRIANGLE MESH object, [GeomObject]. This allows you to use a different objects geometry for another object, you can also delete the Geom Object afterwards as it is not needed after the information is taken.

This is my current To-Do List so I don't forget...

* Organize Code (tis messy)
* Allow the creatation of seperate spaces (for optimization)
* Geoms and Joints on Limbs?(not sure if I can control limbs though)
* Test the commands I created (I just add them in most of the time)

Feel free to suggest anything so I can add it sooner than later and any bugs you find.

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 8th Dec 2008 14:57 Edited at: 8th Dec 2008 15:01
Great work as always Slayer! And the size of dll has increased only about 60 kilos. You certainly belong to the hall of fame of ODE programmers

You have made lots of commands handling joints, so what about breakable joints?
Oolite
18
Years of Service
User Offline
Joined: 28th Sep 2005
Location: Middle of the West
Posted: 8th Dec 2008 15:34
This is pretty sweet, i remember making a load of functions based around ODE a while ago, i always loved it simplicity, considering using it for my next project aswell but that means finding away to get water buoyancy and half decent car physics.

I second Juso, breakable joints would be sweet, i can think of a workaround from the top of my head but having it in there would be awesome. Let me know if you need any help with anything, i'm no amazing programmer but i'd lend a hand to any graphic type stuff you'll need(maybe if you decide to make a full fledge help system for it).

Cheers


<yes, the link doesn't work, deal with it.>
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 9th Dec 2008 02:16 Edited at: 9th Dec 2008 04:57
Quote: "Great work as always Slayer! And the size of dll has increased only about 60 kilos. You certainly belong to the hall of fame of ODE programmers

You have made lots of commands handling joints, so what about breakable joints? "


Thanks, I'm not that great, just put in commands here and there. Will see what needs to be done for breakable joints too.

Quote: "
I second Juso, breakable joints would be sweet, i can think of a workaround from the top of my head but having it in there would be awesome. Let me know if you need any help with anything, i'm no amazing programmer but i'd lend a hand to any graphic type stuff you'll need(maybe if you decide to make a full fledge help system for it).
"


I was actually thinking about creating a help system, but really laziness gets the better of me. If you want to create some sort of template for a help system that would be cool, may push me to write up some help files for ODE (at least the base commands).

Edit: On the topic of Breakable joints, it has to do with the value of the cfm (constraint force mixing). Most Constraints are hard (meaning they do not break) which is a value of 0. In the dll there is only a global cfm so far. Although it seems you can't set it for every joint I'm adding in commands to set local cfm's for joints. But have a go at using the global cfm for now to see if it does anything.

Oolite
18
Years of Service
User Offline
Joined: 28th Sep 2005
Location: Middle of the West
Posted: 14th Dec 2008 23:58
Although i own Darkphysx i still enjoy this simple, yet powerful physics library.
I do have one small request however, meshes have always been pretty buggy with this ODE library, any chance of finding out why? It probably seems like a daunting task given the complexity of the situation but i'm sure somewhere something has been overlooked.
Quote: "I was actually thinking about creating a help system, but really laziness gets the better of me. If you want to create some sort of template for a help system that would be cool, may push me to write up some help files for ODE (at least the base commands)."

I'll see what i can do.


^The link now works^
Oolite
18
Years of Service
User Offline
Joined: 28th Sep 2005
Location: Middle of the West
Posted: 15th Dec 2008 00:13
Keywords file.
Not all of the commands are present but it was in my keywords folder, might be a good start.


^The link now works^

Attachments

Login to view attachments
Slayer93
19
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 15th Dec 2008 01:25 Edited at: 15th Dec 2008 01:27
Quote: "I do have one small request however, meshes have always been pretty buggy with this ODE library, any chance of finding out why? It probably seems like a daunting task given the complexity of the situation but i'm sure somewhere something has been overlooked."


Will check it out, but if you could show an example of how it is buggy it would help. Or an explanation of what happens. I'm also starting to go on a bug hunt. I haven't really looked to see if anything worked perfectly or at all so I'll be testing out many of the commands too. So...added to my to-do list.

Quote: "I'll see what i can do.
"


Thanks, take your time too I'm not in a rush

Quote: "Keywords file.
Not all of the commands are present but it was in my keywords folder, might be a good start."


Actually a keywords file is one of the only things I actually do have.

UPDATE

I've prepared an update containing just over 200 commands! This update is only out because I wanted to finish up adding in the joints (there is only one joint I'm sure is not fully working and that is the Plane2D joint), but there is also Linear Motors, PR, PU, and Piston Joints along with their set and get functions. Commands are in the read-me.

I was also able to update to the latest SVN for ODE. Apparently the snapshot I had wasn't even close to up to date. The update is also somewhat unstable due to me updating from 0.5.0 to the latest SVN source and never testing any of my commands, which is what I'll be doing before the next update. But you can still play around with it, creating and setting up joints should be fine but getting any information will probably give you trouble. Also destroying joints, objects, etc... is not working.

I'm also not releasing the source code quite yet (I want to get a stable release and tidy it up before I release it) although not sure if anyone wants the source anyway.

Now for some news about breakable joints. Okay I suppose I half-lied, the cfm does make joints hard or soft, but they won't break joints. To break joints you have to test them yourself using the joint feedback commands(not currently working but will fix) and setting any joint attachments to 0 should break the joint (Ode Attach Joint jID, 0, 0). Once I get Joint Feedback working I'll demonstrate how it works.

Same download as before but here it is again...
It also has an updated keywords file along with it but the read-me also has all the commands.

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

Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 19th Dec 2008 12:35
You really have speed on, Slayer.

There is one more strangeness in ODE... the rotation is backwards in static objects:

This wont work correct:



But if you tilt the floor first in the opposite direction it works:



The problem can be more complicated if the object is rotated around more than one axis. Also 90, 180 and 270 degrees can sometimes work correct.

Login to post a reply

Server time is: 2024-04-26 23:38:10
Your offset time is: 2024-04-26 23:38:10