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 / Draw Object to Back

Author
Message
Mr Squishy
18
Years of Service
User Offline
Joined: 25th Feb 2006
Location:
Posted: 19th Apr 2006 02:32
Using dbDisableObjectZDepth i have been able to draw objects to "the front of" the screen for things like the hud and buttons and so fourth, but i cant get objects to draw to "the back," like for skyboxs.

I saw while searching these forums that dbDisableObjectZRead may be used for this, yet i am not so sure how to use this function and everything seems to draw to front when i use it. How can i draw an object behind everything else, reduardless of its position?

Keep it simple.
Otherwise, you may not be clever enough.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Apr 2006 03:57
They draw by image number when you use disable object zread. Make sure your objects are texture in the right order.

Mr Squishy
18
Years of Service
User Offline
Joined: 25th Feb 2006
Location:
Posted: 19th Apr 2006 07:04
image number huh, that sorta sux, or maybe i just dont get how i should use that.

so what does disable object z depth do? is it by image numbers as well.

also dbDisableObjectZWrite, dbDisableObjectBias and dbEnableObjectZBias; what do these do?

one last thing is it the image number or the order that you texture the objects in that controls the z order?

thanks for your help.

Keep it simple.
Otherwise, you may not be clever enough.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Apr 2006 07:10
With disableobjectzread it is the image number. I have never heard of objectzbias though. Disableobject zwrite just doesn't write anything to the z buffer, but is drawn as normal (from z depth), this way it doesn't affect other objects behind it.

Mr Squishy
18
Years of Service
User Offline
Joined: 25th Feb 2006
Location:
Posted: 19th Apr 2006 07:32
so in essence my only two choices with sky boxes are:
1) Make it real big and set the camera distance also quite large.
and
2) Make it any size i want, disable z read and make sure that it is the first texture, object and object which is textured.

Is this correct?

Keep it simple.
Otherwise, you may not be clever enough.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Apr 2006 15:21
Make it any size you want, disable z write and make sure that it is the first object created in the current set of displayable objects.

It's unfortunate, but the only control we have over the rendering order is the order that we create objects in.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th Apr 2006 15:44
If the Game SDK works like DBP you can use the image numbers with disable object zread to make them draw in whatever order you want. No matter which order they were created in.



Works the same as:



And this:



It doesn't even matter what order the images are loaded in. Loaded objects with disable object zread will draw behind created ones with disable object zread unless you retexture the loaded objects. Beacuse otherwise they will have negative image numbers and be lower.

Miguel Melo
19
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 19th Apr 2006 23:29 Edited at: 19th Apr 2006 23:31
Quote: "I have never heard of objectzbias though. "


I havent heard of ZBias for a good 10 years now, but if I remember correctly from DX 5 times or whatever, it allows you to solve z-conflicts. So when you have, say, two vertical planes on Z = 2 as you move the camera you'll see a lot of tearing as bits of one and the other show through. If you set zbias on them (if I remember correctly, back then there were 8 levels) the one with the biggest bias is always drawn closer to the camera even though they are coplanar in 3d space.

My memory isn't what it used to be though....

I have vague plans for World Domination
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 20th Apr 2006 21:43
I think Mr. Melo is right. This is taken from the dbpro help files:



Miguel Melo
19
Years of Service
User Offline
Joined: 8th Aug 2005
Location:
Posted: 20th Apr 2006 23:15
Woah! I didn't think I still had it in me.. LOL

I have vague plans for World Domination

Login to post a reply

Server time is: 2024-11-19 06:33:09
Your offset time is: 2024-11-19 06:33:09