Welcome
Ladies and Gents:

These forums are now closed and registration disabled.

Please join us at our new forum on Proboards. Our hope is that these new forums are more stable, provide more and better features, and allow continuation of the project forums in a safer, more secure, long term environment.

me3explorer.proboards.com

--The ME3Explorer Team

Research - MIP Maps and Texturegroups

Area for texture-specific, modding-related discussion. Topics that involve models/meshes/actors go in the mesh area. As with other non-toolset related content, answers not guaranteed.

Research - MIP Maps and Texturegroups

Postby CreeperLava » 07 Jun 2016, 06:41

PART 1 : Defining a testing methodology
Spoiler:
I guess this is research, although I'm sure some of you already know it. I wanted to know how MIPs actually behaved in game, like how they transition, how quickly, and if high resolution MIPs are really used at all. Screenshots :
Image
Image
Image
Image

Turns out, resolution superior to 2048 aren't useful for environment textures, and the difference between 1024 and 2048 is relatively small (but there). 4096 is only useful for characters, even then, only characters you see often are worthy of 4k. Most of the time, you see 512 or 1024 MIPs, in regular gameplay.

The pics and the test texture available here : https://mega.nz/#!U5kX0ZBD!GfOA6nPKQ157 ... EWs385lvJA


PART 2 : MIP transitions and of the usefulness of 4K textures
Spoiler:
Yesterday I said that 4k would probably only be useful for characters, I had some time to test it today :

Image
For reference. Edit : picture seems too big to fit, here is a link : http://imgur.com/TC3Ia0g
Image
So that's how you optimize display in TPF/DDS Tools, interesting.
Image
256. Meet the improved Garrus with his shiny new 4K texture ! From now on I took a picture each time a MIP transition happened.
Image
512. Using giftfish's Olivia as a testing assistant.
Image
1024.
Image
2048.
Image
4096.
Image
Nice pixels you have, Garrus.

Conclusion : Yes, 4K textures are definitely useful, at least for squad mates.


PART 3 : More of the same
Spoiler:
I was inspired by Alvaro's remarks, here is some more testing. This time I took each screenshot when the transition took place, to get a coherent set of results.
Image
1024 texture at 1080p.
Image
1024 texture at 480p (or something around that).
Image
4096 texture at 480p.

It looks like resolution doesn't matter, but interestingly, neither does size of the texture. The higher resolution MIPs seem crammed into the distance beyond this transition, whatever the resolution of the texture ; like if the MIP transition was function of the distance, not of the resolution. So 4k textures are definitely useless for environments and stuff you only see from afar, even if they do have higher resolution MIPs. Psychologically though, it feels good to get 4k everywhere^^.

Obviously this could be a behaviour common only to the UE engine, and could be different in other games.


PART 4 : TextureGroup and LOD settings
Spoiler:
I did some more tests with these LOD settings, partly to try to find which settings would be the best, and to understand why some of them wouldn't work. During the testing, I also remembered something I had completely forgotten : all modded textures are placed in the shadowmap texturegroup. So, obviously, all the testing has been done on this texturegroup with the same test texture as before. To begin with, here are the ME3 vanilla LOD settings (testing has been done for ME3) :
Code: Select all
texturegroup_ambientlightmap=(MinLODSize=32,MaxLODSize=512,LODBias=0)
texturegroup_apl_1024=(MinLODSize=32,MaxLODSize=1024,LODBias=0)
texturegroup_apl_128=(MinLODSize=32,MaxLODSize=128,LODBias=0)
texturegroup_apl_256=(MinLODSize=32,MaxLODSize=256,LODBias=0)
texturegroup_apl_512=(MinLODSize=32,MaxLODSize=512,LODBias=0)
texturegroup_character_1024=(MinLODSize=32,MaxLODSize=1024,LODBias=0)
texturegroup_character_diff=(MinLODSize=32,MaxLODSize=512,LODBias=0)
texturegroup_character_norm=(MinLODSize=32,MaxLODSize=512,LODBias=0)
texturegroup_character_spec=(MinLODSize=32,MaxLODSize=256,LODBias=0)
texturegroup_environment_1024=(MinLODSize=32,MaxLODSize=1024,LODBias=0)
texturegroup_environment_128=(MinLODSize=32,MaxLODSize=128,LODBias=0)
texturegroup_environment_256=(MinLODSize=32,MaxLODSize=256,LODBias=0)
texturegroup_environment_512=(MinLODSize=32,MaxLODSize=512,LODBias=0)
texturegroup_environment_64=(MinLODSize=32,MaxLODSize=64,LODBias=0)
texturegroup_promotional=(MinLODSize=32,MaxLODSize=2048,LODBias=0)
texturegroup_ui=(MinLODSize=8,MaxLODSize=1024,LODBias=0)
texturegroup_vfx_1024=(MinLODSize=8,MaxLODSize=1024,LODBias=0)
texturegroup_vfx_128=(MinLODSize=8,MaxLODSize=128,LODBias=0)
texturegroup_vfx_256=(MinLODSize=8,MaxLODSize=256,LODBias=0)
texturegroup_vfx_512=(MinLODSize=8,MaxLODSize=512,LODBias=0)
texturegroup_vfx_64=(MinLODSize=8,MaxLODSize=64,LODBias=0)
texturegroup_world=(MinLODSize=256,MaxLODSize=512,LODBias=0)


