Documentation/Entity Types/Base/Fog.type

From NeoAxis 3D Engine Wiki

Jump to: navigation, search
Go to higher level

Contents

Overview

The Fog entity type allows you to add a fog effect on your map. There are two main types of fog: linear and exponential. Linear fog amplifies evenly at distance whereas the exponential amplifies unevenly exponentially (with each unit of distance strengthening of fog increases in comparison with the previous unit).

Example of fog effect

Linear Type of Fog

Linear (Linear) type of fog uses two parameters to adjust its scope: the distance to the initial (LinearStart) and end point (LinearEnd). The fog starts when the distance from the subject to the camera is larger than the distance to the starting point. Then the fog increases linearly up to the end point. After the end point, nothing could be seen but fog.

Exponential Type of Fog

When using expotential fog, it's density (ExpDensity) is specified. The density of the fog will exponentially increase as the distance to the camera increases.

Adding fog on the map

To add the fog effect, it is necessary to add the Base\Types\Fog object from the Object Creation window of the map editor.

Fog 002.jpg

Properties

Name Description
class Entity
Components List of attached components.
LogicClass Reference to the Logic Editor class. Read more about how to work with the Logic Editor class.
Name Object name.
Tags User defined information. Defined as keyvalue pairs. It is used for user's needs.
Type Object type. It can not be changed.
class Fog
Color The color of the fog.
ExpDensity Intensity of the fog. The higher the value, the stronger the density of the fog will increase as the distance from the camera increases. It is used only for exponential type of fog.
LinearEnd The distance from the camera to the end point of the linear fog distribution. When the distance from the camera to the object exceeded this value, the object is fully absorbed by the fog. It is used only for linear type of fog.
LinearStart The distance from the camera to the starting point of the linear fog distribution. If the distance between the camera and the subject is smaller than this, the fog is not visible. From a distance equal to this parameter value, the fog starts with a linear increase in intensity. It is used only for linear type of fog.
Mode Type of fog. There are three types of fog: Linear (Linear), Exp (exponential) and Exp2 (exponential squared).