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 / Image order and disable zread

Author
Message
Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 17th May 2006 16:00
So we all know when disabling zread on objects, the order in which they are rendered is based on the image number, right? So what I do is reserve the first 10 or so image id's for my skydome backdrop, and manually texture those objects in the order I want them to appear, no problem. Now, all the OTHER objects (just so long as they use a texture id higher than the sky) show up infront, as they should.

HOWEVER, if you have a pre textured model (so you dont have to load the image and texture the object), I CAN NOT figure out how to get these bastards to work. No matter the order in which they are created (since they have no image id), they ALWAYS show up behind my sky sphere.

Has anyone else run into this problem? Have any ideas? Ill have to test to see if its a problem in Pro as well...

All you need is zeal
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 18th May 2006 01:58
Easy use save object to save your sky and load it last. This will make it have the lowest possible image number.

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 18th May 2006 05:07
Hmm I dont think this will work. I need to update my sky textures at some point during the main loop, so I fear that will set me back to square one.

All you need is zeal
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 18th May 2006 05:16
Not necessarily. I have another plan. Load a plain for each of your sky textures (each one saved to auto load the textures you want for the sky) and hide them. Make sure you load them last. You can then use limb texture() to capture the image numbers to texture your skysphere with and they will still be the lowest numbers.

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 18th May 2006 16:31
Akkk having to use multiple limbs just to avoid retexturing because it jacks up zdepth? I think a better solution would be for lee to just fix it so pre textured models are considered the highest image id, rather than lowest.

Right now we have to manually texture the billion OTHER objects we want to display ontop of our sky. It should be the other way around.

All you need is zeal
MiR
21
Years of Service
User Offline
Joined: 13th Jul 2003
Location: Spain
Posted: 18th May 2006 17:07
Well suposable LeeĀ“s going to start work on the DGDK path soon so it might be worth posting it as a bug and seeing what he says.

Need path finding in your games? Have a look at the tutorials on www.telefonica.net/web2/paskyprog/.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th May 2006 01:11
Who said anything about multiple limbs? Just load a plain object to hold the texture index for each sky texture you want and hide them. You can then use those plains' textures (image numbers captured by limb texture(newplain,0) to texture your sky. If Lee changes it this way, no doubt someone else will complain that it acts like that. It's not perfect but you only waist 2 polys per texture.

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 19th May 2006 01:33
Ahhh thats pretty clever, but are you sure it will work? According to the sdk help files the limb texture command...

Quote: "Limbs that have been loaded pre-textured contain internal image data and return an image number of zero. "


So its not going to return a sub zero number, thus I still wont be able to get a image id 'lower' that all my other pre textured models.

All you need is zeal
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th May 2006 01:36 Edited at: 19th May 2006 01:37
It works fine in DBP ( that's how I do my skys ), you may want to try it. If DGSDK has this limitation then I definitely will not be buying it.

[edit] From the DBP help files as well:

Quote: "This command will return the integer image number used to texture the specified limb of the 3D object. Limbs that have been loaded pre-textured contain internal image data and return an image number of zero. The parameters should be specified using integer values."


Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 19th May 2006 01:51
Yeah the dbp help file looks exactly the same. So youre saying you DONT get zero for a image number? You actually get a real image id that you can use?

All you need is zeal
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th May 2006 01:59
Yes it will return a negative image number for auto loading textures. They start at -1 and dec by the order they are loaded in.

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 19th May 2006 03:06
Negative image numbers. Thats just KRAZY

All you need is zeal
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 19th May 2006 03:18
I'm glad they did it though, or we'd have 1000 noobs asking why an image already existed when they tried to load an image to an index used by an object

Zeal
22
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 19th May 2006 20:14 Edited at: 19th May 2006 20:21
Well been playing with this all morning, and I cant get that damn limb texture command to return anything but 0 on pre textured models. This is in sdk AND pro. It does return the proper image id for manually textured models, but everything else is 0 (ive yet to see it return a negative number).

I also tryed using some outrageous number (like -9999) but it seems you cant use the id until its been 'initialized'. Cry

Hey lost can you post the place holder plains you use? Maybe its just the model im using, here it is... curious to see if it works for you.

*EDIT Haha! Nevermind! All this time I had been running the function with limb ZERO (its the only limb in the object, wouldnt it be limb 0?), anyway, I tryed limb ONE and I got a negative number! Looks like it might be working now...

Only thing im concerned with now is that I might eventually try and load a object AFTER the sky (on the fly). Any NEW object loaded during the main loop is going to muck everything up, because it will be given a lower image id.

Got any creative ideas for that?

All you need is zeal

Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 20th May 2006 01:41 Edited at: 20th May 2006 15:37
Only thing you can do there is retexture the new objects or load more planes with the textures of the objects you want to add later. And load them before your sky texture objects.

What Lee really should do, is make disable object zread objects work by image number (as it does now). Only make it use image numbers of objects that have disable object zread on them. And make it draw disable object zread objects before all other objects. This should work for everyone.

Blitz has an awesome entityorder command that works similar, and is just right.

[edit] Actually I just ran into another feature of DBP. You can preload all of your textures use in the univers(game), in the order that you want, and when you load an object it will use the images you have loaded if the names match. Instead of loading copies

Login to post a reply

Server time is: 2024-11-19 06:27:30
Your offset time is: 2024-11-19 06:27:30