texturegroup_character=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_characternormalmap=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_effects=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=linear,MipFilter=point)
texturegroup_lightmap=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_rendertarget=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_shadowmap=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point,NumStreamedMips=3)
texturegroup_skybox=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_vehicle=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_vehiclenormalmap=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_weapon=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_weaponnormalmap=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_worldnormalmap=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)


texturegroup_characterspecular=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_cinematic=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_effectsnotfiltered=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_mobileflattened=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_procbuilding_face=(MinLODSize=1,MaxLODSize=1024,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_procbuilding_lightmap=(MinLODSize=1,MaxLODSize=256,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_vehiclespecular=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_weaponspecular=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)
texturegroup_worldspecular=(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)


Now, how do these work ?
Here is what I understood of the parameters of TEXTUREGROUPs (thanks to this doc https://udn.epicgames.com/Three/Texture ... roperties). We'll see that this definition can't always be verified empirically. My hypothesis is that the customized Unreal Engine of Bioware prevents some of these settings of working as intended.

- MinLODBias : Defines the lowest possible MIP that will be used. Should be set at most to the same resolution than that of the smallest texture in the group. The biggest problem here, is to find that texture. My testing determined that a higher MinLODBias didn't prevent lower MIPs from appearing (down to 32px at most from my experience). Changing MinLODBias has no effect whatsoever on the game (at least, for shadowmap texturegroup).

- MaxLODBias : From my understanding, this could be set to anything as long as it's superior or equal to MinLODBias. Ideally, set it to 4096 so that the highest possible MIP will always be used. My testing determined that a lower MaxLODBias did prevent higher MIPs from appearing (eg limit a 4096px to it's 512px MIP).
This sentence from UDK doc confirms the experience : "It would increase distributable package size with no rendering quality benefit if a game shipped with 2048 textures assigned to a TextureGroup with a MaxLODSize of 1024." - textures would be downscaled to 1024px.

- LODBias : Serves as an offset to the MIP level that should be used first. It is cumulative with a higher level offset in the Texture Properties (my hypothesis : this one is baked in the game's code). For instance, if both are equal to 0, the highest MIP will be used first. Same if one is 1 and the other is -1 (1-1=0).
If the sum equals 1, the second MIP resolution will be used first, which means the texture will be downscaled. And so on...
This is speculation, but I suppose graphical glitches happen if the sum is equal to -1 or less (ie negative). The game would search for a MIP level that doesn't exist (eg 2048px on a 1024px texture) -> thus, black placeholder texture.
As with MinLODBias, testing showed no change when LODBias was changed, whether positive or negative.

- MinMagFilter, MipFilter, NumStreamedMips are defined in the UDK's doc and don't interest us here, so I won't describe them.


Here is a picture where you can see the Min/Max tests.
Image

Another interesting discovery I had no idea about, the GamerSettings.ini's settings (in Documents/Bioware) take precedence over the Coalesced.ini whenever a parameter is present in both. For example, resolution can only be set in the GamerSettings ini.
Setting texturegroup_shadowmap=(MinLODSize=1,MaxLODSize=512,LODBias=0,MinMagFilter=aniso,MipFilter=point,NumStreamedMips=3) in the coalesced.bin and
texturegroup_shadowmap=(MinLODSize=1,MaxLODSize=256,LODBias=0,MinMagFilter=aniso,MipFilter=point,NumStreamedMips=3) in the GamerSettings.ini results in a maximum resolution of 256px, the Coalesced is ignored.

I've done the same tests with ME2, with the same results, unsurprisingly. The only difference is that shadowmap is called lightandshadowmap :
texturegroup_lightandshadowmap=(MinLODSize=256,MaxLODSize=256,LODBias=0)


TL;DR : MinLODBias and LODBias have no impact on the game, as far as I can see. They are probably baked in the code. MaxLODBias can be changed, but since all modded textures are currently placed in the Shadowmap texturegroup with MaxLODBias=4096, there's no use in changing it for the other texturegroups.
This can also be said for ME2.


EXTRA :
Spoiler:
Just discovered an interesting fact : Changing the MaxLODBias of a texturegroup also changes the Texmod hash of it's textures in-game (if they're larger than the MaxLODBias). Weird, since the actual texture from which the lower MIP is extracted remains the same.
Which explains why some of Smarteck's textures are not found in tree (NFIT). Since they belong to a texturegroup that displays them below their actual resolution, the hash displayed by Texmod is not the same as the one seen in ME3Explorer.

Also interesting : if you want to edit texturegroup settings for ME2, make sure your changes are located in the [SystemSettings] category of the GamerSettings.ini. Placing them in [TextureLODSettings] has no effect on the game.
Last edited by CreeperLava on 01 Nov 2016, 20:50, edited 10 times in total.
User avatar
CreeperLava
User
 
Posts: 844
Joined: 07 Feb 2015, 21:52
Has thanked: 119 time
Have thanks: 83 time

Re: MIP Maps

Postby KFreon » 07 Jun 2016, 07:52

Nice testing methodology :)
User avatar
KFreon
Toolset Developer
 
