Layered transparency

Technical discussion for those interested in Supermodel development and Model 3 reverse engineering. Prospective contributors welcome.
Forum rules
Keep it classy!

  • No ROM requests or links.
  • Do not ask to be a play tester.
  • Do not ask about release dates.
  • No drama!

Re: Layered transparency

Postby Ian » Mon May 15, 2017 11:34 am

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.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: Layered transparency

Postby HarryTuttle » Sun Jun 04, 2017 11:26 am

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... ;)
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: Layered transparency

Postby Ian » Mon Jun 05, 2017 8:52 am

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 ..
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Previous

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest