Bad quality of cubemap with mipmaps

Hi.

I’ve noticed that cubemaps with mipmapping enabled get really blurry. Only when you set “Mip Gen Settings” of a cubemap to “NoMipmaps” it looks like it should, no other settings of the texture helps. The quality is bad in the texture preview, as well as in the editor, and looking through the camera, no matter how close you are to the textured object.

Hey karolsob,

This is expected as an Ambient Cubemap is only intended to be used for a subtle directional ambient term (useful in games with completely dynamic lighting), or for model viewer applications. This is why the default behavior is blurred as you do not need the crisp image because you are just using the color values within the cubemap to provide ambient lighting. Set the Compression Settings to 'HDR (RGB, no sRGB) as this is the default setting.

Let me know if you have further questions or need additional assistance.

Cheers,

Hi Andrew, thanks for quick reply.
This doesn’t solve the problem I’m facing though. I think that this default behavior is a bit unexpected and it looks like you can’t use cubemaps with mipmapping without this implied blur. Good solution would be to have an option to choose between blurring cubemap especially for ambient cubemaps, and actually expected crisp look of a cubemap with chosen filtering just like you would get if you would have used native API.

Is there a specific reason you would like a cubemap to have mipmaps, as the intended use case for Cubemaps are to remain constant and only provide ambient lighting values? Having a Cubemap mip, is not going to provide more/less detail or change the outcome of your ambient lighting.

Thanks,

I came across this issue in 4.13 as I was trying to determine why a seam was showing up in my custom skybox material on Android device. I enabled mipmaps on my cubemap to see if the seam was being caused in the texture or within shader code. The errant texels appeared as I cycled through mipmap levels (and only if I enabled default texture compression)…suggesting the problem was within the texture itself, possibly caused by how ue4 is generating cubemap mipmaps for compressed textures on Android.

Back to topic, I was surprised to learn that all of the mipmapping options (sharp, blur, simple average, etc) created the same blurry result…and that even the 0 level texture still had some blur applied as this completely negated any use of mipmapping with skyboxes (I’ve used mip level fetching for specific effects before). Perhaps these options shouldn’t be available with cubemaps if the intended behavior is for ALL produce the same blurry result. I wasted quite a bit of time playing around with this.

I suppose I could always create a dds cubemap if I really needed a cubemap with mipmaps, but creating them from latlong maps can be a pain, especially if I’m iterating on them. It’s so much easier to start with a latlong HDR image…

But there may be other uses for Cubemaps! Not just ambient reflections. For example I want to use them for VR 360 stereo viewer and only when I use NoMipmaps it’s crisp as it should be. But I would’ve preferred 1 mip level to get rid of filtering issues when moving the camera as the pixels shimmer a lot. I solved this by actually making a cube with 6 textures for now but I feel that using cubemaps would produce sharper and less performance heavy results. I need the image to be as crisp as possible on FHD, QHD and 4k mobile displays and as I found out there is some blurring when using normal textures on a cube but on the other hand, there is severe shimmering of pixels when using NoMipmap Cubemap.
I feel it’s possible to get sharper image without any shimmering. I know I can’t get the Cubemap sharpness but I also hope I can get something even sharper.

Cubemap NoMipmaps vs Texture on Cube of same size comparison with mipmaps:

116342-cubemapvstexture.gif

Hey Alphisto,

So the shimmering could be a side effect of the forward rendering and VR specifically. I do see where you are coming from, but it sounds like you have/want the best of both worlds which is going to take some customization. It sounds like you want a crisp cubemap, but since that is causing some shimmering when testing VR, you need a blurred cubemap.

The link I provided was posted by one of our Devs and Engineers Daniel Wright where he explains the reasons for artifacts and shimmering on VR devices, specifically when used with Forward Shading and MSAA.

Let me know if you have further questions.

Thank you,