Posts: 1665
Joined: 16 Apr 2013, 00:57
Has thanked: 83 time
Have thanks: 520 time

Re: MIP Maps

Postby giftfish » 07 Jun 2016, 15:08

Nice pics :)

As far as I know, mips settings are at least in part managed via the min/max specifications for a slew of different LOD texture groups in the coalesced. It's here, for example, that the "character" group is set at 4K, and is why various environmental textures use lower resolutions:

Spoiler:
<Property name="texturegroup_ambientlightmap" type="2">(MinLODSize=32,MaxLODSize=512,LODBias=0)</Property>
<Property name="texturegroup_apl_1024" type="2">(MinLODSize=32,MaxLODSize=1024,LODBias=0)</Property>
<Property name="texturegroup_apl_128" type="2">(MinLODSize=32,MaxLODSize=128,LODBias=0)</Property>
<Property name="texturegroup_apl_256" type="2">(MinLODSize=32,MaxLODSize=256,LODBias=0)</Property>
<Property name="texturegroup_apl_512" type="2">(MinLODSize=32,MaxLODSize=512,LODBias=0)</Property>
<Property name="texturegroup_character" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_character_1024" type="2">(MinLODSize=32,MaxLODSize=1024,LODBias=0)</Property>
<Property name="texturegroup_character_diff" type="2">(MinLODSize=32,MaxLODSize=512,LODBias=0)</Property>
<Property name="texturegroup_character_norm" type="2">(MinLODSize=32,MaxLODSize=512,LODBias=0)</Property>
<Property name="texturegroup_character_spec" type="2">(MinLODSize=32,MaxLODSize=256,LODBias=0)</Property>
<Property name="texturegroup_characternormalmap" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_characterspecular" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_cinematic" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_effects" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=linear,MipFilter=point)</Property>
<Property name="texturegroup_effectsnotfiltered" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_environment_1024" type="2">(MinLODSize=32,MaxLODSize=1024,LODBias=0)</Property>
<Property name="texturegroup_environment_128" type="2">(MinLODSize=32,MaxLODSize=128,LODBias=0)</Property>
<Property name="texturegroup_environment_256" type="2">(MinLODSize=32,MaxLODSize=256,LODBias=0)</Property>
<Property name="texturegroup_environment_512" type="2">(MinLODSize=32,MaxLODSize=512,LODBias=0)</Property>
<Property name="texturegroup_environment_64" type="2">(MinLODSize=32,MaxLODSize=64,LODBias=0)</Property>

