Hi everyone, I am new to JME so I begin with saying “Hello!” to everyone

Out of interest in how it works, I am currently looking at the IBL code in the PBR branch and I am somewhat confused. In particular I have problems understanding how the Mipmaps are used for the Prefiltered Environment map.

My first question: In the function “generatePrefilteredEnvMap” mipmaps are generated in order to achieve a certain blurriness of the reflections based on the roughness of the material. What I don’t get is why a mipmap is generated for level 0. Couldnt you just use a copy of the original (for roughness 0)?

Furthermore, only a range of mipmaps is generated (int nbMipMap = (int) (Math.log(targetMapSize) / Math.log(2) - 1) ) What is the meaning of nbMipMap? As far as I know the number of mipmap-levels should be Math.log(targetMapSize) / Math.log(2) + 1, in order to get all mipmap levels up to the 1x1 mipmap. What is the reason for not generating all of the mipmaps`?

Thanks very much in advance,

n-i-c-l-a-s