Page 5 of 5

Re: Layered transparency

PostPosted: Mon May 15, 2017 11:34 am
by Ian
Well I tried out my matrix idea. Detect shadow matrix, set stencil. Worked really nicely for all games, except Spikeout. Spikeout doesn't use any sort of shadow matrix to squish a 3d model into a plane. The polys themselves have zero height, and without stencil z fight like crazy.

The last possible option must be the hardware is sorting transparent polys. Actually sorting individual polys is probably crazy expensive, not to mention the problem of polys intersecting each other, which definitely happens in ECA with the broken glass.

A cheaper option might be to simply do a depth only pass on polys of the same type. That would stop any overlapping ones, and stop all z fighting completely. Not too expensive either.

Re: Layered transparency

PostPosted: Sun Jun 04, 2017 11:26 am
by HarryTuttle
Ian wrote:A cheaper option might be to simply do a depth only pass on polys of the same type. That would stop any overlapping ones, and stop all z fighting completely. Not too expensive either.


This is basically what I've tried to to do privately. My personal conclusion is that it seems that transparent (textured or not) polys have to be rendered like you said. Opaque polys with textures (with or without alpha channel) have to be sorted individually (from far to near) to deal, for example, with cases like this.

P.S.
I'm trying to slowly come back into Supermodel business before the next major release... ;)

Re: Layered transparency

PostPosted: Mon Jun 05, 2017 8:52 am
by Ian
Well I look forward to seeing what you come up with :)
I think I've made about as much progress as I can. I think the remaining problems are pretty damn tough...

I guessed to there was some sort of top level sorting going on with transparent objects, but exactly what I don't know. Here is one that threw me ..

Ocean hunter.
Image

I've circled the transparency error. The scene needs to be sorted .. to fix it. But this is how the original hardware renders it. If other scenes are sorted using some sort of algorithm, why is this not fixed.

Did briefly brain storm, wonder if the nodes in the culling lists are sorted by the unused 5 bit value in the node header, next to the node ID. They seem to be used to do something ..