<Property name="texturegroup_lightmap" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_mobileflattened" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_procbuilding_face" type="2">(MinLODSize=1,MaxLODSize=1024,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_procbuilding_lightmap" type="2">(MinLODSize=1,MaxLODSize=256,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_promotional" type="2">(MinLODSize=32,MaxLODSize=2048,LODBias=0)</Property>
<Property name="texturegroup_rendertarget" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_shadowmap" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point,NumStreamedMips=3)</Property>
<Property name="texturegroup_skybox" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_ui" type="2">(MinLODSize=8,MaxLODSize=1024,LODBias=0)</Property>
<Property name="texturegroup_vehicle" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_vehiclenormalmap" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_vehiclespecular" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_vfx_1024" type="2">(MinLODSize=8,MaxLODSize=1024,LODBias=0)</Property>
<Property name="texturegroup_vfx_128" type="2">(MinLODSize=8,MaxLODSize=128,LODBias=0)</Property>
<Property name="texturegroup_vfx_256" type="2">(MinLODSize=8,MaxLODSize=256,LODBias=0)</Property>
<Property name="texturegroup_vfx_512" type="2">(MinLODSize=8,MaxLODSize=512,LODBias=0)</Property>
<Property name="texturegroup_vfx_64" type="2">(MinLODSize=8,MaxLODSize=64,LODBias=0)</Property>
<Property name="texturegroup_weapon" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_weaponnormalmap" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_weaponspecular" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_world" type="2">(MinLODSize=256,MaxLODSize=512,LODBias=0)</Property>
<Property name="texturegroup_worldnormalmap" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>
<Property name="texturegroup_worldspecular" type="2">(MinLODSize=1,MaxLODSize=4096,LODBias=0,MinMagFilter=aniso,MipFilter=point)</Property>

This variation in max resolution is part of the reason why we change everything to "Shadowmap", since it always renders at max 4K (as you probably know).

One thing I've been wondering for a while, is if the max resolution for the LOD group in the coalesced was changed when replacing a texture -- a 512 environmental texture, for example -- would the game render the higher resolution texture correctly?
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: MIP Maps

Postby CreeperLava » 07 Jun 2016, 16:06

A very interesting thought, especially regarding the Aquarium textures. I'll give it a try.

Edit : And no, changing the MaxLODSize to 4096 doesn't make it work, sadly.
User avatar
CreeperLava
User
 
Posts: 844
Joined: 07 Feb 2015, 21:52
Has thanked: 119 time
Have thanks: 83 time

Re: MIP Maps

Postby CreeperLava » 07 Jun 2016, 16:47

Yesterday I said that 4k would probably only be useful for characters, I had some time to test it today :
Spoiler:
Image For reference. Edit : picture seems too big to fit, here is a link : http://imgur.com/TC3Ia0g
Image So that's how you optimize display in TPF/DDS Tools, interesting.
Image 256. Meet the improved Garrus with his shiny new 4K texture ! From now on I took a picture each time a MIP transition happened.
Image 512. Using giftfish's Olivia as a testing assistant.
Image 1024.
Image 2048.
Image 4096.
Image Nice pixels you have, Garrus.


Conclusion : Yes, 4K textures are definitely useful, at least for squad mates.
User avatar
CreeperLava
User
 
Posts: 844
Joined: 07 Feb 2015, 21:52
Has thanked: 119 time
Have thanks: 83 time

Re: MIP Maps

Postby Alvaro » 07 Jun 2016, 23:01

Hi:

That´s very interesting and good to know.

Now the next Q is... are the smaller mips ever displayed in game? I mean, under 32x32... ??? Just curious here!

I assume it is not the same a larger object than a smaller one. And, once more, not the same when having a large texture (4K or 2K) than a smaller one... no idea.

Regards!
Alvaro
User avatar
Alvaro
User
 
Posts: 83
Joined: 15 Mar 2015, 13:06
Has thanked: 8 time
Have thanks: 12 time

Re: MIP Maps

Postby giftfish » 07 Jun 2016, 23:28

Smaller mips should be displayed, yes. It requires the player -- and not just the flycam -- getting further away, though.
User avatar
giftfish
Toolset Developer
 
Posts: 1247
Joined: 08 Jan 2016, 02:35
Has thanked: 129 time
Have thanks: 75 time

Re: MIP Maps

Postby CreeperLava » 08 Jun 2016, 06:09

What giftfish said, plus from what I can see you would need to get really far away to display them (at least if you use HR textures). The rate of transition between MIP Maps doesn't seem linear with distance. It goes very fast from 4096 to 2048-1024, but then transitions slow down, you have to get further by a few metres for 256, then a dozen metres for 128, etc.
User avatar
CreeperLava
User
 
Posts: 844
Joined: 07 Feb 2015, 21:52
Has thanked: 119 time
Have thanks: 83 time

Re: MIP Maps

Postby Alvaro » 08 Jun 2016, 09:24

@Giftfish & CL: of course, those should be displayed depending on the distance but, well, that was the point... how much distance is really faaaaar away? :) At the point that it would become hardy noticeable in-game? Just a jumping blur dot?

BTW, does the game resolution has any impact in how mips are displayed or rendered? Or are those always generated as per coalesced.ini settings and then post processed? Again, sorry for the basic Q... no idea about UE misteries!

Regards!
Alvaro
User avatar
Alvaro
User
 
Posts: 83
Joined: 15 Mar 2015, 13:06
Has thanked: 8 time
Have thanks: 12 time

Re: MIP Maps

Postby CreeperLava » 08 Jun 2016, 10:45

Pretty sure resolution doesn't matter, it must be the same. I'll give it a try when I find some time. This evening ll continue my galaxy textures :).
User avatar
CreeperLava
User
 
Posts: 844
Joined: 07 Feb 2015, 21:52
Has thanked: 119 time
Have thanks: 83 time

Next

Return to Texture Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron
suspicion-preferred