Oxygen Reference


The MRAO Texture

  1. Create an Empty GameObject, and parent it to the section of your scene that should use your Environment Probe. I've added some stylish dinnerware to demonstrate.

    img/envsetter_hierarchy.png

  2. Add the "Environment Setter" script to the object, and assign your Environment Probe in the inspector.

    img/envsetter_add.png

  3. Set your materials to use the Oxygen/Standard shader. The MRAO texture defaults to white, which equals a fully polished metallic surface. You may notice that the reflection is incorrect - this is due to the environment probe's Reflect Box not being set up properly.

    img/reflection_incorrect.png

  4. With the Environment Probe selected, play around with the reflection box positioning by dragging the two corner handles. The parallax correction assumes that objects sit in a rectangular room - so there is no 'correct' solution for the locations of probes and their reflect-boxes. If you choose to move the probe's location, you will need to click "Recalculate Cubemap" to update the cubemap again.

    img/reflection_box.png

    Reflections after adjusting the probe's Reflection Box.

    img/reflection_correct.png

    Metallic, Roughness, Ambient-Occlusion

  5. Create grayscale images for each of the metallic, roughness and AO maps. Color the metallic mask red, the roughness green and the AO blue. Then additively blend the images into one. This example texture features three metallic circles, a rough patch to the left with smooth on the right, and two dark splodges in the AO.

    img/mrao_info.png

    Used on the teapot (along with simple diffuse and normal maps) it produces this:

    img/mrao_applied.png

    The metallic mask should technically be a white-on-black image with white representing metal, but you could use gray to achieve interesting effects. The roughness mask represents smoothness as lighter shades, and rougher is darker.

  6. MRAO are data-textures (like normal maps), so the texture import settings need Texture Type set to Advanced, and "Bypass sRGB" checked. If a texture with incorrect settings is assigned to a material which uses our scene shaders, you'll get this warning. Click "Fix now"

    img/mrao_import.png