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 / Tutorial Game Level Question. DirectX and Textures

Author
Message
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 25th Dec 2007 05:40 Edited at: 25th Dec 2007 07:32
Hello All:

Now that I have Sparky's Collision working, I was trying to build a level in Maya 8.5 with textures.

My question is 2 parts.

1) In the Tutorial Game Level, they load the Universe.DBO which I recall links to the actual images of the objects. This is due to the DBO object format. Then they load the "skybox2.x" as object 2 and they apply a dbSetObjectTexture to it.
The question is: What texture are they applying to it? I don't see where they loaded the texture.

2) What kind of setup would I need to export as a DirectX file and have it load with the textures that I applied in Maya? Meaning if I build a level in Maya, and I export it as DirectX, will I need to dbSetObjectTexture or will the DirectX file read it in such as the "skybox2.x"?

Thanks!
-James

[EDIT]
Well, I just applied 2 textures to the DirectX file and had to move them into the same directory and they showed up on the model so that is good!

Your mod has been erased by a signature
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Dec 2007 05:32
Yup - I do it two ways - make a directx file with the textures applid - load and view - if textures are spun backwards or some such non-sense - use a text editor and see if you can't turn the puppy around and get it right for how DarkGDK loads it. Usually spot on - but not always - depends on 3d modeling tool - and perhaps DArkGDK glitches or something...

Second Way, is to build the Skybox dynamically. Load the 6 images, make a triangle - tiny tiny tiny - (this is your zero,zero,zero HOME BASE) - Now make a plain, size it, make mesh from object, make a limb from this mesh, apply a texture to it - move it forward your (skybox size)/2. (Rotate if its invisible during tests or set object cull off for the whole object. you just made limb Zero. do same for all sides - Remember - Your making limbs so use rotate limb command and offset limb (to move them).

Another tip, when loading images... use the version of load image that has 3 params. id, filename, flag. Make flag=0 I think to make DarkGDK not try to mipmap the images in memory... this keeps far away skybox walls from being "blurred".. Hope this helps!

Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 26th Dec 2007 05:42
You mentioned Limbs. I keep seeing this all around the forum. What is the purpose of limbs? I understand it in animation for the joint movement but what is the big deal about using it on objects?

Your mod has been erased by a signature
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Dec 2007 05:53
20 Objects - Not a Problem.

200 Objects - a bit heavy

2000 Objects - More Heavy.

100 Objects, with 20 limbs each? Much less Objects to deal with - makes DarkGDK Happier.

By using limbs - you can have many Object things grouped into one object using limbs. Now - DarkGDK will have less overhead - (Less Objects to race through). That's part of it.

If you think Terrain - one huge object - lots o poly - hard to do poly optimization (remove stuff not on screen to save poly count getting to high and keep frame rates up)

Now think checker board - where each square is a "Limb" of the Checkerboard. Now - DarkGDK internally manages ONE OBJECT. (Easy to move around if you want like it was one object...hence why cool for a skybox... But Now - you can selectively hide limbs - like you could with objects - except - darkgdk just likes it better. Managing total number of objects is as important as managing over all poly count rendering.

Eventually you'll want to check out LIT's Frustrum culling - and see how to turn limbs on and off based on being in the frustrum or actual viewing area. DarkGDK/DarkBasic have a habit of "processing" stuff - even when you can't see it. this form of hiding/excluding stuff not in the display is called occlusion culling. You nered to scope out LIT's code to get a handle on it - as the DarkGDK and DarkBasic Object In Screen is simply flawed in my opinion.

Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 26th Dec 2007 06:56 Edited at: 26th Dec 2007 06:59
So if I had a chain of 25 identical objects using limbs, and they were places in the shape of a circle, and the current camera placed in the center of the circle allowed me to ONLY to see 4 objects ("In Screen") of the chain at any given time, are you telling me that it will ONLY render the 4 chains and not the entire circle and therefore my frame rate will be higher?

(My GOD that was bad grammer)

Your mod has been erased by a signature
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Dec 2007 07:07
No - but I'm saying - if you add occlusion culling you could. See - the big deal is - reducing number of objects is as important to DarkGDK (almost) as reducing poly. DarkGDK chokes - or gets MUCH slower if the object count gets to high - or if lots of add/deletes - it gets messed up.

Using Limbs can keep a handle on how objects there are.

With LIMBS and OBJECTS BOTH - having a system in place to "Hide/exclude" what's off the screen - to keep polys down is import for its own reasons. This (I've yet to see proof to the contrary) does not happen automatically. you need to add your own frustrum occlusion system. Scope this out - dated - LIT translated a wiki about this kind of thing to dark basic...see attached

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-29 07:33:26
Your offset time is: 2024-09-29 07:33:26