VisArea and Portals

Overview

The VisArea is a shape object which is used to define indoor areas for culling and optimization purposes, as well as lighting.

Objects inside a VisArea won't be rendered from outside and vice versa, this can help with performance immensely.

VisAreas also can be setup to occlude certain lighting elements such as the Sun, which gives flexibility in setting up lighting for your indoor areas. Note that since CRYENGINE 3.6, AmbientColor is no longer supported and Environment Probes should be used.

With Portals you can cut holes inside the VisAreas to create an 'entrance' to the VisArea. Portals have to be smaller than the VisArea Shape but thick enough to protrude both the inside and outside of the VisArea, like a door.

You can enable and disable Portals via FlowGraph and you can have multiple Portals in one VisArea.

Setting Up a VisArea

  • On the RollupBar go to Area -> VisArea.
  • Place the VisArea shape around your room.
  • Set the height.
  • Be sure everything related is inside the VisArea.
  • Try to stay on the grid by enabling "Snap To Grid".
  • Keep the shape of the VisArea as simple as possible.

VisArea Parameters

Parameter

Description

Height

Specifies how high the visarea is.

DisplayFilled

Just for visibility in the editor this option defines if the area should be rendered as filled or not.

AmbientColor

DEPRECATED (Use Environment Probes)
Specifies which ambient color should be inside the visarea.

AffectedBySun

Specifies if shadows from the world outside the visarea can travel inside.

IgnoreSkyColor

If this option is turned off the ambient color (sky color in time of day window) is not used indoors.

IgnoreGI

If true, Global Illumination won't be used inside this object.

ViewDistRatio

Specifies how far the visarea is rendered.

SkyOnly

Lets you choose to see only the skybox when you look outside the visarea.
If you don't render terrain and outside brushes the performance can be faster so use this option when it is appropriate.

OceanIsVisible

Specifies if the ocean rendering should be visible inside the visarea.

Setting Up Portals

Portals are used to add an visual "entrance" into the Visarea and allows you to view and seamlessly transition in and out of a visarea.

Portals can be found in: RollupBar -> Area -> Portals

  • Create the portal shape according to the size of the entrance.
  • Keep the size as small as possible (also the size of the portal can't be bigger then the VisArea itself).

  • The Portal has to be half inside the VisArea (Being in the Top & Front view helps).

Portal Parameters

Parameter

Description

Height

Specifies how high the portal is.

DisplayFilled

Just for visibility in the editor this option defines if the area should be rendered as filled or not.

AmbientColor

DEPRECATED (Use Environment Probes)
Specifies which ambient color should be inside the visarea.

AffectedBySun

Specifies if shadows from the world outside the visarea can travel inside.

IgnoreSkyColor

If this option is turned off the ambient color (sky color in time of day window) is not used indoors.

IgnoreGI

If true, Global Illumination won't be used inside this object.

ViewDistRatio

Specifies how far the visarea is rendered.

SkyOnly

Lets you choose to see only the skybox when you look outside the visarea.
If you don't render terrain and outside brushes the performance can be faster so use this option when it is appropriate.

OceanIsVisible

Specifies if the ocean rendering should be visible inside the visarea.

UseDeepness

Specifies if the portal should have depth or if it should just be a plane.

DoubleSide

Specifies if the portal should be working from both sides.

Transitioning from Indoor to Outdoor Areas

  • If you leave the VisArea (indoor) everything behind you will disappear including the walls that are located inside.
  • You will need a wall inside the VisArea and a wall outside the VisArea

  • Transitions from indoor to indoor are handled the same way you have to have two walls one in room 1 and one in room 2.
  • Also for a better lightning you should add separate VisAreas to each room.

Enabling and Disabling Portals via Flow Graph

Flow Graph -> Engine -> PortalSwitch

  • If you have a door you can disable the Portal when the door is closed (to save performance).
  • You can not assign the Portal itself to this node you have to assign the door (which is inside the portal).
  • Now you can check the state of the door and according to this enable and disable the Portal.