Optimisation: Occlusion and Portals

What is an Occluder?

Occluders are simple planes that are used to hide props (specifically objects of a unit).

In the model itself oc_planes (the commonly name for them) are a one-sided plane pointing its occluding face in the Y-Positive direction.

Occluder planes are set in the object file of a unit.

<dynamic_object>
	<occluders>
		<occluder name="oc_plane_001" />
		<occluder name="oc_plane_002" />
		<occluder name="oc_plane_003" />
	</occluders>
</dynamic_object>

Warning, occluders are limited to 5 active at a time decided by what occluders are nearest to the camera.

What is a Portal?

Portals are groups of units that are made visible by standing inside shapes.

You first make a Portal in the Portal World menu, Then once a portal is made you can select that Portal. Having a Portal selected and then selecting units in your level will allow you to Add To Current Portal (Or Remove).

Units inside a Portal group will show a red bounding box over that unit to indicate that its in the active Portal.

Units do not have to be inside a Portals shapes to be included, they can be for example Backdrop props that get hidden once you are not outside.

Useful information

Occluders do not have to be in a dedicated occluder unit, if you believe its neccisary they can be included in a prop unit.

Occluders have a hard time updating in the level, You cannot use an Enable/Disable/Move/Rotate Unit Element to toggle or reposition them, but you can use the Delay Load setting on the occluder unit and have it show later using Load Delayed Elements.

Occluders may be limited to 5 closest planes at a time, but if you arent looking at an occluder plane it will not be used.

Occluders will ignore units that use <network sync="spawn" /> or other forms of network sync. This includes most interactable units or enemies.

Multiple Portals can be used on a single unit, you are not limited to 1 Portal per unit.


Revision #1
Created 21 September 2020 05:55:22 by Rex
Updated 2 July 2021 17:12:49 by Rex