Critical Ocean Hunter issue

Having technical difficulties with Supermodel? Last-minute wardrobe malfunction? Get help here.
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: Critical Ocean Hunter issue

Postby Ian » Fri Apr 14, 2017 4:14 am

I had a bit of a chance to actually look at this
I think you are on the right lines.

I am pretty sure the real hardware wouldn't have normalised (matrix*normal) for the simple reason it's pretty expensive. Especially doing a square root per normal ..

What I think is happening is, a scaling matrix is making the normals much bigger. Pushing them outside the normal range. I think what we are drawing, is probably what the original creators would have wanted. However that's not what the h/w is doing.

Maybe the numbers are wrapping around or something. The normals are stored as signed bytes, maybe the hardware is still using this representation after multiplying by the normal matrix and the numbers are simply wrapping around?
Ian
 
Posts: 1547
Joined: Tue Feb 23, 2016 9:23 am

Re: Critical Ocean Hunter issue

Postby HarryTuttle » Fri Apr 14, 2017 4:23 am

Ian wrote:I am pretty sure the real hardware wouldn't have normalised (matrix*normal) for the simple reason it's pretty expensive. Especially doing a square root per normal ..

What I think is happening is, a scaling matrix is making the normals much bigger. Pushing them outside the normal range. I think what we are drawing, is probably what the original creators would have wanted. However that's not what the h/w is doing.

A confirmation to that is if you don't normalize that product in vertex shader the end result is just correct, save for the aforementioned strange models. It's what I tested yesterday in Ocean Hunter, Harley, Scud and VF3 (as test cases for the various hw stepping).

Ian wrote:Maybe the numbers are wrapping around or something. The normals are stored as signed bytes, maybe the hardware is still using this representation after multiplying by the normal matrix and the numbers are simply wrapping around?

I thought of something similar, I'll try to test this theory later today and let you know.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: Critical Ocean Hunter issue

Postby Ian » Fri Apr 14, 2017 4:26 am

Here I tried some sort of dumb wrap around if unit length of normal > 1

Image
Ian
 
Posts: 1547
Joined: Tue Feb 23, 2016 9:23 am

Re: Critical Ocean Hunter issue

Postby HarryTuttle » Fri Apr 14, 2017 4:30 am

At first look I'd say: BINGO! :)
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: Critical Ocean Hunter issue

Postby Ian » Fri Apr 14, 2017 4:57 am

If it is signed interger overflow, I am not sure what we should do. I know cpu side, the results are 'undefined' but exactly what this translates to I don't know
Ian
 
Posts: 1547
Joined: Tue Feb 23, 2016 9:23 am

Re: Critical Ocean Hunter issue

Postby HarryTuttle » Fri Apr 14, 2017 5:02 am

I saw similar overflow with the sun normals (and intensity) in Star Wars, I wonder if that could also be the case of the wrong sun direction vector in some scenes of LA Machineguns.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: Critical Ocean Hunter issue

Postby Ian » Fri Apr 14, 2017 5:05 am

Yeah it's possible
Do you have screenshots of the wrong sun dir ?
Ian
 
Posts: 1547
Joined: Tue Feb 23, 2016 9:23 am

Re: Critical Ocean Hunter issue

Postby HarryTuttle » Fri Apr 14, 2017 6:29 am

Here they are, consider that not all elements are rendered in the same viewport (last time I checked), I've evidentiated the most relevant ones. Most of the building in the background are fixed-shaded with/without translator map enabled.

Left: arcade, Right: Supermodel
lam01.jpeg
lam01.jpeg (240.03 KiB) Viewed 5286 times

lam02.jpeg
lam02.jpeg (230.84 KiB) Viewed 5286 times

lam03.jpeg
lam03.jpeg (249.16 KiB) Viewed 5286 times

There's also the Lion statue case, here (http://www.supermodel3.com/Forum/viewtopic.php?f=7&t=1350&start=40#p11761) I've posted an hacked sample with altered sun vectors to make it work but the problem is there too.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: Critical Ocean Hunter issue

Postby Ian » Fri Apr 14, 2017 8:00 am

Yeah that's strange... although I wonder if some of those differences are simply due to specular
Ian
 
Posts: 1547
Joined: Tue Feb 23, 2016 9:23 am

Re: Critical Ocean Hunter issue

Postby HarryTuttle » Fri Apr 14, 2017 9:03 am

Ian wrote:Yeah that's strange... although I wonder if some of those differences are simply due to specular


I don't think so, specular direction is directly dependent of sun direction vector, and the values are fine in many games, however in some scenes of LA Machineguns the whole light direction is just off.

The lion statue, when you invert x,z sun vector components, is rendered fine. I've tried to do the same in the scenes posted before, and while the direction is still incorrect, I've noticed a more dramatic light/shadow contrast in models.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

PreviousNext

Return to The Fitting Room

Who is online

Users browsing this forum: No registered users and 9 guests