real3d mipmaps

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!

real3d mipmaps

Postby Ian » Thu Mar 23, 2017 10:42 am

Well .. someone on youtube pointed this one out to me

Image

I had a quite look at the actual mipmap data

I removed the other textures so you can see it more clearly

Image

The textures actually get darker as they get smaller. So presumably they rolled their own mipmaps specifically to create this effect.

I guess we can support this. Currently I just let the hardware automatically create the entire mipmap chain (this is extremely fast).
But we could use the real3d mipmap data directly. Just in software we would need to create the mipmaps down to 1x1 pixels, as the real3d only seems to have 6 levels of mipmaps. Which for anything over 32 pixels is not enough.
Ian
 
Posts: 1120
Joined: Tue Feb 23, 2016 9:23 am

Re: real3d mipmaps

Postby HarryTuttle » Thu Mar 23, 2017 1:42 pm

Eh eh :D

I knew someone would have notice that :) I confess that I choosed that image on purpose :oops:

That's the mipmap issue we were talking about some day ago.
User avatar
HarryTuttle
 
Posts: 481
Joined: Thu Mar 09, 2017 8:57 am

Re: real3d mipmaps

Postby Ian » Thu Mar 23, 2017 2:41 pm

Haha :)
It was a very good catch. The real3d api is very high level, wasn't sure if exposed direct access to manipulate the mipmaps. I will try and add support for it. Just need some time. Still need to have a proper test of your specular code :)
Ian
 
Posts: 1120
Joined: Tue Feb 23, 2016 9:23 am

Re: real3d mipmaps

Postby Ian » Thu Mar 23, 2017 6:03 pm

Well,
this is using the real3d mipmaps. Actually turned out easier than I thought.
Only had minimal testing.. but basically seems to work. Still using an-isotropic filtering, just the max level is clamped to 6, or technically 5, because the base level is 0.

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

Re: real3d mipmaps

Postby HarryTuttle » Fri Mar 24, 2017 4:15 am

Excellent work! :)

We should also consider that in Model 3 they're probably altering texture LOD to display darker mips nearer. I vaguely remember to have seen something about texture LOD and mipmap clamping in the API headers, but I want to check again to be sure.
User avatar
HarryTuttle
 
Posts: 481
Joined: Thu Mar 09, 2017 8:57 am

Re: real3d mipmaps

Postby Ian » Fri Mar 24, 2017 4:36 am

Yeah I noticed that. They seemed to heavily favour texture aliasing in instead of blurry mipmaps. But the general texture LOD seems to work quite differently to modern h/w.
Ian
 
Posts: 1120
Joined: Tue Feb 23, 2016 9:23 am

Re: real3d mipmaps

Postby HarryTuttle » Fri Mar 24, 2017 5:09 am

That's the reason why, infact, I've put in <Texture.cpp>:
Code: Select all
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 5);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_LOD_BIAS, -2.3f);

As a very ugly hackish all-around solution to display much more aliased textures to imitate the real thing. However this gives incorrect results elsewhere.
User avatar
HarryTuttle
 
Posts: 481
Joined: Thu Mar 09, 2017 8:57 am

Re: real3d mipmaps

Postby Spindizzi » Fri Mar 24, 2017 8:30 am

Hi,
Is it linked to the mimap texture change ?
svn 536 (left) vs svn 533 (right)
Image

edit :
2nd comparison
svn 533 (left) vs svn 536 (right) inverted from first, sorry
Image
Last edited by Spindizzi on Fri Mar 24, 2017 9:18 am, edited 1 time in total.
Spindizzi
 
Posts: 59
Joined: Thu Nov 17, 2016 8:55 am
Location: France

Re: real3d mipmaps

Postby Ian » Fri Mar 24, 2017 8:50 am

yes .. damn it >_<
It's quite possible there are bugs because the mipmap code has never been used before
Ian
 
Posts: 1120
Joined: Tue Feb 23, 2016 9:23 am

Re: real3d mipmaps

Postby scd » Thu Aug 03, 2017 10:20 am

hei ian and harry. what's end up with the mipmaps feature? is it still in progress?

[img]

http://imgur.com/a/aGRTi

[/img]
scd
 
Posts: 16
Joined: Thu Jun 01, 2017 11:35 am

Next

Return to The Dark Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron