Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 4 of 4 1 2 3 4
Re: Z-Order problems [Re: broozar] #75361
07/23/06 13:14
07/23/06 13:14
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Oops nevermind, I figured out my error, lol try assigning that material to an entity action that doesn't even get used. Excuse my comment please.

Cheers


PHeMoX, Innervision Software (c) 1995-2008

For more info visit: Innervision Software
Re: Z-Order problems [Re: PHeMoX] #75362
07/24/06 07:15
07/24/06 07:15
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
apparently you can fix the sorting errors of individual polygons on a model by creating them in the right order. since they aren't sorted, they are just rendered in the order in which they are saved to the file (if that makes sense). so, polygons created last will always appear ontop, and those created first will always appear underneath. i guess it could be possible to create the whole model as normal, and then cut-paste polygons that need to be re-sorted. this could be tedious, but most of the time you would be doing them in groups. i don't actually know if this will work, but i don't see why not.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Z-Order problems [Re: JibbSmart] #75363
07/24/06 08:41
07/24/06 08:41
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
Believe me, you would not want an engine that re-sorts polygons in real time. Except for a slide show, maybe.

Re: Z-Order problems [Re: jcl] #75364
07/25/06 09:17
07/25/06 09:17
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
but would us cut-pasting polygons in the correct order work?

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Z-Order problems [Re: jcl] #75365
08/03/06 16:24
08/03/06 16:24
Joined: Jul 2005
Posts: 366
eleroux Offline
Senior Member
eleroux  Offline
Senior Member

Joined: Jul 2005
Posts: 366
Quote:

Not really. But I've added some more information to the FAQ explanation, which should clear up the issue a little:

Q. I have problems with the sorting of transparent entities or alpha channel textures. For instance, I'm trying to make a tree by crossing two sprite like a 'X. When using 32 bit TGA sprites, the first sprite is always drawn before the second sprite. This doesn't happen when I use PCX or BMP or 24 bit TGA sprites.

A. Transparent entities - meaning entities with TRANSPARENT flag or with an alpha channel texture - can not write into the z buffer. Thus the engine sorts them according to the distances of their origins. Neverteless, transparency causes visible errors when objects intersect or when a concave mesh consists of transparent polygons. You just have to think a little to avoid those mistakes. For instance, make your 'X' from 4 connected sprites rather than 2 intersectings sprites, and separate a transparent mesh into convex parts.

Hope this helps.





Yes, this helps a lot.

But, when you said 'not really', do you mean I got things completely wrong? does the z-enabling material code solve the z-sorting issue or not?

I'm working on some tutorials right now and I'd appreciate if you point me to what parts I got wrong on this, really.

Thanks!

Emilio

Re: Z-Order problems [Re: eleroux] #75366
08/03/06 17:16
08/03/06 17:16
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Quote:


i guess it could be possible to create the whole model as normal, and then cut-paste polygons that need to be re-sorted. this could be tedious, but most of the time you would be doing them in groups. i don't actually know if this will work, but i don't see why not.





Yes, that is possible. There was an article about it on the Virtual Worlds site that no longer exists. I can't remember how it works exactly, I think you need to build the model from the inside to the outside, but it certainly is affected by the order the polies are written.

I have been having difficulty with this recently too. Perhaps this thread will also be helpful:

http://www.coniserver.net/ubbthreads/showflat.php/Cat/0/Number/677827/Main/677690/#Post677827


Edit> I tried DaBrozerz material. It certainly fixed those sorting errors; in fact it got rid of the alpha mask altogether. In other words it doesn't work.




Last edited by A.Russell; 08/03/06 17:52.
Re: Z-Order problems [Re: A.Russell] #75367
08/03/06 20:54
08/03/06 20:54
Joined: Jul 2005
Posts: 366
eleroux Offline
Senior Member
eleroux  Offline
Senior Member

Joined: Jul 2005
Posts: 366
What would be the use of manually sorting polygons? If the object turns 180 degrees around, the first polygon must be rendered last now.

What should be rendered first in a humanoid? the left leg or the right arm? It all depends -literally - on a Point Of View.


~Emilio

Re: Z-Order problems [Re: eleroux] #75368
08/04/06 04:37
08/04/06 04:37
Joined: Mar 2003
Posts: 4,427
Japan
A
A.Russell Offline
Expert
A.Russell  Offline
Expert
A

Joined: Mar 2003
Posts: 4,427
Japan
Eleroux, I wish the article was still around, but is demonstrated with screen shots how it worked.

Anyway, for anyone interested, I found a solution to sorting problems on entities with alpha transparency texture in the improved overlay shader (thanks to MK_1):

Code:

material right_alpha_mat
{
effect =
"
technique right_alpha1
{
pass p0 {zWriteEnable=true; alphaTestEnable=true;}
}
";
}

action right_alpha_acc
{
my.material = right_alpha_mat;
my.dynamic = off;
}



Page 4 of 4 1 2 3 4

Moderated by  old_bill, Tobias 

Gamestudio download | 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