[Patch] Sun Shading

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] Sun Shading

Postby Ian » Mon Jul 17, 2017 3:16 pm

HarryTuttle wrote:
ConversusVans wrote:Probably is a model attribute;

Btw I'm still investigating...


It could well be a poly attribute
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Sun Shading

Postby Bart » Tue Jul 18, 2017 11:11 pm

HarryTuttle wrote:
Ian wrote:That means the lighting in the Wii port is wrong :) Or partly wrong


That's why we should be proud of Supermodel! :)

We're slowly understanding all the "gotchas" of Real3D while others prefer following the standard formulae... :twisted:


This is amazing work, guys. Looks like you guys are really getting very close to sorting most of it out. I'm not sure if any complex, undocumented 3D hardware in MAME is emulated as well as this :) This is turning into a milestone for arcade emulation.
User avatar
Bart
Site Admin
 
Posts: 3086
Joined: Thu Sep 01, 2011 2:13 pm
Location: Reno, Nevada

Re: [Patch] Sun Shading

Postby Ian » Wed Jul 19, 2017 6:06 am

Not really had a chance to dig into this problem .. but quick question for Harry
Is that unclamped formula always correct for daytona and la machine guns?
There are some configuration registers for the GPU which we have no idea what they do. Wonder if they setup the lighting model ..

It's possible the lighting model is written into the polys .. but seems unlikely. Ie if you put one of those models into a scene that was lit normally it would look quite wrong. More likely (i think) to be written into the viewport with the other lighting parameters, or possibly one of those config registers.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Sun Shading

Postby HarryTuttle » Wed Jul 19, 2017 12:10 pm

Ian wrote:Is that unclamped formula always correct for daytona and la machine guns?
There are some configuration registers for the GPU which we have no idea what they do. Wonder if they setup the lighting model ..


For Daytona 2 it seems to be always correct, checked with direct capture high quality footage.

As for L.A. Machineguns I'm currently checking. What I want to look for is also the opposite case: when it's wrong is always like that for every object in the scene?

I'll update with the results.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Sun Shading

Postby Ian » Wed Jul 19, 2017 12:43 pm

Are the car models the same between Daytona power and edge edition? Because i noticed they use a different lighting model. Battle on the edge uses the normal lighting model
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Sun Shading

Postby HarryTuttle » Wed Jul 19, 2017 1:02 pm

Something I can confirm for now:

- Every object in a viewport is lightened with the same light model;
- Steps 1.0 and 1.5 seem to be always clamped;
- Step 2.x can choose which model use for a given viewport;
- The two Dayonas lightning model differs

So, yes, it could be something at viewport level that is also not present, or is ignored, in older hw steps.

UPDATE:
L.A. Machineguns light model is actually correct (not clamped)
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Sun Shading

Postby Ian » Wed Jul 19, 2017 3:42 pm

Would you say the lighting model can vary from 1 viewport to the next?
Do you have any examples where in 1 game the model looks correct for some viewports, but not in others?

If so that would rule out any config registers. I had a look at the car models in the car select stage, and they look basically identical between the 2 games.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Sun Shading

Postby HarryTuttle » Thu Jul 20, 2017 3:23 am

I wrote "viewport" to say that is not at object level, but honestly I still haven't noticed any change between a viewport and another in the same priority or scene.

I would rather say that the light model configuration is at scene-level, this is what I've really observed for now.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] Sun Shading

Postby Ian » Thu Jul 20, 2017 4:13 am

I did a bit of digging with this last night
I investigated the config registers but they don't seem to have any effect. Daytona and scud set the exact same config registers so i can't be that.

The two daytonas seem to have identical polys for the car models, so unless I missed something it's not that. So that either leaves some bit in the viewport or less likely something in the culling nodes.

Will see I can do a binary diff tonight on the viewports that the cars in daytona are attached to in game. Hopefully that will show something up
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] Sun Shading

Postby Ian » Thu Jul 20, 2017 9:34 am

Well I did a comparison of the viewports ..
First value is hex number, 2nd is the hex value for that memory location, 3rd value is the value as a float
https://github.com/mamedev/mame/blob/ma ... 3.cpp#L713

Image

Nothing obvious shows up, other than some different fog/scroll fog values.

Here is the viewport data that it's pointing to

Battle on the edge
Image

Power edition
Image

I guess the lighting parameter is hiding elsewhere ..

This is the poly header for the first polygon on the car wheel in each version
Image
They look basically identical unless I am missing something
Ian
 
Posts: 2044
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 1 guest

cron