Backface culling

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!

Backface culling

Postby Ian » Mon Feb 20, 2017 10:13 am

Our current backface culling code works 99.9% of the time. But it's clearly failing in edge cases

In La machine guns there is a giant missing poly in the floor
Image

I thought it could have been a bad rom dump, or some other crazy error. However the poly data is there. It's just being backface culled.

Here it is marked in nik's debugging tool
Image

Finding the actual rom model
All using the same matrix, so it's not a problem with the determinant
Image

Flipping over the model
Image

Oh hai there missing polygon >_<

Not sure how the hardware is doing the backface culling. Because some polys clearly we are meant to see their backfaces (for reflections etc). In my code I am calculate the matrix determinant, to see if the matrix flipped the poly winding, and if so to cull the vertices. But perhaps the h/w is doing something else.
Ian
 
Posts: 879
Joined: Tue Feb 23, 2016 9:23 am

Re: Backface culling

Postby Bart » Tue Feb 21, 2017 9:26 pm

I had never noticed this! I guess I must have thought it was some weird shadow. What was required to fix it? My rendering engine also has this bug (although I want to eventually completely remove my engine in favor of yours, so no need to fix the bug there).
User avatar
Bart
Site Admin
 
Posts: 1840
Joined: Thu Sep 01, 2011 2:13 pm
Location: New York City

Re: Backface culling

Postby sonic32 » Thu Feb 23, 2017 11:55 pm

Emulator is no longer almost no defects, incredibly :)
I do not know whether it is aware of the problem, or this is a known problem that is in emulator long ago, this error is almost invisible, only in certain sections of the game


The Scud Race and it is strange that only in this game there a missing 3D(stone), 2D polygons, maybe it has something to do (Backface culling?)missing parts will appear in the(Beginer race),(Medium race)
Attachments
Bez názvu 1.png
Bez názvu 1.png (221 KiB) Viewed 585 times
User avatar
sonic32
 
Posts: 85
Joined: Tue Dec 20, 2011 11:43 am
Location: Slovakia

Re: Backface culling

Postby Ian » Fri Feb 24, 2017 1:19 am

Can you get a comparison screenshot from the real h/w. Scud actually has a few holes in the sky I noticed on the real hw. They aren't using sky boxes and instead painted some random polys at a distance to cover the gaps.
Ian
 
Posts: 879
Joined: Tue Feb 23, 2016 9:23 am

Re: Backface culling

Postby sonic32 » Fri Feb 24, 2017 2:12 am

Ok, I did not know that the missing parts are contained and sky
original hardware,
I tried to look for on Youtube but I can not seem to find it.
But if he does Hardware Model 3 then all is OK
Thank you for the explanation Ian :)
User avatar
sonic32
 
Posts: 85
Joined: Tue Dec 20, 2011 11:43 am
Location: Slovakia


Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 2 guests