Visibility culling via 3ds Max's user interface
Disclaimer: The code in this post is written using version 9.1.36100 of Simplygon and 3ds Max 2021. If you encounter this post at a later stage, some of the API calls might have changed. However, the core concepts should still remain valid.
In many games the players movement is restricted to a certain volume, that means some object will only be visible from certain angles. That is where optimization through visibility culling comes in. In this post we'll show how to use it in 3ds Max.
This example will use the Simplygon integration in 3ds Max, but the same concepts can be applied to all other integrations of the Simplygon API.
Problem to solve
We have a model which we know will only be visible from certain angles, thus we can optimize it by removing geometry that will never be seen. It could be geometry facing away from the camera, or geometry occluded by other geometry.
Asset we will only see from below and certain angles.
Visiblity culling is not its own processor but rather settings on a processor. Thus there is no pure visibility culling template we can add in the user interface. Instead we are going to add a reduction template and perform visibility culling inside it.
Start by adding an advanced reduction pipeline in the Simplygon UI by clicking Add LOD Component and pick Template → Advanced → Reduction. To make the pipeline not reduce anything expand ReductionSettings and set ReductionTargetTriangleRatio to 1.00.
We need to add a set of cameras indicating what angles the player can see the object from. Add some cameras to the scene from 3ds Max's menu Create → Cameras.
Select all of the cameras, then create a selection set by typing a name in the selection set menu field.
Expand VisibilitySettings in the created pipeline, enable CullOccludedGeometry and set CameraSelectionSetName to the camera set we created above.
When that is done we can process the asset by selecting it and clicking on the Simplygon button.
After processing the geometry not visible from any camera in the set is removed resulting in a more lightweight mesh.
Nobody will suspect that the asset is hollow.