Search Results for

    Show / Hide Table of Contents

    Class ExponentialHeightFog

    Used to create fogging effects such as clouds but with a density that is related to the height of the fog.

    Inheritance
    Object
    ScriptingObject
    SceneObject
    Actor
    ExponentialHeightFog
    Inherited Members
    Actor::_box
    Actor::_drawCategory
    Actor::_drawNoCulling
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    Actor::_isActive
    Actor::_isActiveInHierarchy
    Actor::_isEnabled
    Actor::_isHierarchyDirty
    Actor::_isPrefabRoot
    Actor::_layer
    Actor::_localTransform
    Actor::_name
    SceneObject::_parent
    Actor::_physicsScene
    SceneObject::_prefabID
    SceneObject::_prefabObjectID
    Actor::_scene
    Actor::_sphere
    Actor::_staticFlags
    Actor::_transform
    ScriptingObject::_type
    Actor::AddMovement(const Vector3& translation)
    Actor::AddMovement(const Vector3& translation, const Quaternion& rotation)
    Actor::AddScript()
    Actor::AddStaticFlags(StaticFlags flags)
    Actor::AddTag(const Tag& tag)
    Actor::AddTagRecursive(const Tag& tag)
    ExponentialHeightFog
    Actor::BeginPlay(SceneBeginData* data)
    Actor::BreakPrefabLink()
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    Actor::ChangeScriptOrder(Script* script, int32 newIndex)
    Actor::Children
    Actor::Clone()
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    Actor::DEPRECATED("Use HasTag instead") const String& GetTag()
    Actor::DEPRECATED("Use AddTag instead") void SetTag(const StringView& value)
    ISerializable::DeserializeIfExists(DeserializeStream& stream, const char* memberName, ISerializeModifier* modifier)
    ExponentialHeightFog
    Actor::DestroyChildren(float timeLeft = 0.0f)
    ScriptingObject::DestroyManaged()
    Actor::Draw(RenderContextBatch& renderContextBatch)
    Actor::EndPlay()
    Actor::FindActor(const StringView& name)
    Actor::FindActor(const MClass* type, bool activeOnly=false)
    Actor::FindActor(const MClass* type, const StringView& name)
    Actor::FindActor(const MClass* type, const Tag& tag, bool activeOnly=false)
    Actor::FindActor()
    Actor::FindActor(const Tag& tag)
    Actor::FindScript(const MClass* type)
    Actor::FindScript()
    Object::Flags
    Actor::FromBytes(const Span<byte>& data, Array<Actor* >& output, ISerializeModifier* modifier)
    Actor::FromBytes(const Span<byte>& data)
    Actor::FromBytes(const Span<byte>& data, const Dictionary<Guid, Guid, HeapAllocation>& idsMapping)
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    Actor::FromJson(const StringAnsiView& json)
    Actor::GetBox()
    Actor::GetBoxWithChildren()
    Actor::GetChild(int32 index)
    Actor::GetChild(const StringView& name)
    Actor::GetChild(const MClass* type)
    Actor::GetChild()
    Actor::GetChildren(const MClass* type)
    Actor::GetChildren()
    Actor::GetChildrenCount()
    ScriptingObject::GetClass()
    Actor::GetDirection()
    Actor::GetEditorBoxChildren()
    ScriptingObject::GetID()
    Actor::GetIsActive()
    Actor::GetLayer()
    Actor::GetLayerMask()
    Actor::GetLayerName()
    Actor::GetLocalOrientation()
    Actor::GetLocalPosition()
    Actor::GetLocalScale()
    Actor::GetLocalToWorldMatrix(Matrix& localToWorld)
    Actor::GetLocalToWorldMatrix(Double4x4& localToWorld)
    Actor::GetLocalTransform()
    ScriptingObject::GetManagedInstance()
    Actor::GetName()
    SceneObject::GetNamePath(Char separatorChar='/')
    Actor::GetOrAddChild()
    ScriptingObject::GetOrCreateManagedInstance()
    Actor::GetOrderInParent()
    Actor::GetOrientation()
    SceneObject::GetParent()
    Actor::GetPerInstanceRandom()
    Actor::GetPhysicsScene()
    Actor::GetPosition()
    SceneObject::GetPrefabID()
    SceneObject::GetPrefabObjectID()
    Actor::GetPrefabRoot()
    Actor::GetRotation()
    Actor::GetScale()
    Actor::GetScene()
    Actor::GetSceneObjectId()
    Actor::GetSceneRendering()
    Actor::GetScript(int32 index)
    Actor::GetScript(const MClass* type)
    Actor::GetScript()
    Actor::GetScriptByID(const Guid& id)
    Actor::GetScripts(const MClass* type)
    Actor::GetScripts()
    Actor::GetScriptsCount()
    Actor::GetSphere()
    Actor::GetStaticFlags()
    Actor::GetTransform()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    Actor::GetWorldToLocalMatrix(Matrix& worldToLocal)
    Actor::GetWorldToLocalMatrix(Double4x4& worldToLocal)
    Actor::HasActorInChildren(Actor* a)
    Actor::HasActorInHierarchy(Actor* a)
    ScriptingObject::HasManagedInstance()
    SceneObject::HasParent()
    SceneObject::HasPrefabLink()
    Actor::HasScene()
    Actor::HasStaticFlag(StaticFlags flag)
    Actor::HasTag()
    Actor::HasTag(const Tag& tag)
    Actor::HasTag(const StringView& tag)
    Actor::HideFlags
    Actor::Initialize()
    Actor::InitializeHierarchy()
    Actor::Intersects(const Ray& ray, Real& distance, Vector3& normal)
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    Actor::IsActiveInHierarchy()
    SceneObject::IsDuringPlay()
    Actor::IsPrefabRoot()
    ScriptingObject::IsRegistered()
    Actor::IsStatic()
    Actor::IsTransformStatic()
    Actor::LinkPrefab(const Guid& prefabId, const Guid& prefabObjectId)
    Actor::LookAt(const Vector3& worldPos)
    Actor::LookAt(const Vector3& worldPos, const Vector3& worldUp)
    Actor::LookingAt(const Vector3& worldPos)
    Actor::LookingAt(const Vector3& worldPos, const Vector3& worldUp)
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    Actor::OnActiveChanged()
    Actor::OnActiveInTreeChanged()
    Actor::OnBeginPlay()
    Actor::OnDebugDraw()
    Actor::OnDebugDrawSelected()
    Actor::OnDeleteObject()
    Actor::OnEndPlay()
    Actor::OnLayerChanged()
    ScriptingObject::OnManagedInstanceDeleted()
    Actor::OnOrderInParentChanged()
    Actor::OnParentChanged()
    Actor::OnPhysicsSceneChanged(PhysicsScene* previous)
    ScriptingObject::OnScriptingDispose()
    Actor::OnStaticFlagsChanged()
    ScriptingObject::RegisterObject()
    Actor::RemoveStaticFlags(StaticFlags flags)
    Actor::RemoveTag(const Tag& tag)
    Actor::ResetLocalTransform()
    SceneObject::SceneObject(const SpawnParams& params)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    Actor::Scripts
    ExponentialHeightFog
    ExponentialHeightFog
    Actor::SetDirection(const Float3& value)
    Actor::SetIsActive(bool value)
    Actor::SetLayer(int32 layerIndex)
    Actor::SetLayerName(const StringView& value)
    Actor::SetLayerNameRecursive(const StringView& value)
    Actor::SetLayerRecursive(int32 layerIndex)
    Actor::SetLocalOrientation(const Quaternion& value)
    Actor::SetLocalPosition(const Vector3& value)
    Actor::SetLocalScale(const Float3& value)
    Actor::SetLocalTransform(const Transform& value)
    ScriptingObject::SetManagedInstance(MObject* instance)
    Actor::SetName(String&& value)
    Actor::SetName(const StringView& value)
    Actor::SetOrderInParent(int32 index)
    Actor::SetOrientation(const Quaternion& value)
    Actor::SetParent(Actor* value, bool worldPositionsStays, bool canBreakPrefabLink)
    Actor::SetParent(Actor* value, bool canBreakPrefabLink=true)
    SceneObject::SetParent(Actor* value)
    Actor::SetPhysicsScene(PhysicsScene* scene)
    Actor::SetPosition(const Vector3& value)
    Actor::SetRotation(const Matrix& value)
    Actor::SetScale(const Float3& value)
    Actor::SetStaticFlag(StaticFlags flag, bool value)
    Actor::SetStaticFlags(StaticFlags value)
    Actor::SetTransform(const Transform& value)
    ExponentialHeightFog
    Actor::Tags
    Actor::ToBytes(const Array<Actor* >& actors, MemoryWriteStream& output)
    Actor::ToBytes(const Array<Actor* >& actors)
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    Actor::ToJson()
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    Actor::ToString()
    Actor::TreeExecute(Function<bool(Actor* , Params ...)>& action, Params ... args)
    Actor::TreeExecuteChildren(Function<bool(Actor* , Params ...)>& action, Params ... args)
    Actor::TryGetSerializedObjectsIds(const Span<byte>& data)
    ScriptingObject::UnregisterObject()
    Actor::UnregisterObjectHierarchy()
    ISerializable::~ISerializable()
    Object::~Object()
    SceneObject::~SceneObject()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Level/Actors/ExponentialHeightFog.h
    Syntax
    public class ExponentialHeightFog : public Actor, public IFogRenderer

    Fields

    DirectionalInscatteringColor

    Controls the color of the directional inscattering, which is used to approximate inscattering from a directional light. Note: there must be a directional light enabled for DirectionalInscattering to be used.

    Declaration
    public Color DirectionalInscatteringColor = Color(0.25, 0.25f, 0.125f)
    Field Value
    Color

    DirectionalInscatteringExponent

    Controls the size of the directional inscattering cone, which is used to approximate inscattering from a directional light. Note: there must be a directional light enabled for DirectionalInscattering to be used. Range: 2-64.

    Declaration
    public float DirectionalInscatteringExponent = 4.0f
    Field Value
    float

    DirectionalInscatteringLight

    Directional light used for Directional Inscattering.

    Declaration
    public ScriptingObjectReference<DirectionalLight> DirectionalInscatteringLight
    Field Value
    ScriptingObjectReference<DirectionalLight>

    DirectionalInscatteringStartDistance

    Controls the start distance from the viewer of the directional inscattering, which is used to approximate inscattering from a directional light. Note: there must be a directional light enabled for DirectionalInscattering to be used.

    Declaration
    public float DirectionalInscatteringStartDistance = 10000.0f
    Field Value
    float

    FogCutoffDistance

    Scene elements past this distance will not have fog applied. This is useful for excluding skyboxes which already have fog baked in. Setting this value to 0 disables it.

    Declaration
    public float FogCutoffDistance = 0.0f
    Field Value
    float

    FogDensity

    The fog density factor.

    Declaration
    public float FogDensity = 0.02f
    Field Value
    float

    FogHeightFalloff

    The fog height density factor that controls how the density increases as height decreases. Smaller values produce a more visible transition layer.

    Declaration
    public float FogHeightFalloff = 0.2f
    Field Value
    float

    FogInscatteringColor

    Color of the fog.

    Declaration
    public Color FogInscatteringColor = Color(0.448f, 0.634f, 1.0f)
    Field Value
    Color

    FogMaxOpacity

    Maximum opacity of the fog. A value of 1 means the fog can become fully opaque at a distance and replace scene color completely. A value of 0 means the fog color will not be factored in at all.

    Declaration
    public float FogMaxOpacity = 1.0f
    Field Value
    float

    StartDistance

    Distance from the camera that the fog will start, in world units.

    Declaration
    public float StartDistance = 0.0f
    Field Value
    float

    VolumetricFogAlbedo

    The height fog particle reflectiveness used by volumetric fog. Water particles in air have an albedo near white, while dust has slightly darker value.

    Declaration
    public Color VolumetricFogAlbedo = Color::White
    Field Value
    Color

    VolumetricFogDistance

    Distance over which volumetric fog should be computed. Larger values extend the effect into the distance but expose under-sampling artifacts in details.

    Declaration
    public float VolumetricFogDistance = 6000.0f
    Field Value
    float

    VolumetricFogEmissive

    Light emitted by height fog. This is a density value so more light is emitted the further you are looking through the fog. In most cases using a Skylight is a better choice, however, it may be useful in certain scenarios.

    Declaration
    public Color VolumetricFogEmissive = Color::Black
    Field Value
    Color

    VolumetricFogEnable

    Whether to enable Volumetric fog. Graphics quality settings control the resolution of the fog simulation.

    Declaration
    public bool VolumetricFogEnable = false
    Field Value
    bool

    VolumetricFogExtinctionScale

    Scales the height fog particle extinction amount used by volumetric fog. Values larger than 1 cause fog particles everywhere absorb more light. Range: 0.1-10.

    Declaration
    public float VolumetricFogExtinctionScale = 1.0f
    Field Value
    float

    VolumetricFogScatteringDistribution

    Controls the scattering phase function - how much incoming light scatters in various directions. A distribution value of 0 scatters equally in all directions, while 0.9 scatters predominantly in the light direction. In order to have visible volumetric fog light shafts from the side, the distribution will need to be closer to 0. Range: -0.9-0.9.

    Declaration
    public float VolumetricFogScatteringDistribution = 0.2f
    Field Value
    float

    Methods

    Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)

    Deserializes object from the input stream.

    Declaration
    public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
    Parameters
    DeserializeStream stream

    The input stream.

    ISerializeModifier modifier

    The deserialization modifier object. Always valid.

    Overrides
    Actor::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)

    Draw(RenderContext& renderContext)

    Draws this actor. Called by Scene Rendering service. This call is more optimized than generic Draw (eg. geometry is rendered during all pass types but other actors are drawn only during GBufferFill pass).

    Declaration
    public virtual void Draw(RenderContext& renderContext) override
    Parameters
    RenderContext renderContext

    The rendering context.

    Overrides
    Actor::Draw(RenderContext& renderContext)

    DrawFog(GPUContext* context, RenderContext& renderContext, GPUTextureView* output)

    Draw fog using GBuffer inputs

    Declaration
    public virtual void DrawFog(GPUContext* context, RenderContext& renderContext, GPUTextureView* output) override
    Parameters
    GPUContext context

    Context responsible for rendering commands

    RenderContext renderContext

    The rendering context.

    GPUTextureView output

    Output buffer

    Overrides
    IFogRenderer::DrawFog(GPUContext* context, RenderContext& renderContext, GPUTextureView* output)

    GetEditorBox()

    Gets actor bounding box (single actor, no children included) for editor tools.

    Declaration
    public virtual BoundingBox GetEditorBox() const override
    Returns
    BoundingBox

    Overrides
    Actor::GetEditorBox()

    GetExponentialHeightFogData(const RenderView& view, ShaderExponentialHeightFogData& result)

    Gets the exponential height fog data.

    Declaration
    public virtual void GetExponentialHeightFogData(const RenderView& view, ShaderExponentialHeightFogData& result) const override
    Parameters
    RenderView view

    The rendering view.

    ShaderExponentialHeightFogData result

    The result.

    Overrides
    IFogRenderer::GetExponentialHeightFogData(const RenderView& view, ShaderExponentialHeightFogData& result)

    GetVolumetricFogOptions(VolumetricFogOptions& result)

    Gets the volumetric fog options.

    Declaration
    public virtual void GetVolumetricFogOptions(VolumetricFogOptions& result) const override
    Parameters
    VolumetricFogOptions result

    The result.

    Overrides
    IFogRenderer::GetVolumetricFogOptions(VolumetricFogOptions& result)

    HasContentLoaded()

    Returns true if actor has loaded content.

    Declaration
    public virtual bool HasContentLoaded() const override
    Returns
    bool

    Overrides
    Actor::HasContentLoaded()

    IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)

    Determines if there is an intersection between the current object and a ray.

    Declaration
    public virtual bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override
    Parameters
    Ray ray

    The ray to test.

    Real distance

    When the method completes, contains the distance of the intersection (if any valid).

    Vector3 normal

    When the method completes, contains the intersection surface normal vector (if any valid).

    Returns
    bool

    True whether the two objects intersected, otherwise false.

    Overrides
    Actor::IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)

    OnDisable()

    Called when actor gets removed from game systems. Occurs on EndPlay event or when actor gets inactivated in hierarchy. Use this event to unregister object from other game system (eg. audio).

    Declaration
    protected virtual void OnDisable() override
    Overrides
    Actor::OnDisable()

    OnEnable()

    Called when actor gets added to game systems. Occurs on BeginPlay event or when actor gets activated in hierarchy. Use this event to register object to other game system (eg. audio).

    Declaration
    protected virtual void OnEnable() override
    Overrides
    Actor::OnEnable()

    OnTransformChanged()

    Called when actor transform gets changed.

    Declaration
    protected virtual void OnTransformChanged() override
    Overrides
    Actor::OnTransformChanged()

    Serialize(SerializeStream& stream, const void* otherObj)

    Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.

    Declaration
    public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
    Parameters
    SerializeStream stream

    The output stream.

    void otherObj

    The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties.

    Overrides
    Actor::Serialize(SerializeStream& stream, const void* otherObj)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat