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 / dbLoadObject quite slow when loading a particular 3ds object

Author
Message
FirebirdX
16
Years of Service
User Offline
Joined: 1st Jul 2008
Location:
Posted: 2nd Jul 2008 08:05
Hi,

When I try to load a 3ds model (est. 2500 polygons) it takes about 10-15 seconds before the program will fully load on to the screen. By commenting it out and creating a box on the fly, the program runs fine (1-3 seconds). I'm pasting the snippet of the top part of the DarkGDK function for reference.



I'm thinking it's the 3ds model itself, but maybe is there an angle i'm not looking at? If it's the 3ds model, are there any things I need to tell my 3d designer to make it faster to load on DarkGDK?

Thanks,
Adrian
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 2nd Jul 2008 12:58
When loading complex 3DS models on my machine it can take up over 30 minutes at times.
The best solution is to convert your models into *.X format......then it usually takes only a few seconds to load.

The *.X format has 2 modes.
DirectX (ASCII) *.X
DirectX (binary) *.X

Both load up fast.
The binary is a little faster, but the ASCII can handle very huge models.
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 2nd Jul 2008 13:41
Quote: "The binary is a little faster, but the ASCII can handle very huge models. "


Much faster you mean, and what do you mean the ASCII version can handle huge models? You mean the files it produces are huge? The binary version is better in every possible way, unless you want to modify any of the data by hand, but at any rate you should resave the model as .dbo using GDK, load the model in and save it using dbSaveObject(); this format will load faster than any 3ds or .x file in GDK.

sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 2nd Jul 2008 14:06
Quote: "Much faster you mean, and what do you mean the ASCII version can handle huge models? "


No I do mean "a little faster".

It looks like the hardware overheads (HDD seek and latency) tend to be significantly slower than the actual processing of the data.
Even if the binary file processing is faster than the ASCII file processing, it is all swamped by the external times.

You may be able to correct me if I am wrong, but from past internet research, The number of data entries in a binary *.X file is limited by the data type that indexes the data in the file.
There is therefore a natural limit because of the index data type.
The ASCII *.X file relies on headers to demarcate between the various sections and is in text form so the number of entries are not limited by the maximum size of a data type.
FirebirdX
16
Years of Service
User Offline
Joined: 1st Jul 2008
Location:
Posted: 4th Jul 2008 07:17
Ah alright. I shall convert the 3d models then. Thanks loads
Anomynous
16
Years of Service
User Offline
Joined: 5th Jul 2008
Location:
Posted: 6th Jul 2008 04:41
In the samples I tried to load a different model in the place of statue.x ("Light" sample), statue.x i noticed is binary format, while my model is ascii format (dragon.x), while I can load my model into directx viewer, when I use dbLoadObject("models\\dragon.x", 1); it takes a bit longer to load and where the statue is normally, there is nothing... I put dragon.x in the same directory as statue.x

Can someone either explain to me how to load ascii format or link me to a converter for ascii *.x -> binary *.x?

Thanks - Anom




Communism defends your Democratic freedom.. (I'm starting to hate being in the US Military....)
amboleos
16
Years of Service
User Offline
Joined: 7th Sep 2008
Location:
Posted: 7th Sep 2008 15:56
I tried that

99kb ship.3ds takes 22 sec to load
after I used dbsaveobject;
119kb ship.dbo is created and it takes 7sec to load.
But a little vertex problem are occured.



[link=http://forum.donanimhaber.com/m_24381003/tm.htm]
[image]http://img502.imageshack.us/img502/3176/imzetu8.gif[/image]

[center][b][size=2]Ambolight

Login to post a reply

Server time is: 2024-11-20 15:33:04
Your offset time is: 2024-11-20 15:33:04