[Patch] MicroTexture

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] MicroTexture

Postby HarryTuttle » Mon Mar 13, 2017 2:21 pm

Small update: as soon as I used aniso=2, textures far away became too much sharp and clear, especially at angles more perpendicular to the screen.

I think that they just used the LOD trick in regular textures to "improve" the details, at the expense of some pixel flickering. Watch this (pay attention to the road texture): https://youtu.be/wl6tCbnLl7M?t=49

Update: Let's not forget that the original mipmaps could have been created with the intention to alter the appearance of the textures, or even to darken them like the "dolphin tunnel" in scud race:

scud19.png
scud19.png (62.72 KiB) Viewed 3622 times
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] MicroTexture

Postby Ian » Mon Mar 13, 2017 4:03 pm

My guess is ..
Need to figure out this

Biases the texture sampling rate.
void SetNPScale ( float np_scale ) ;
Description
Sets the texture lod scale for the polygon. A value greater than 1 will increase the range of the transition of texture level of detail. A value less than 1 will decrease the range of the transition of texture level of detail.


Most of the times i've looked at it, the values looked garbage, but I could be wrong.
My guess is the road has a biased texture sampling to keep it sharp and not turning into mush
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] MicroTexture

Postby HarryTuttle » Mon Mar 13, 2017 4:18 pm

Ian wrote:My guess is ..
Need to figure out this

Biases the texture sampling rate.
void SetNPScale ( float np_scale ) ;
Description
Sets the texture lod scale for the polygon. A value greater than 1 will increase the range of the transition of texture level of detail. A value less than 1 will decrease the range of the transition of texture level of detail.


Most of the times i've looked at it, the values looked garbage, but I could be wrong.
My guess is the road has a biased texture sampling to keep it sharp and not turning into mush


Exactly! I think also that poly header 0x05 first 24 bits are three 8 bit values. Maybe for xyz component of something?
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] MicroTexture

Postby Ian » Mon Mar 13, 2017 4:27 pm

Need to check something ..
firstly if the h/w actually does generate mipmaps down to level 1. I can't think why it wouldn't. There is literally an empty space at the bottom of the texture sheet for these textures.

Secondly if all textures are actually mipmapped. I am pretty sure the map symbol in harley isn't, because it looks aliased to hell on the original hardware. I don't know currently how the hardware knows if a mipmap chain is complete or not. There must be some way of knowing

Edit:
Well it looks like the current code is correct. Tiles are only valid down to 8 pixels. And all textures seem mipmapped. I can't find any that aren't, at least not in harley.
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] MicroTexture

Postby Ian » Mon Mar 13, 2017 5:01 pm

This is what header 5 looks like .. drawn as colours. Seems completely random :/

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

Re: [Patch] MicroTexture

Postby HarryTuttle » Mon Mar 13, 2017 5:15 pm

Do the colours change as objects move or are fixed?
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] MicroTexture

Postby Ian » Mon Mar 13, 2017 5:33 pm

They are fixed. All of the background are ROM models, so the data is basically static anyway.
i had a look at some high quality .mp4 files I have of scud from abe, and yeah it's possible there is some sort of fade effect.
But I am not sure really there is anything clear enough we can actually code against. Video also does a good job of washing the details from an image
Attachments
Untitled.jpg
Untitled.jpg (32.65 KiB) Viewed 3593 times
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] MicroTexture

Postby Ian » Mon Mar 13, 2017 5:55 pm

Last image
Thought it might be useful to compare an actual video source (from the emulator), since compression will generally eat the details. This is from an HD capture

Image

Details textures are almost completely gone past the checkboard pattern
Ian
 
Posts: 2044
Joined: Tue Feb 23, 2016 9:23 am

Re: [Patch] MicroTexture

Postby HarryTuttle » Mon Mar 13, 2017 6:45 pm

My assumption was based on some corner cases that, i think, shows some evidence:

Abe's video
scud13.png
Arcade PCM (Abe's video)
scud13.png (90.69 KiB) Viewed 3590 times


Supermodel (post processed in GIMP to match video footage gamma/colour/blurriness):
scud20.jpg
Supermodel
scud20.jpg (195.87 KiB) Viewed 3590 times


The checkered road is partially covered with microTexture. But there are other cases like Daytona2 where the road has dark tire traces that literally disappear at short distance where microTexture is used 'cause, when blended, the latter being brighter, "neutralizes" the dark traces. I'll post some screencapture in next post to simplify the concept.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

Re: [Patch] MicroTexture

Postby HarryTuttle » Mon Mar 13, 2017 7:01 pm

Daytona2:

Abe's video:
daytona2_5.jpg
daytona2_5.jpg (195.11 KiB) Viewed 3588 times


Supermodel (post-processed):
daytona2_6.jpg
daytona2_6.jpg (190.7 KiB) Viewed 3588 times


Same goes for the white stripes in scud's road texture where they are "dirty" at near distance because of MT, then they become white, and finally become again darker and fuzzy because of mipmapping.
User avatar
HarryTuttle
 
Posts: 646
Joined: Thu Mar 09, 2017 8:57 am

PreviousNext

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron