Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

Render Entities

Cloud

The cloud entity allows you to place clouds in the level. The cloud definition files (.xml) are built with the cloud tool. Unlike with skyboxes, 3D clouds can be move and players can fly though them.

Property

Description

CloudFile

Defines which cloud object should be displayed.

Scale

Deprecated

AutoMove

Defines if the cloud should move or not using the speed property (cloud can also be moved with the track view editor).

FadeDistance

The Distance in meters when the cloud should fade in when moving from one side of the Space Loop Box to the other.

SpaceLoopBox

Defines the box in which the cloud moves from one end to the outer (looping).

Speed

Specifies the speed in x and y direction.

Flash

The entity flashes the users screen making it white for a few seconds. Very bright explosions can be simulated with the Flash Entity.

Property

Description

SkyHighlightAtten

Specifies attenuation amount on the sky highlighting.

SkyHighlightColor

Specifies in which color the skybox will be lit by the lightning effect.

SkyHighlightMultiplier

Specifies how bright the skybox will be lit by the lightning effect.

Sound

Specifies a sound to play when triggered.

FadeInTime

Sets up the amount of time (in sec.) how long it takes to fade in the effect.

FadeOutTime

Sets up the amount of time (in sec.) how long it takes to fade out the effect.

FadeDuration

Sets up the amount of time (in sec.) fade in and out takes the effect.

Fog

The Fog entity is used to overwrite the fog effect in specific areas. In indoor areas a subtle fog effect can be added to simulate a dusty area. To use, create an Area Box and attach the Area Box to the Fog Entity. When in game mode, you can walk into the area and see how the fog gets different inside. Outside Game mode the fog is not visible.

Property

Description

AtmosphereHeightModifier

Defines the height of the density above sea level. The higher the atmosphere the less visible the effect of horizontal fog layers.

FadeTime

Sets up the time in which the fog takes to fade in.

GlobalDenstiyModifier

Specifies the density of the fog.

FogVolume

RenderFog Volumes exhibit the same properties of global volumetric fog, with the added benefit of locality. Currently supported volume types are boxes and ellipsoids (including spheres as a special case). The benefit of using a RenderFog Volume is that it is possible to define fog volumes that can be non-uniformly scaled along their major axes, rotated, and have an arbitrary fall-off direction (unlike global volumetric fog which defines the world space up-vector as its fall off direction).


An ellipsoid fog volume

Fog volumes are placed as entities. To place one open the RollupBar, select Entity, Render and then FogVolume in the tree view below. Drag the entity into the render view to place it. You should be see a white, spherical fog volume.

Translation and Rotation of a fog volume entity is performed via the move and rotate edit mode just like for any other object.
Scaling of a fog volume entity is done via its entity properties. Please do not use the usual scaling edit mode to perform scaling of the fog volume entity. Non-uniform scaling will distort the entity and produce incorrect rendering results. Again, do not use non-uniform scaling for a FogVolume.

Property

Description

Active

Select/deselect this box to enable or disable this fog volume entity.

Color

The fog color.

DensityOffset

 

FallOffDirLati

This value controls the latitude of the world space fall off direction of the fog. A value of 90° lets the fall off direction point upwards in world space (respectively, -90° points downwards). All values in-between create a direction along the specified longitude.


longitude 0°, latitude 90° / longitude 330°, latitude 45°

FallOffDirLong

This value controls the longitude of the world space fall off direction of the fog. 0° represents East, rotation is counter-clockwise.

FallOffScale

This value scales the density distribution along the fall off direction. Higher values will make the fog fall off more rapidly and generate thicker fog layers along the negative fall off direction.


Scale set to 0.5 and 2.0 (from left to right)

FallOffShift

This value controls how much to shift the fog density distribution along the fall off direction in world units (m). Positive values will move thicker fog layers along the fall off direction into the fog volume. Negative values will move thick layers along the negative fall off direction out of the fog volume.


Shift set to -1.0 and 2.0 (from left to right)

GlobalDensity

This value controls the global density of the fog. The higher the value the more dense the fog and the less you'll be able to see objects behind or inside the fog volume.

HDRDynamic

 

NearCutoff

 

SoftEdges

This value specifies a factor that is used to soften the edges of the fog volume when viewed from outside. A value of 0.0 produces hard edges. Increasing this value up to 1.0 will gradually soften the edges.


This property currently has no effect on Box type Fog Volumes.

UseGlobalFogColor

During rendering the Color property is ignored. Instead the current global (volumetric) fog color is used. Please refer to the Global Volumetric Fog page for further information.

VolumeType

Specifies the volume type. The following types are currently supported: 0 - Ellipsoid, 1 - Cube.

Size

The height/width/depth of the fog volume in world units (m). Non-uniform scaling is possible so height, width and depth don't have to be the same.

Special Tips

  • Fog volumes should not overlap. In some situations (i.e. clever placement of volumes) it might work but in general it won't. Fog volumes are internally treated and processed like alpha-transparent objects so the general sorting issue of these apply here as well. However, inclusion should work as it is guaranteed that smaller ones never overlap with bigger ones.
  • Even though alpha-transparent objects behind fog volumes will be fogged per-pixel, this is not the case for when they are inside fog volumes.
  • Fog densities cannot change in dynamic, non-uniform way (smoke-like). A particle effect with soft particle blending enabled is much better suited for that purpose.

Debugging:

e_Fog

Activates global height/distance based fog

e_FogVolumes

Activates local height/distance based fog volumes

Troubleshooting:

  • Q: Shadow maps inside fog volumes do not work, what's wrong?
  • A: Make sure you have the cast/receive shadow flag unchecked for each fog volume entity.
  • Q: In indoors fog volumes sometime suddenly disappear when player moves around, how can this be fixed?
  • A: Make sure your fog volume entity doesn't cover more than one sector. They'll otherwise get culled when the main sector they were registered to becomes invisible.

Lightning

Lightning entities simulate Lightning effects

Property

Description

Active

Turns the effect on or off.

Distance

Specifies how far away from point where the effect was placed the lighting effect should happen.

DistanceVariation

Adds a random value to the distance, for example 20 means +-20% if the Distance is set to 100.

RelativeToPlayer

Sets the effect relative to the player so always with the same distance.

Effects

 

LightIntensity

Specifies how bright the light should be.

LightRadius

Within this radius objects will be lit.

ParticleEffect

Specifies the lightning bolt effect.

ParticleScale

Sets up the scale of the lightning bolt effect.

ParticleScaleVariation

Sets up the scale variation of the lightning bolt effect.

SkyHighlightAtten

Specifies the Sky Light Attenuation.

SkyHighlightColor

Specifies in which color the skybox will be lit by the lightning effect.

SkyHighlightMultiplier

Specifies how bright the skybox will be lit by the lightning effect.

SkyHighlightVerticalOffset

Specifies how bright the skybox will be at the zenith.

Sound

Sets up a sound effect that should be played when the effect happens.

Timing

 

Delay

Adds a delay to the sound effect.

DelayVariation

Adds a random +- value to the delay value of the sound effect.

LightiningDuration

Sets the time in sec. how long the effect should last.

ThunderDelay

 

ThunderDelayVariation

 

ViewDist

The ViewDist entity limits how far the player can see. Using the ViewDistance entity can significantly increase the frame rate in specific areas.

Property

Description

FadeTime

Specifies the amount of time it takes to fade from the current viewdistance settings to the viewdist entities viewdistance settings.

MaxViewDist

Sets up the View Distance in meters.

VolumeObject

Volume objects in CryENGINE offer the possibility to render volumetric effects of density fields (clouds, smoke, etc) in a realistic way. A volume description is converted into a 3D density field (texture) at load this. This density field is then used to calculate self shadowing, surface extraction, and shading at runtime. Currently the density field cannot be dynamically changed. Unlike 3D clouds volume objects are rendered in a single pass (no imposters needed). The pixel shader computes the final shading result by tracing the density field and density and shadow information at each sample point. Samples are blended using the "Under Operator". Additionally, back lighting and soft intersections with opaque scene geometry is supported.


Volume objects in CryENGINE.

Unlike the Cloud Object, the Volume Object renders 3D Volume objects with correct shading (shadows on the darker parts). The benefit of using a Volume Object is that it can be used to place realistic clouds in the level or for building irregular fog areas with varying heights.

Sandbox Usage

Follow these steps to place volume objects in a new level.

  • On the RollupBar, select the Objects tab and click on the Entity button.
  • Select the Render folder and drag a VolumeObject entity inside the level.

The Entity Properties section provides several options (for the most part these are equivalent to the entity properties for 3D clouds).

Property

Description

VolumeObjectFile

Specifies the (XML-) file containing the description of the volume object. It is compatible with the description file for 3D clouds. The description will be used to voxelize a 3D volume that will be used for rendering.

AutoMove

Defines if the cloud should move or not using the speed property (cloud can also be moved with the track view editor).

FadeDistance

The Distance in meter when the cloud should fade in when moving from one side of the Space Loop Box to the other.

SpaceLoopBox

Defines the box in which the cloud moves from one end to the outer (looping).

Speed

Specifies the speed in x and y direction.

A default material is automatically selected for the volume object.

  • To change it open the material editor to pick the material and modify it
  • To create and assign another material open the material editor and create or choose a material using the VolumeObject shader in the Shader drop down menu under Material Settings and assign it to the selected volume object(s).

Material Parameters

  • Diffuse Color
    • Defines color for shadowed areas of the the volume object. It's modulated with the current sky color.
  • Specular Color
    • Defines color for directly lit areas of the volume object. It's modulated with the current sun color.

Shader Generation Parameters

Volume objects expose the following shader generation parameters via the Shader Generation Params section inside the Material editor.

Soft Intersections

Enables soft intersections with (opaque) scene geometry. Consider enabling this feature only for volume objects that need it due to increased pixel shading cost.


Soft intersections disabled (left) and enabled (right).

Back Lighting

Enables back lighting of volume objects. The silhouette will slightly glow when viewed against the sun.


Back lighting disabled (left) and enabled (right).

Tips

  • To save texture memory and shader cost the resolution of the 3d volume texture is fixed and limited (64x64x64). Therefore you should make sure your volume description doesn't contain too many high frequency details. They would otherwise get lost during voxelization and/or rendering (aliasing)!
  • To improve speed on lower spec configs less samples are taken when computing ray tracing results -> higher chance of aliasing
  • To save texture space reuse a given volume description file as much as possible and rotate volume objects when placing them into the scene to create the illusion of variation. Volume descriptions (and their associated textures are shared) so instances only need individual textures to bake shadow information.
  • No labels