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 / dgk version 1.0; c++; dbLoadObject - Question

Author
Message
Timidon
13
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 26th May 2014 05:15
dbLoadObject

This command loads a model into the specified 3D object number. You must specify a model in the X, 3DS, MDL, MD2 or MD3 format. Once you have loaded the 3D object file successfully, you can use the specified 3D object number to position, rotate, scale, animate and manipulate your 3D object. The object number should be specified using an integer value.

Was wondering if there was any other 3d object types that has been added? Did DGK handle the Dark Basic object types as well?

There are many answers but just one question" ~ Jerilith the Mad
The Tall Man
5
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 26th May 2014 06:52 Edited at: 26th May 2014 06:56
Yeah, it'll do a .dbo. It actually takes whatever format and ultimate converts it to .dbo internally anyway. Sometimes it converts to .x (for .3ds for example) as an intermediate step.

I found (although I haven't tried) that you can save .x files with dbSaveMesh(). Otherwise, the dbSaveObject() command just saves to .dbo as far as I know.

P.S. I've noticed that a popular format .obj is open and text-based. That would be a nice format to add!

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
Timidon
13
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 26th May 2014 08:49
I think I have used it before .obj before. Thanks. I am writting up my "asset" profile for the Gui project, it looks like I don't need to do to much special for seperating the types. the dbLoad("model.x" or "model.dbo") works the same. Alright back to coding.

There are many answers but just one question" ~ Jerilith the Mad
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 28th May 2014 22:32
Just a heads up that .obj models have some limitations such as no animation data storage, only single texture coordinates and (if I recall correctly) no additional data such as vertex colours. Of course you can add support for other tags than the 'official' ones and thus bake such information into an obj file though; I believe most any parsers will simply ignore unknown tags.


"Why do programmers get Halloween and Christmas mixed up?"

Login to post a reply

Server time is: 2019-06-16 13:50:10
Your offset time is: 2019-06-16 13:50:10