[Patch] Specular Highlight

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: [Patch] Specular Highlight

Postby HarryTuttle » Tue Mar 28, 2017 5:35 am

Quick & dirty comparison before return to work:

one of the "best" arcade footage I've found...
lm2a.jpeg
lm2a.jpeg (210.47 KiB) Viewed 7318 times


Supermodel (post processed trying to match footage):
lm2c.png
lm2c.png (211 KiB) Viewed 7318 times


In Supermodel the car's side glass has "dimmed" specular, but I think It's about the impact on transparent surfaces which I've got to rework a bit. Gonna check that tonight anyway.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby Ian » Tue Mar 28, 2017 5:38 am

That looks a good match
Ian
 
Posts: 1647
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Specular Highlight

Postby nuexzz.. » Tue Mar 28, 2017 6:02 am

Ian wrote:
I do wonder though if it would be worth trying the model 2 specular formula, since I never actually tried it.


The model 2 uses a sheet of semitransparent texture that is applied over the textures of the car in this case
User avatar
nuexzz..
 
Posts: 303
Joined: Sun Sep 25, 2011 3:10 pm
Location: Argentina

Re: [Patch] Specular Highlight

Postby model123 » Tue Mar 28, 2017 9:21 am

Hello
It is totally my guess, but the speculation at Le Mans' car select is
Is it not because there are two types but the direction of lighting changes according to the time in the game?

These videos were taken at the same store.
I guess the shooting date also is the same day as I guess from the title
You can see that the direction of specular has changed

Image
https://www.youtube.com/watch?v=NGfCmUWLKRY&t=3117s

Convert to English with google translation
model123
 
Posts: 69
Joined: Wed Mar 08, 2017 8:34 am

Re: [Patch] Specular Highlight

Postby HarryTuttle » Tue Mar 28, 2017 1:55 pm

model123 wrote:the direction of lighting changes according to the time in the game


Yeah, it could be... considering that Lemans24 does this when you start racing the 24 hours, also Virtua Striker 2 does this in the attract demo (changes from daylight to dusk etc.)
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby Ian » Tue Mar 28, 2017 4:22 pm

HarryTuttle wrote:
Ian wrote:You tried just normalising the normals for the per vertex lighting?

Yes, then I've done the dot product per fragment.

Ian wrote:Puzzled why the poly on the bottom left of the yellow balloon looks off

That's another thing I think you could be better able to solve: I noticed that quad polys have sometime the wrong inner edge orientation, so the shading has an odd distribution, dunno if it could be solved by using quad primitives in OpenGL.

Anyway, just for testing, I've flipped in my build every the counter-clock drawn quads. This has "fixed" some shading in Harley and Dirt Devils, i.e. to visually match Model 3, but broke other games.

However even with that, there's some difference you can still notice at very near distance. I'll post a better screenshot to explain what I mean, incidentally that was the starting point for my specular highlight simulation.

UPDATE:
That's it, Model 3 (left), Supermodel "good" shading (center), Supermodel "bad" shading (right)
h1.jpeg


Note there's also some texturing difference, in that case on the suspension, but a better example is in Scud, which I'll post soon.


Harry,
do you have any more examples of these? When you say flipped, you flipped the winding? So maybe seeing the back face instead? Should probably add, there is a flag in the header that apparently defines the winding. But could never figure out if it ever did anything. Maybe the flag says to draw the back faces.
Ian
 
Posts: 1647
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Specular Highlight

Postby HarryTuttle » Tue Mar 28, 2017 4:59 pm

Ian wrote:Should probably add, there is a flag in the header that apparently defines the winding

I've tried to use that bit in place of "dotProd":
Code: Select all
clockWise   = dotProd >= 0;

And it worsened things, but it was just a quick try and I didn't spent much time in that... could be a start.

Ian wrote:When you say flipped, you flipped the winding? So maybe seeing the back face instead?

No, I meant the "slope orientation" of the inner edge of the quad like this:
edge.png
edge.png (20.76 KiB) Viewed 7222 times


UPDATE:
to simplify the concept and in reference to the pic above: I've changed the vertex order for the first triangle from 0-1-3 to 0-1-2, and the complementary one accordingly.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby Ian » Tue Mar 28, 2017 5:20 pm

interesting
i'll try and investigate this one
Need a few more fail examples :)
The thing with quads is .. technically there are 2 ways to split them. Maybe we are picking the wrong one .. I also have a feeling these 'quads' are maybe not planar ?
Ian
 
Posts: 1647
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Specular Highlight

Postby HarryTuttle » Tue Mar 28, 2017 5:30 pm

Tomorrow I'll try to get some more screenshots, at least where I was able to find those "defects". I remember Dirt Devils was full of those "failed" shading, visible in the specular highlights of the desert buggy for example.

Ian wrote:I also have a feeling these 'quads' are maybe not planar

Maybe, but could also be rendered as tri/quad strip?
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Specular Highlight

Postby Ian » Tue Mar 28, 2017 5:35 pm

Quads are rendered as 2 triangles. But there are 2 ways to split a quad. If the quad is planar (it should be) both ways will look identical. If the quad isn't planar where you split it matters. Maybe we are simply using the wrong split
Ian
 
Posts: 1647
Joined: Tue Feb 23, 2016 9:23 am

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 4 guests