Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Z-depth sorting #282058
07/30/09 06:42
07/30/09 06:42
Joined: Apr 2009
Posts: 248
Philippines
seecah Offline OP
Member
seecah  Offline OP
Member

Joined: Apr 2009
Posts: 248
Philippines
Hello All,

Hopefully someone would help me with my problem.. I have here two models which are the house and the windmill but I've got a problem with regards to it's visibility issue, I can still see the windmill even if it should be block by the house on the view. I've read something like z-depth sorting with the engine but I have no clue how to implement this one. I'm using a dds file texture with alpha channel..



Anybody who knows how to solve this issue?

Thanks..



Can't is not an option™
Re: Z-depth sorting [Re: seecah] #282061
07/30/09 06:54
07/30/09 06:54
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Get rid of the alpha channel in your textures unless ABSOLUTELY necessary.
Its a well known DirectX(?) issue.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Z-depth sorting [Re: EvilSOB] #282062
07/30/09 07:20
07/30/09 07:20
Joined: Apr 2009
Posts: 248
Philippines
seecah Offline OP
Member
seecah  Offline OP
Member

Joined: Apr 2009
Posts: 248
Philippines
Yeah I've tried to use 24bit tga file texture but the transparent part will be seen on my trees models..



Ahhhhhh... Is there any other way to solve this one?



Can't is not an option™
Re: Z-depth sorting [Re: seecah] #282067
07/30/09 08:21
07/30/09 08:21
Joined: Apr 2009
Posts: 248
Philippines
seecah Offline OP
Member
seecah  Offline OP
Member

Joined: Apr 2009
Posts: 248
Philippines
Anyone who has any knowledge about this stuff??? please...



Can't is not an option™
Re: Z-depth sorting [Re: seecah] #282069
07/30/09 08:33
07/30/09 08:33
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Another way Ive HEARD of, but never tried...
Ditch the alpha from the TGA, but where there was alpha, make the texture black.
Black-black. r=0, g=0, b=0.
Then for the models needing it, turn on the OVERLAY flag. Black-Black will go invisible...
OR
Set the "d3d_autotransparency" to 1 in main, and make sure pixel Zero (top-left) is the color you want transparent.
Then for the models needing it, turn on the OVERLAY flag. Whatever color pixel Zero is will go invisible...

TRY THIS SMALL SCALE FIRST. Results can sometimes look CRAP! According to other members of the forum.

If you end up HAVING to stay with alpha, wait for further responses.
I dont know of a way around the z-sort errors, but I havent dealt with them so I could easily be unaware of a fix...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Z-depth sorting [Re: EvilSOB] #282082
07/30/09 09:52
07/30/09 09:52
Joined: Apr 2009
Posts: 248
Philippines
seecah Offline OP
Member
seecah  Offline OP
Member

Joined: Apr 2009
Posts: 248
Philippines
Thanks for that work-around EvilSOB.. I'll try this one...



Can't is not an option™
Re: Z-depth sorting [Re: seecah] #282108
07/30/09 12:11
07/30/09 12:11
Joined: Nov 2008
Posts: 215
V
vertex Offline
Member
vertex  Offline
Member
V

Joined: Nov 2008
Posts: 215
One way to solve the problem is to create a 3D tree trunk object and then utilize sprites of the limbs/leafs using 32 bit alpha placed around the tree within wed (no geometry used for limbs-- only sprites placed/rotated by hand in wed). Then group the tree trunk 3d object and all it's sprite leaf/branches into a single object.

Groups (your tree) can be duplicated easily in wed. The great thing about this method (besides fixing your sorting issues) is that you have the opportunity to "scope down" and change each tree (group of trunk and several branch sprites) so that it doesn't have the exact same branch arrangement creating a wide variety of trees. (You can also change scale of the individual elements to create variety. )Create 3-4 trunks and no tree will be the same.


With your mdl house, try and avoid concave elements and assemble your house like the tree in parts within wed i.e. the chimney could be another object. Is this ideal? No, I'm sure a technical fix exists, but it does solve the issue.

Or for a structure-- use map brushes (wmp wed created polys) instead of a model.
(Got a house with exterior and interior? Closing the house entirely (no windows) and providing a twisting foyer so that you can't see the interior from the outside or the outside from the interior should help the engine optimize rendering speed.)

Re: Z-depth sorting [Re: vertex] #282215
07/30/09 20:00
07/30/09 20:00
Joined: Dec 2008
Posts: 271
Saturnus Offline
Member
Saturnus  Offline
Member

Joined: Dec 2008
Posts: 271
You could also use the improved overlay material from the wiki.

quoting wiki:
Quote:
you won't have any sorting errors. the advantage over using 3dgs' overlay flag is that there will be no ugly pixelated border because of the way the values in the alpha channel get interpolated.


However, the script has still to be converted to lite-C.

Re: Z-depth sorting [Re: Saturnus] #282218
07/30/09 20:11
07/30/09 20:11
Joined: Aug 2008
Posts: 133
Sweden, Stockholm
E
Enduriel Offline
Member
Enduriel  Offline
Member
E

Joined: Aug 2008
Posts: 133
Sweden, Stockholm
all you really need to do is make a material with alpha testing, and that's it.

Re: Z-depth sorting [Re: Enduriel] #282273
07/31/09 04:35
07/31/09 04:35
Joined: Apr 2009
Posts: 248
Philippines
seecah Offline OP
Member
seecah  Offline OP
Member

Joined: Apr 2009
Posts: 248
Philippines
@Enduriel
Sounds simple but any advise or example how to implement it?

@vertex & kombucha
Thanks for the advise and the link..



Can't is not an option™
Page 1 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1