The Game Creators
The Game Creators Home Online Shop Click to Login
  Hot: Christmas CompetitionNovember NewsletterModel Pack 36DB Pro Pack 2009DGS BonanzaCharacter PackFPS Creator Bonanza;
The Game Creators
DBPro / ODE Triangle Mesh Example. I got the triangle mesh working in ODE!

Go to the first page of this board Return to the Forum Menu Post Message
32 Messages - Page   of 1   
Bookmark and Share Search the Forum

Author Message
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 17th Feb 2007 16:42     Edited: 9th Mar 2007 09:35     | link | toggle

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
Download: ode.zip Size: 489897 bytesReport this message as abusive
Milkman

User


Joined: Wed Nov 30th 2005
Location: United States
Posted: 17th Feb 2007 20:28     Edited: 17th Feb 2007 20:52     | link | toggle

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
Send AIM user a message
Report this message as abusive
Image All

User


Joined: Fri Dec 30th 2005
Location: I can feel my hair growing
Posted: 17th Feb 2007 21:06           | link | toggle

It does for me as well.

Windows just gives me notice of an error and terminates it.

Back to top
Find user on ICQ
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 17th Feb 2007 22:25           | link | toggle

Oops. I've fixed it now. Just download it from the first post.
Back to top
Report this message as abusive
Juso

User


Joined: Mon Sep 23rd 2002
Location: Finland
Posted: 18th Feb 2007 03:35           | link | toggle

Works fine for me!

Can you position map.dbo freely or is it always in 0,0,0 ?
Back to top
Report this message as abusive
APEXnow

DarkGDK .NET Developer


Joined: Tue Apr 15th 2003
Location: On a park bench
Posted: 18th Feb 2007 08:36           | link | toggle

Works fine here also. I might convert your sample to work on DGDK.NET using the ODE plugin for that as well.... if you don't mind of course?

Paul.

Back to top
APEXnow
Report this message as abusive
Image All

User


Joined: Fri Dec 30th 2005
Location: I can feel my hair growing
Posted: 18th Feb 2007 11:44           | link | toggle

Still crashes for me

Back to top
Find user on ICQ
Report this message as abusive
Trinita

User


Joined: Mon Sep 29th 2003
Location: Italy
Posted: 19th Feb 2007 07:41           | link | toggle

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
Designer Vision
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 19th Feb 2007 10:04     Edited: 19th Feb 2007 10:05     | link | toggle

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
Report this message as abusive
Trinita

User


Joined: Mon Sep 29th 2003
Location: Italy
Posted: 19th Feb 2007 10:09           | link | toggle

It crashes on compile.

"An eye for an eye will only make the whole world blind."
Back to top
Designer Vision
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 19th Feb 2007 12:09           | link | toggle

What error do you get?
Back to top
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 19th Feb 2007 20:05           | link | toggle

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
Download: ode_player.zip Size: 604048 bytesReport this message as abusive
Trinita

User


Joined: Mon Sep 29th 2003
Location: Italy
Posted: 20th Feb 2007 04:07     Edited: 22nd Feb 2007 10:32     | link | toggle

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
Designer Vision
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 21st Feb 2007 17:01           | link | toggle

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
Report this message as abusive
Juso

User


Joined: Mon Sep 23rd 2002
Location: Finland
Posted: 22nd Feb 2007 05:43           | link | toggle

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
Report this message as abusive
APEXnow

DarkGDK .NET Developer


Joined: Tue Apr 15th 2003
Location: On a park bench
Posted: 22nd Feb 2007 06:32           | link | toggle

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
APEXnow
Report this message as abusive
Google Ad
Back to top
 
Juso

User


Joined: Mon Sep 23rd 2002
Location: Finland
Posted: 23rd Feb 2007 03:16     Edited: 23rd Feb 2007 03:20     | link | toggle

@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
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 23rd Feb 2007 09:38           | link | toggle

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
Report this message as abusive
Juso

User


Joined: Mon Sep 23rd 2002
Location: Finland
Posted: 24th Feb 2007 04:14     Edited: 24th Feb 2007 04:22     | link | toggle

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
Report this message as abusive
Olby

User


Joined: Thu Aug 21st 2003
Location: Studio
Posted: 24th Feb 2007 06:02           | link | toggle

change this:
+ Code Snippet
position object 3,70,0,0 `and map... but ode stays in 0,0,0


to this:
+ Code Snippet
position object 3,70,0,0 `and map... but ode stays in 0,0,0
fix object pivot 3


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
Olby Online
Report this message as abusive
Juso

User


Joined: Mon Sep 23rd 2002
Location: Finland
Posted: 24th Feb 2007 06:43     Edited: 24th Feb 2007 06:44     | link | toggle

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
Report this message as abusive
CattleRustler

Moderator


Joined: Fri Aug 8th 2003
Location: case modding at overclock.net
Posted: 24th Feb 2007 09:34     Edited: 24th Feb 2007 09:37     | link | toggle

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
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 7th Mar 2007 19:20           | link | toggle

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
Download: dbproodedebug.dll Size: 1007616 bytesReport this message as abusive
Juso

User


Joined: Mon Sep 23rd 2002
Location: Finland
Posted: 8th Mar 2007 05:41           | link | toggle

Thanks coolgames, but this new dll crashes both in 6.3 and in 6.4
Back to top
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 8th Mar 2007 09:09           | link | toggle

It does? It works fine on my computer. Can you give me the error message?
Back to top
Report this message as abusive
Juso

User


Joined: Mon Sep 23rd 2002
Location: Finland
Posted: 9th Mar 2007 08:56           | link | toggle

I might have dx9 feb 06 or apr 06. Should I need newer?
I will test it more at weekend.
Back to top
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 9th Mar 2007 09:34           | link | toggle

You need October 2006 or later.
Back to top
Report this message as abusive
Master Xilo

User


Joined: Fri Sep 8th 2006
Location: Bern, Switzerland
Posted: 24th Apr 2007 04:36           | link | toggle

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
Hurricane-Eye Entertainment
Report this message as abusive
Master Xilo

User


Joined: Fri Sep 8th 2006
Location: Bern, Switzerland
Posted: 24th Apr 2007 04:41           | link | toggle

I've replaced the old dll, have the latest version of dx and dbpro and it still doesn't work
Back to top
Hurricane-Eye Entertainment
Report this message as abusive
Juso

User


Joined: Mon Sep 23rd 2002
Location: Finland
Posted: 26th Apr 2007 09:30           | link | toggle

Someone c++ guru should take this as a challenge and fix that dll
Back to top
Report this message as abusive
Gnomes Games

User


Joined: Sun Dec 25th 2005
Location: FRANCE
Posted: 29th Apr 2007 05:31     Edited: 29th Apr 2007 15:36     | link | toggle

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
Rem create the object for colision :

load mesh "YOUR OBJECT.X",1
make memblock from mesh 1,1 
delete mesh 1
make mesh from memblock 1,1
delete memblock 1
make object 1,1,0
delete mesh 1
ode create static triangle mesh 1
hide object 1

Rem load the visible object :

load object "YOUR OBJECT.X",2


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
Download: dbproodedebug.zip Size: 122684 bytesReport this message as abusive
Gnomes Games

User


Joined: Sun Dec 25th 2005
Location: FRANCE
Posted: 1st May 2007 07:30           | link | toggle

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
Report this message as abusive

Go to the first page of this board Return to the Forum Menu Post Message
32 Messages - Page   of 1   
Search the Forum

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.

Forum Search

Enter a word or phrase to search our Forum for:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Dark Game Studio
Privacy Policy AUP Top of Page