Home Technical Talk

Confused - Lightmaps, LODs, Mipmaps, how works together

PetSto
polycounter lvl 4
Offline / Send Message
PetSto polycounter lvl 4
Hi, I am really litle bit confused now, how works together Mesh LODs with Texture/Lightmap Mipmaps. I will try explain my problem, but first I tell, what I understand under these terms.

1.0 - Mipmaps in short are textures with different sizes and are "auto generated" by engine if are not defined in texture file (only DDS and HDR) and are downscaled to chain of textures from main "uploaded" texture and will be swapped between themselves (bilinear filtering) or blended (trilinear filtering) in engine based on distance, how far are you from object with this texture and how big size must be rendered and then eliminate shimmering which are present in no-mipmapped texture.

Q - 1.1 - Can I define distance in UE4 when should be loaded these mipmaps, etc. MIP0 - 0 - 10m, Mip1 10 - 30m, .. or it is automated process based on size and distance calculated by engine between camera and and object/texture rendered size ?
(etc. If on monitor I have object with size 40x40px then UE4 use mipmaps from 1024x1024px texture which are closed to target size, in this case 32x32px closed as 64x64 px and resized to target size 40x40 px).

Q - 1.2 a - It's better or possible create mipmaps in photoshop through nvidia mipster plugin and upload DDS texture file to UE4 (possibility only for Cubemaps ?) or is better load TGA texture file and leave resizing on UE4, which process has better quality ?

Q - 1.2 b - In Mip Gen settings for textures I can choose types of downscaling for mipmaps (blur, sharp, ..) or take settings from “texture group” as is set in ini file, right ?

Q - 1.3 a - Can I set how many Mips I want to be pre-rendered for specific texture (Texture Group - probably ?) or always will be/must be mipped to 1x1 px ? (etc. only 256x256 px to 1024x1024 px).

Q - 1.3 c - Is good to have all Mips pre-calculated to texture size 1x1 px and use this size in engine or is too much waste and we can't see difference ? (etc. 32x32 px it good enough).

Q - 1.4 - For texture need at least 1-2px padding between uv charts and applied dilation for eliminate errors (bleeding), but isn't enough for mipmaps, when we has texture with resolution 4096x4096 px we have 13 mipmaps which is max for UE4 as max texture resolution is 4096 x 4096 px. This restriction can be modified in UE4, but not every hardware support largest texture as 2048x2048 px right, and I want ask how big dilation is recommended and what is waste texture space (etc. 4096x4096px texture with 32px padding has 5 mimaps without bleeding errors (4096->2048->1024->512->256->128) and 64x64px and down mipmapped textures has errors because don’t has enough uv charts padding, but objects with these textures are now small on screen.

Q - 1.5 - As I say we need padding between UV charts for fixing bleeding errors, but we don't need adds padding and dilation around UV for texture right ? I ask because UE4 adding dilation around UV for lightmaps.

Q - 1.6 - Is good to have lightmaps UV border with 2px or 4px padding for fixing bleeding errors and turned off automated process which adding padding around uv (I don’t know if it’s possible) or create lightmap without UV border padding and leave on UE4 which he add 2px-4px, because he must then downscaling new to texture to power of 2. (etc. I have texture 32x32 px, then UE4 add 2px padding around UV lightmap, now has texture size 36x36px which isn’t power of 2 and then UE4 must downscaling texture to 32x32 px).

Q - 1.7 - When I have a set max number to 5 mipmaps for texture UV, then same number is automatically set for lightmap UV mips right ?
Sign In or Register to comment.