PDA

View Full Version : ODE - Open Dynamics Engine



Petr Schreiber
23-04-2007, 11:18
Hi,

I am posting this stuff to vaporware section because it is in extremely early stage.
I started to convert ODE headers to thinBASIC, partly because the could come generally handy an partly because I don't want to use other languages for my school stuff ;D

ODE serves for physical simulations.

Please find here two attached scripts, first is just computional, second the same with TBGL display.
As I said, it is very early stage, extremely simple sample, but I hope you will find it interesting.
The scripts are based on PyODE samples for Python, but as I don't like the way Python does OpenGL ( it is 100% ok, but too much work :) ) I did it in thinBASIC.

I started to do direct C/C++ to thinBASIC translation based on ODE 0.8, I am probably at 2% of translation :D, but it is interesting experience.


Bye,
Petr

ATTACHEMENT REMOVED - OBSOLETE :) ! PLEASE GET LATEST ODE HERE (http://community.thinbasic.com/index.php?topic=820.0)

kryton9
23-04-2007, 11:23
Petr, Way to go. Glad you are using a popular physics engine. Can you keep the prefix short, tbode is getting long :) I guess it is shorter than tb_ode :)

So you started with python ode, but are now going the full c++ version conversion, that sounds like it will be adaptable for future ode updates easier that way.

I don't know how you are doing all of this, but I can tell you I DO APPRECIATE IT BIG TIME!!!

ErosOlmi
23-04-2007, 12:39
Hey Petr, do you know the difference between vaporware and real work?
This is real work, maybe in progress, but real.

So, only for you (tadaaaa...) a new dedicated forum for this project that (I'm sure) will be a another Petr present to thinBasic community.

Thanks a lot
Eros

Michael Hartlef
23-04-2007, 12:47
Howly cow :o I see this become handy. Thank you soo much!!!

Question: Do you mean converting C++ headers to TB or do you do a whole conversion of the ode sources?

Michael Hartlef
23-04-2007, 18:55
I checked it, runs fine. Man, I'm so happy about this. I hope I can create something so it will be usefull. Thanks again.

Petr Schreiber
23-04-2007, 19:42
:)

thanks a lot guys and thanks for new forum!

I am just converting original headers directly to thinBASIC, in case of OpenGL I had the advantage of very compatible headers from PowerBasic, so it was less work to me :)

I plan to do complete header like conversion as Eros tuned DECLARE way to be extremely fast. Maybe when I will get general idea how ODE works, DLL wrapper module could be done around, but now it seems speed won't be issue.

kryton, I will maintain original names for functions, this will allow to learn painlessly from sources over net.
Mike, just headers, translating whole source would take ages and I am not sure if it would have finally any benefit.


Thanks,
Petr

Michael Hartlef
23-04-2007, 20:36
I thought it was just headers but who knows how crazy you can get ;)
Anyway, I count you now on it. I was just playing with your sample, having different keys adding different forces. It was real fun.

ErosOlmi
23-04-2007, 20:41
Do not forget to post some examples ;)

Also remember to create single thread in order to be more easy to follow any improvements. You have now a full forum.
Maybe also nice to make a stiky post for source update.

Let me know if you need other sub-forum

Ciao
Eros

kryton9
23-04-2007, 22:07
Great Physics has its own forum, mean lots coming in the future!!

Petr Schreiber
26-04-2007, 14:44
Hi guys,

what to do when 90% of translation is complete and you realize you was not consistent in doing the translation in diverse cases :D ...

I am writing auxiliary thinBASIC script to help me, it already does in a milliseconds what I was doing for hours, stay tuned for first complete ODE header !
I was very surprised how fast thinBASIC performed the translation, because I was writing the code like a ... pig :D ( lot of redundant actions ).

Bye,
Petr

Michael Hartlef
26-04-2007, 15:40
I'm curious if it has something to do with automatic C header translation ;)

Petr Schreiber
26-04-2007, 18:51
Yes,

