Ambient Occlusion for GLTF
Blender materials don’t have a 1:1 representation of Ambient Occlusion so to export to GLTF we have to make a special one by hand. To do this;
- Create an Ambient Occlusion node.
- Select it and create a group (default: Ctrl-G).
- Double click the new group to go inside it.
- Delete the Ambient Occlusion node.
- In the n-panel on the right of the screen, go to the “Group” tab. If you do not see the panel, click the little arrow to pop it out.
- Delete all the inputs except for the Color. Delete all of the outputs.
- Double click Color and change the name to Occlusion.
- Double click anywhere in empty space on the shaderA small program that runs on the GPU to inform it how to shade a polygon in 3D space. graph to back out of the group.
- Rename the group to GLTF Settings – remember the space! It is not case sensitive.
- Plug your AO into the new Occlusion slot! You can also plug your lightmap in to make your darks darker.