Volumes ‐ Sectors - ow-mods/outer-wilds-unity-wiki GitHub Wiki

Sectors are a special volume that is used in the enabling, disabling, unloading, and loading of:

  • renderers, colliders, and shapes (via groups)
  • lights and audio sources (also via groups)
  • numerous logic scripts, such as rafts and orbs (by setting the sector property)

Creation

Create an OWTriggerVolume and then add the Sector component.

image

You can also have use the "Trigger Root" property as where you want the OWTriggerVolume to be, if you want it to be on a separate GameObject.

Subsectors

Sectors can have child sectors, also called subsectors.
Usually they are smaller than the parent sector, so being in a child also means being in the parent. (In fact, the base game usually ties a collision group to the parent sector, so it is impossible to be in the child sector if you're not in the parent sector.)
This is useful for only loading sections of an area rather than the whole area.

image

Sector excluding

If you put a VolumeExcluder component next to the sector, then being in that excluder's OWTriggerVolume will mean that you are no longer in the sector. (It excludes the given volume from being considered "in the sector")
For example, being in the Ember Twin cave sector means that you will not be in the Ember Twin outside sector, even though the outside sector encompasses the cave sector.

image

Groups

A group is a component that is tied to a sector to control the enabling/disabling of other components.

Any component on child GameObjects will be affected by the appropriate group on the parent.

Creation

Add a group anywhere and set its Sector.

Main groups

  • SectorCullGroup is used to enable/disable Renderers. Only enabled if player or probe is in Sector.

  • SectorCollisionGroup is used to enable/disable Colliders and Shapes. Enabled based on the LOD activation mask of the OWCollider next to each Collider.

  • SectorLightsCullgroup is used to enable/disable Lights. Only enabled if player or probe is in Sector.

image

You can see what groups the selected GameObject is a part of at the top left of the Scene window

Other groups

  • SectorAudioGroup is used to enable/disable OWAudioSources. Only enabled if player is in Sector.

  • SectorVolumeOcclusionGroup is used to enable/disable VolumeOcclusionRenderers and VolumeOcclusionLights. Only enabled if player or probe is in Sector.

  • SectorRendererLODGroup has LOD Sector and Sector where active.
    Being in the LOD Sector disables the Renderers. Otherwise, being in Sector Where Active enables the Renderers.
    No Sector Where Active means only LOD Sector will be considered (this is the most common scenario) and vice versa.
    Lower quality renderers should be child GameObjects of this.

  • SectorLightsLODGroup is the same as above but for Lights.

  • MultiSectorCullGroup is the same as SectorCullGroup but also considers a second Sector and works if you're in either of them.

  • SectorProxy overrides some SectorCullGroup behavior as follows:

image image

The cull groups set the proxy as "controlling proxy" and doesn't set the Sector property. The proxy has lower quality Renderers and Lights in child GameObjects.
When the player or probe is in the proxy's Sector, the cull groups' Renderers are enabled. Otherwise, the proxy's Renderers/Lights are enabled.
If Exclusive Sector is set, the proxy's Renderers/Lights will only be enabled when the player or probe is in that Sector.

SectorProxy basically acts the same as SectorRendererLODGroup and SectorLightsLODGroup combined. It is used much more often in base game and therefore is the preferred option.


Most visual groups will have their child components disabled when in map mode, except for proxies, which will be enabled. Visual groups also get disabled when fast forwarding for performance.

NH Note

NH automatically assigns sectors to many scripts and sets up groups (unless you use keepLoaded), so most of the time you do not have to create a Sector and assign it, or make groups, unless you were making subsectors for more granular loading/unloading.
However, this does not work for all scripts (e.g. rafts), so sometimes you may have to create your own sector anyway.