script now does the dirty work for me and I am just correcting details - ideal :)


Bye,
Petr

Petr Schreiber
26-04-2007, 19:47
Puff,

first complete translation of ODE is out in sticky topic.
I did not tested all the functions ( header has 150 kB ;D ), I made some changes so no need to pass VARPTR(), just pass the variable directly.

It is stilll strongly experimental, please report me any troubles.


Bye,
Petr

Michael Hartlef
26-04-2007, 21:03
Awesome, thank you!

kryton9
26-04-2007, 21:12
Thanks for this Petr, i don't have time to look now, but definitly will in coming days. My mind is having a problem absorbing the great addition this will have to working on stuff and making it that much cooler. This is a major addition and undertaking you did again, thanks.

ErosOlmi
26-04-2007, 22:08
Low res but can give an idea of dynamic objects: 2048 balls.

kryton9
27-04-2007, 01:38
Amazing video Eros, that is so impressive that many balls have physics going and it is that fast.

Petr Schreiber
27-04-2007, 09:14
Nice video,

thanks :)
Please notice on cards with no T&L ( cards ~older than 2000, Intels ) the framerate will get down in such a cases because of lot of geometry drawn and not because of complexity of calculation :).


Bye,
Petr

kryton9
27-04-2007, 19:28
That is pretty incredible info Petr and shows how far we have come with computers. For it to run on computers up to 7 years old at decent speed is really neat. I think most people who are into computers have computers within that age all the time, so speed should not be a concern.

I have my Dad's old 486, I need to configure one of these days to use again. It will be interesting to see how our programs work. It does run my old truespace pretty well from what I remember, so that will be a good test for running on old comptuers, at a whopping 100 mhz.

Petr Schreiber
27-04-2007, 20:41
Ahem :D,

kryton, slowest PC I ever tried OpenGL was Pentium Overdrive 83Mhz, 32MB RAM and some megacool graphic card ( really :) ) with 1 or 2 MB of ram on Windows 95. Still have it at home.
Performance ? Awful :) I think better to forget textures and filtering on such a machine :)


Bye,
Petr

kryton9
27-04-2007, 23:45
It will be fun to test it on it. Currently I have windows 98 SE2 on it. I am doing some work for my old boss "older brother" as I call him. I was trying to setup a test area on my hosted webserver that runs apache, mysql and php. They allow 100MB Database, which when I signed seemed more than enough for me and what I ever planned to do.

But my Boss this week told me to work on doing this huge database. I downloaded all the files the last few days. Compressed all 88 files are
close to 300MB, uncompressed 1.7 GB. So that took my hosted web server out of the picture. Since this is going to be a test site for us to develop ideas with the data, I am going to try setting it up on my Dad's old 486. If it can handle the queries and just run, I will use that. If not I will use one of my computers now to be the host, they are powerful enough.

I will post in the other section about server and thinBasic, as I will be able to tinker with that now too.

Anyways lots to do, I don't know what to work on so many fun projects that need attention. In addition, I downloaded and installed the latest ubuntu on my notebook. All I can say is wow they did an awesome job. My 64 bit amd notebook after 2 years of ownership finally has a decent 64 bit OS. All my hardware including wireless network card work now. I have wonderful 3d desktop and cool themes with Emerald. The only stuff that doesn't work in full is my logitech cam, mouse. The mouse works, but I don't have access to all the features because logitech won't write drivers. Really strange, some sort of conspiracy out there it seems. They have drivers for MacOS which is linux like underneath, makes no sense. There is a company or website that says they will write drivers for free for any company not interested in doing it themselves, they just need specs or contact info of engineer to talk to. What a deal? Why aren't companies jumping on it? Very strange, I don't understand. It just means more market for them to sell their goods.

Michael Hartlef
28-04-2007, 08:29
Why aren't companies jumping on it? Very strange, I don't understand. It just means more market for them to sell their goods.

The market seems not to be big enough I guess. Linux people are used to use free software.