PBR Workflow: Reflecting a Scene with Physically Based Rendering

This article applies to environment exported as GLTF to allow the use of its realtime lighting. For fully baked scenes both the ambient and specular reflections can be produced from the scene itself.

Environment Maps
There are a few options other than Lys. The two main free ones to look at are Modified CubeMapGen and IBL Baker. Both have their quirks. When building maps from existing HDR cylindrical maps such as you would find on HDRI Haven, our source for most of the built in maps, Lys is the best choice for clean results. Last I checked the old photoshop DDS plugin still works on current versions of photoshop.

To use the result of a render from Max in Lys, you'd do best to save out a cylindrical panorama as a .HDR file and use the Load Panorama button.

Captured from the Scene
Reflection maps mean to represent the existing scene should almost never be generated inside 3ds Max - we're aiming to reflect how Vizard sees objects, not how 3ds Max does. We render those from Inspector instead. The documentation that recommends using 3ds max predates this option and is outdated.

Frustratingly enough Lys currently has an error loading DDS cube maps despite writing them just fine, so cubemapgen is the better option despite looking so outdated.

Steps - Ambient/Diffuse Map:
- If you've changed the exposure of the cube map effect, take note of the cube map exposure setting
- Navigate to Vizard's resources director and grab the ambient map for the environment map currently in use. C:\Program Files\WorldViz\Vizard6\resources\fx\
- Bring a copy of the ambient map into your program of choice (e.g. cubemapgen), re-expose it based on the exposure offset used in Insepctor, and save out the result to a cube map. Don't allow it to blur the map.

Steps - Reflection/Specular Map:
- Back in Inspector, capture your DDS cube map with the bitdepth set to 32 bit (HDR). As long as the filetype is DDS it will automatically produce a DDS cube instead of 6 individual faces as separate files. File > Save Cubemap..., http://kb.worldviz.com/articles/2925
- This needs some processing to work correctly with gloss/roughness maps - the ability to make blurry reflections is based on having custom mipmaps within the DDS cube map
- We get the needed mipmaps from CubeMapGen- Then we follow the instructions from the linked cubemapgen webpage.

Here is a simple tutorial of how to generate a prefiltered cubemap mipmap chain:
– Load the base cubemap you want to process ( The loaded cubemap should be HDR (and so in linear space) for best result).
– Chose an output cube texture resolution, we will use 128.
– Chose cosine power filter as filter type.
– Set a value in cosine power edit box. This value will represent the maximum specular power (cosine power and specular power are same thing) you allow for material interacting with this PMREM. We will use 2048 here.
– Chose a power drop on mip, we will use 0.25.
– Click on filter cubemap.

This will generate a  PMREM of 8 mipmaps where each mipmap is convolved with a cosine power of respectively:2048; 512; 128; 32; 8; 2; 0.5; 0.125.
Loading in Inspector:- On the environment model, set exposure to 0- Drag the ambient map into the diffuse slot- Drag the reflection map into the specular slot- With both maps in place, the lighting and reflections should update.- Check the "Save Scene Settings" box- Save your file