DBPro / ODE Triangle Mesh Example. I got the triangle mesh working in ODE! |
| Author | Message | ||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
I've finally figured out how to get ODE to work correctly with a triangle mesh level! I've attached the example to my post. I've included with it the ODE dll that works for 6.2 and above. The dll has been recompiled to use the latest version of the ODE library. If the example doesn't work, try putting the new ode dll in the plugins-user folder. You need the latest version of DBPro (6.4) for this to work. You also need to replace the current ode dll that is in the plugins-user folder with the dll included in the zip file. You will need the October 2006 dx runtime or later since I compiled the dll using that version of the sdk. Enjoy! -Coolgames |
||
| Back to top |
|||
|
Milkman
User ![]() Joined: Wed Nov 30th 2005 Location: United States |
I'm testing this now, i always wished the triangle mesh features would work. [EDIT] It seems you didn't include the functions you use to get player and camera position/rotation. For example, you have 'campx()' in your code but there is no function defined as 'campx()'. Will test once i change all those back. [EDIT2] It doesn't work for me, i just get an error when i try to run it. Who needs a signature? |
||
| Back to top |
|||
|
Image All
User ![]() Joined: Fri Dec 30th 2005 Location: I can feel my hair growing |
|
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
Oops. I've fixed it now. Just download it from the first post. |
||
| Back to top |
|||
|
Juso
User ![]() Joined: Mon Sep 23rd 2002 Location: Finland |
Works fine for me! Can you position map.dbo freely or is it always in 0,0,0 ? |
||
| Back to top |
|||
|
APEXnow
DarkGDK .NET Developer ![]() Joined: Tue Apr 15th 2003 Location: On a park bench |
|
||
| Back to top |
|||
|
Image All
User ![]() Joined: Fri Dec 30th 2005 Location: I can feel my hair growing |
|
||
| Back to top |
|||
|
Trinita
User ![]() Joined: Mon Sep 29th 2003 Location: Italy |
It does not work for me. I have DBpro ver 6.2. I've tested the Dll on another project but it does not work. I've tested the code with the old Dll and it does not work. Any ideas? "An eye for an eye will only make the whole world blind." |
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
Apexnow, yes you can convert it. Just put my name in it. Image All, can you tell me what error message you get? Trinita, does it crash on compile, or does the collision not work correctly? Juso, I don't think you can reposition it after you use "ode create static triangle mesh", but you can reposition it before. |
||
| Back to top |
|||
|
Trinita
User ![]() Joined: Mon Sep 29th 2003 Location: Italy |
It crashes on compile. "An eye for an eye will only make the whole world blind." |
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
What error do you get? |
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
Here's a new version that is in 3rd person instead of first. I've fixed the problem where you slide down a slope. This new version requires sparky's collision dll which can be downloaded here: http://forum.thegamecreators.com/?m=forum_view&t=74762&b=5 |
||
| Back to top |
|||
|
Trinita
User ![]() Joined: Mon Sep 29th 2003 Location: Italy |
The exe file (ode.exe) doesnt work, with the new dll and with the old. It simply opens an windows XP error window. I've tried with the new one (i already have sparky) you uploaded, but gave me the same result. My specs: Windows XP Pro sp2 -- DirectX9.0c -- 1 Gb RAM -- Intel P4 3.00Gb -- RADEON X700 PCIExpress 128 mb -- DBPRO ver 6.2b [EDIT]: It's working, i dont know how i did it...great! [2nd EDIT]:It works only in debug mode with old ddl. I must upgrade to 6.4.... "An eye for an eye will only make the whole world blind." |
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
For those people that can't get it to work. Read the first post again, I've edited it to tell how to get it to work. |
||
| Back to top |
|||
|
Juso
User ![]() Joined: Mon Sep 23rd 2002 Location: Finland |
I still wonder how to reposition the ode object. It always stays in 0,0,0 map.dbo can sure be positioned but then it and ode object are in different places |
||
| Back to top |
|||
|
APEXnow
DarkGDK .NET Developer ![]() Joined: Tue Apr 15th 2003 Location: On a park bench |
Juso, do you mean before starting the simulation? If so, reposition the object before applying the ode create dynamic triangle mesh or related command. If you're talking about move the object after or during simulation, the best way is to cancel the ODE mesh object, reposition it and reassign it to the simulation again. Moving objects directly during simulation isn't really a good idea as it b0rks the behaviour up a bit. Paul. |
||
| Back to top |
|||
|
Google Ad
AdBot Joined: Aug 26th 2002 Location: Everywhere |
|||
| Back to top |
|||
|
Juso
User ![]() Joined: Mon Sep 23rd 2002 Location: Finland |
@APEXnow Where exactly should positioning take place in this example (coolgames above) before simulation. There are only six lines, I have tried all! Moving eg map slightly to left 70,0,0 but how? "Position object 1,70,0,0" or "Position object 3,70,0,0" moves map not ode object load object "mediamap.dbo",3 make mesh from object 1,3 convert mesh to vertexdata 1 make object 1,1,0 exclude object on 1 sc_setupcomplexobject 3,1,4 `triangle mesh... ode create static triangle mesh 1 ode set contact fdir1 1,20 ... |
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
You need to position both object 3 and object 1 to the desired position before you call ode create static triangle mesh. |
||
| Back to top |
|||
|
Juso
User ![]() Joined: Mon Sep 23rd 2002 Location: Finland |
No it wont succeed ! I really think its unpossible to position ode triangle mesh elsewhere than in 0,0,0 Can someone solve this problem? ... load object "mediamap.dbo",3 make mesh from object 1,3 convert mesh to vertexdata 1 make object 1,1,0 exclude object on 1 sc_setupcomplexobject 3,1,4 position object 1,70,0,0 `here you try position ode object position object 3,70,0,0 `and map... but ode stays in 0,0,0 `triangle mesh... ode create static triangle mesh 1 ode set contact fdir1 1,20 ... Here only map is moved, ode stays in 0,0,0 |
||
| Back to top |
|||
|
Olby
User Joined: Thu Aug 21st 2003 Location: Studio |
change this: + Code Snippet to this: + Code Snippet this will reset objects pivot so that the new objects position is interpreted as the default NON-modified position. Then ODE should create collision mesh perfectly. AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c, DBP 6.2 http://www.myspace.com/producerolby |
||
| Back to top |
|||
|
Juso
User ![]() Joined: Mon Sep 23rd 2002 Location: Finland |
No way "fix object 3" doesnt change anything, not even both "fix object pivot 1" and "fix object pivot 3" More ideas, please! |
||
| Back to top |
|||
|
CattleRustler
Moderator ![]() ![]() Joined: Fri Aug 8th 2003 Location: case modding at overclock.net |
Im convinced the implementation of ODE Physics for the DBP Engine basically blows, theres gotta be something better. Sorry to say. EDIT: Ok, that was a little harsh, it might be really nice for limited number of certain types of things (uses) but not to stable/capable for more complex things. London 7/7/05 = 1 in 10^38 Alex Jones: Terror Storm Ron Paul '08 |
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
I've attached a fixed version of the dll. This will allow you to reposition the object before you call "ode create static triangle mesh". |
||
| Back to top |
|||
|
Juso
User ![]() Joined: Mon Sep 23rd 2002 Location: Finland |
Thanks coolgames, but this new dll crashes both in 6.3 and in 6.4 |
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
It does? It works fine on my computer. Can you give me the error message? |
||
| Back to top |
|||
|
Juso
User ![]() Joined: Mon Sep 23rd 2002 Location: Finland |
I might have dx9 feb 06 or apr 06. Should I need newer? I will test it more at weekend. |
||
| Back to top |
|||
|
coolgames
User Joined: Mon Sep 26th 2005 Location: Oregon, USA |
You need October 2006 or later. |
||
| Back to top |
|||
|
Master Xilo
User Joined: Fri Sep 8th 2006 Location: Bern, Switzerland |
It crashes for me too right after compile has finished I get a "ode.exe has noticed a problem and needs to be terminated" error message!!! how can I fix this |
||
| Back to top |
|||
|
Master Xilo
User Joined: Fri Sep 8th 2006 Location: Bern, Switzerland |
I've replaced the old dll, have the latest version of dx and dbpro and it still doesn't work |
||
| Back to top |
|||
|
Juso
User ![]() Joined: Mon Sep 23rd 2002 Location: Finland |
Someone c++ guru should take this as a challenge and fix that dll |
||
| Back to top |
|||
|
Gnomes Games
User Joined: Sun Dec 25th 2005 Location: FRANCE |
Hello ,I use ode in my games and it works fine with everything ! Just use : -DBpro version 6.1 -This version of the Ode DLL post by IanM (Download) -This code to load a Triangle Mesh : + Code Snippet To install DBpro 6.1 you must uninstall Dbpro completely if you have a newer version ( sorry...) and download the update from : http://darkbasicpro.thegamecreators.com/?f=upgrade_6_1 EDIT : You can position object during the game with this version of the DLL by using the command : "ode set object position object,x,y,z" Good luck ! AMD Athlon 64 3400+/1 Go DDR/Ati X600 512 Mo/260 Go HD/Windows XP SP2/DirectX 9.0c (October 2006)/Dark Basic Pro 6.0 RC10 Sorry for my so bad english... |
||
| Back to top |
|||
|
Gnomes Games
User Joined: Sun Dec 25th 2005 Location: FRANCE |
Nobody wants to try ? AMD Athlon 64 3400+/1 Go DDR/Ati X600 512 Mo/260 Go HD/Windows XP SP2/DirectX 9.0c (October 2006)/Dark Basic Pro 6.0 RC10 Sorry for my so bad english... |
||
| Back to top |
|||
Sorry, but it has been so long since anyone replied to this Thread that it has been automatically locked.
You may read it but not reply.
You may read it but not reply.
Forum Search
Enter a word or phrase to search our Forum for:
|
|











