Sandbox IBL MIP bias needed?

I’m seeing odd MIP behavior for IBLs in the Sandbox.

I would prefer a higher-resolution IBL, so the skybox won’t be too blurry. But as the Specular resolution increases, the Roughness also increases.

If I zoom into a metallic sphere using the 512 IBL, the MIPs eventually clarify. But at a default distance it’s quite rough.

It seems to make sense, since the increased resolution means I have more MIPs. But the change in roughness is troublesome. Should we be biasing the MIPs?

64 Specular = 7 MIPs.
128 Specular = 8 MIPs.
256 Specular = 9 MIPs.
512 Specular = 10 MIPs.

IBLBaker settings for 256 Specular and 64 Diffuse:
image

Example ENV files
Env_Resolutions.zip (1.5 MB)

Pinging @PatrickRyan

@echadwick-artist, @sebavan and I have a couple of questions for you. First, can you describe your process for computing your environment DDS? As an example, I created the image below by calculating my DDS files in Lys. The one on the left is a 64 pixel per face IBL and the one on the right is a 512 pixel per face IBL:

There is obviously some differences in the banding in the skybox as well as some clarity in the 0 roughness levels due to the smaller image size. But I am not seeing the large differences you are seeing.

I’m using IBLBaker, which is recommended in the docs. Looks like I should use Lys!

https://doc.babylonjs.com/how_to/use_hdr_environment#creating-a-dds-environment-file-from-ibl-baker

How many MIPs in each of your DDS files?

Unfortunately IBL Baker is proposed as a free alternative to lys but all the best results we achieved were always done through Lys by Patrick.

Also in IBL baker the mips are linearly sorted from roughness whereas by default the PBR expects log2 ramp like in the lys setup.

You could try the flag linearSpecularLOD on the env texture to see if it improves your case with ibl baker.

2 Likes

Thanks sebavan, and Patrick. Would this be a good bit of info to add to the docs? If I’d known about Lys and log2 I could have avoided the IBLBaker rabbit hole. Though it does hint at this, it’s perhaps not as explicit as it could be?

3 Likes