SkyBox vs. PhotoDome (How to improve image resolution and reflections)

@anonymouse, after considering a couple of different methods, I think the best method is simply to create a second PBR spec/gloss material and pass a custom reflectionTexture. What I did here was to grab another hdr image that I could get a large version of at polyhaven. The reason is that you will need both a 2k version and a 4k image. The 2k version is passed as the IBL for the scene, and the 4K version is converted to a cube map and passed in as a second reflection texture.

I took the 4k texture to 360Toolkit - Convert equirectangular to cubemap to create my six cube images. Note there are a few things I needed to do to get the cube images correct. The first was to take the hdr file into an image editor and convert to 8-bit color and save as a png since I don’t need the HDR data. Then once I got the images from the conversion using 360Toolkit, I needed to bring them back into the image editor to make sure I had them aligned and in the right order for naming. I dropped them into the cube and found the exported images were not named correctly in a few instances and that the Y axis images needed to be rotated by 180 degrees. It looks like this:

Then I exported each image with the correct rotation and name as noted in the image above so that we get the correct cube in the scene.

In this way, you can get a cubemap that has a higher than 512x512 per face resolution. In this case I am using a 1k x 1k per face resolution (note that this will increase loading time, but you could use a more compressed jpg to cut down on the download a bit. But creating this reflection texture from a cube that is larger is going to give you a better resolution in your plane reflections:

The thing to remember here is that if you are passing a reflection texture to PBRMaterial, you are working with a spec/gloss lighting model not a metallic/rough. Since you want this to be a mirror reflection, this is a simple way to accomplish this. The rest of the materials in the scene can use metallic rough and simply use the scene environment. However, if you want reflections other than pure mirror reflection you will have to also pass a reflectivityTexture to break up the reflections like in this PG which uses the reflectivityTexture to break up the reflectionTexture.

I also considered cameras with render textures, but that would not work well with geometry other than planes and you would significantly increase the number of cameras and rendering to texture if you have many planes that need to reflect. So making a separate PBR-SG texture with a custom reflection texture would probably be the best result for you. Hope this helps and let me know if you have more questions.

2 Likes