Occlusion Proxy

Occlusion Proxies are fully obsolete since 3.5.0. CRYENGINE has used the coverage buffer (e_CoverageBuffer) for occlusion since 3.4.0 and continues to do so in 3.5 and 3.6.

Overview

Platform Support

This is only for PC, consoles do not support this feature.

An occlusion proxy is a simple geometry object that prevents objects behind it from being rendered.

For example, if the player stands in front of a big concrete wall that doesn't have any holes in it, the engine does not need to render the objects behind the wall. By reducing rendering time significantly this improves frame rates.

General Setup in DCC Tools

A simple geometry object that represents the shape of the render geometry is created in the DCC tool (e.g. a plane for the concrete wall mentioned above). It must be named "$occlusion" and linked to the object to which it belongs. In our example this is the wall piece. No special material setup is needed.

Important notes:

  • Occlusion polygons will always be treated as double-sided in the engine. A simple single sided plane in the DCC application might be a sufficient occluder for a solid wall.
  • Occlusion geometry usually has to be rasterized on the CPU, which is a lot slower than drawing it on the GPU. So, keep the number of polygons of the occluder geometry as low as possible, for example just us a single-sided plane for a complex wall.

3ds Max Specific Setup

.max Sample File
3ds Max Export
  • Name your occlusion proxy as $occlusion and make it a child of the render mesh.
  • Apply a cryshader with the no draw option sub-material to it.
  • "Merge all Nodes" needs to be unchecked in the exporter settings.
  • The cgf and the material are ready to export.

Maya Specific Setup

.ma Sample File
Maya Export
  • Making sure the occlusion Proxy is grouped, and named correctly. The occlusion must be it's own group with an '_' as a prefix.

  • Click the Crytek Export Button.

  • Be sure to click on Add Attributes to the export node and make sure that Do Not Merge Nodes in checked.

Also add attributes to the material that is assigned to the occlusion proxy and assign the 'nodraw' option.

  • Now you are ready to click on Export and finish this process.

XSI Specific Setup

These are simple geometry objects which are placed inside non see through walls to indicate the renderer that everything behind it does not need to be rendered. This is helpful in busy scenes to ensure high render performance. The name of the geometry object needs to start with "_occlusion". Link it to the geometry object which serves as the "visual barrier" in the game.

Setup in Sandbox

No special setup is required in Sandbox.

Debugging

Use 11 and 12 to Render occlusion geometry with render geometry.

e_DebugDraw

Draw helpers with information for each object (same number negative hides the text)
 1: Name of the used cgf, polycount, used LOD
 2: Color coded polygon count
 3: Show color coded LODs count, flashing color indicates no Lod
 4: Display object texture memory usage
 5: Display color coded number of render materials
 6: Display ambient color
 7: Display tri count, number of render materials, texture memory
 8: RenderWorld statistics (with view cones)
 9: RenderWorld statistics (with view cones without lights)
10: Render geometry with simple lines and triangles
11: Render occlusion geometry additionally
12: Render occlusion geometry without render geometry
13: Display occlusion amount (used during AO computations). Warning: can take a long time to calculate, depending on level size! 
15: Display helpers
16: Display debug gun
17: Streaming info (buffer sizes)
18: Streaming info (required streaming speed)
19: Physics proxy triangle count
20: Display object instant texture memory usage
21: Display animated object distance to camera
22: Display object's current LOD vertex count

You can also use the F3 key in the editor to turn to wireframe mode and see if objects are rendering behind the occlusion proxy.