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.

Dark GDK / DBOData.h / dbGetObject() odd results

Author
Message
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 26th May 2008 14:34
My level editor generates one solid object for worlds. Part of the process in doing that is inspecting custom objects for limbs and textures so it can preserve them properly.

However I have been getting really odd results which do not match what I would expect - in some cases crashes.

So i've made a test c++ program to inspect 2 different models. Both are trees I made in Tree Magik g3. The first is a .dbo object exported directly from tree magik. It works great, both in my real editor and in this test program - everything is as you would expect when it comes to mesh count and texture count per mesh.

The second however is a .x file. Tree Magik generates trees that a re far far to big for my games scale so I exported an ascii ms3d file, opened it in milkshape 3D, changed it how I wanted and then exported a .x (JT). I've tried giving it bones/joints as well. Result when I open it in my level editor and inspect it is a complete crash and in my lightweight test program is results that are plain wrong. 1 Mesh reported instead of 2, 1 texture reported instead of 2.

The last bit is weird because I *swear* at one point I ran it and it said meshes: 1 - textures: 2 which at least makes SOME kind of sense - but I cant make it repeat it!

As a final test I opened the .x file in a dgdk app and then saved it off as a .dbo to convert it. It converts fine, but still 1 mesh 1 texture despite it quite obviously being a 2 texture mesh which should have two seperate groups (trunk, leaves).

Can someone perform this same test and see if you get matching results? Or does anyone know WTH is going on here? Mike even?

Ok, create a new dgdk project and just paste this over the main.cpp:



fix the #include line for DBOData.h so it reflects where-ever you have it. There should be a copy hidden away in <your path>/The Game Creators/DarkGDK Freeware/DBO Format/ if you havnt found it yet

I've attached a zip with the models i was using for testing to this post.

I'm at a bit of a loss, any help appreiciated!

Attachments

Login to view attachments
Sephnroth
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 31st May 2008 18:59
dont like to bump but.. bump? bit stuck. I have no idea why GetObject returns such radically different data for the same object exported as two different formats :/

Best solution idea i've come up with so far: write a .dbo exported for ms3d. At this rate thats going to be my only option :/

Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Jun 2008 12:10
My numbers:

treeeeeeee.x

Num Meshes: 1
Mesh (0) Texture Count: 1

treeeeeeee.dbo

Num Meshes: 1
Mesh (0) Texture Count: 1

Tree02.dbo

Num Meshes: 2
Mesh (0) Texture Count: 1
Mesh (1) Texture Count: 1

I don't know, perhaps that .x export works so so. Only thing that comes to my mind is that DGDK limb count for .dbo starts at 1, while .x starts at 0

Login to post a reply

Server time is: 2024-11-20 13:28:54
Your offset time is: 2024-11-20 13:28:54