UAtmosphericFogComponent

Used to create fogging effects such as clouds.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Atmosphere/AtmosphericFogComponent.h

Include

#include "Atmosphere/AtmosphericFogComponent.h"

Syntax

class UAtmosphericFogComponent : public USceneComponent

Remarks

Used to create fogging effects such as clouds.

Variables

Name Description

Public variable

float

 

AltitudeScale

Scale the view altitude (only Z scale).

Public variable

uint32: 1

 

bAtmosphereAffectsSunIlluminance

Set to true if the atmosphere should affect the selected sun light illuminance.

Public variable

uint32: 1

 

bDisableGroundScattering

Disable color scattering from ground.

Public variable

uint32: 1

 

bDisableSunDisk

Disable sun disk rendering.

Public variable

float

 

DefaultBrightness

Default atmospheric sun light disc luminance.

Public variable

FColor

 

DefaultLightColor

Default atmospheric sun light disc color. Used when there is no sunlight placed in the level.

Public variable

float

 

DensityMultiplier

Scales the atmosphere transmittance over background.

Public variable

float

 

DensityOffset

Offset the atmosphere transmittance over background [-1.f ~ 1.f].

Public variable

float

 

DistanceOffset

Apply a distance offset before evaluating the atmospheric fog, in km (to handle large distance).

Public variable

float

 

DistanceScale

Scale the view position.

Public variable

float

 

FogMultiplier

Scale the scattered luminance from the atmosphere sun light only on surfaces, excludes the sky.

Public variable

FThreadSafeCoun...

 

GameThreadServiceRequest

When non-zero, the component should flush rendering commands and see if there is any atmosphere stuff to deal with, then decrement it.

Public variable

float

 

GroundOffset

Offset the view altitude (along Z).

Public variable

FByteBulkData

 

InscatterData

Public variable

FAtmosphereText...

 

InscatterResource

Stores in-scattered luminance toward a point according to height and sun direction.

Public variable

FByteBulkData

 

IrradianceData

Public variable

FAtmosphereText...

 

IrradianceResource

Stores ground illuminance as a function of sun direction and atmosphere radius.

Public variable

uint32

 

PrecomputeCounter

This is mostly a legacy thing, it is only modified by the game thread

Protected variable

FAtmospherePrec...

 

PrecomputeParams

Public variable

float

 

StartDistance

The atmospheric fog start distance in centimeters.

Public variable

float

 

SunDiscScale

Sun half apex angle in degree, see https://en.wikipedia.org/wiki/Solid_angle

Public variable

float

 

SunMultiplier

Scale the scattered luminance from the atmosphere sun light.

Public variable

FByteBulkData

 

TransmittanceData

Source vector data.

Public variable

FAtmosphereText...

 

TransmittanceResource

Stores colored transmittance from outer space to point in atmosphere.

Constructors

Name Description

Public function

UAtmosphericFogComponent

(
    const FObjectInitializer& ObjectIn...
)

Destructors

Name Description

Public function

~UAtmosphericFogComponent()

Functions

Name Description

Protected function

void

 

AddFogIfNeeded()

Public function

void

 

ApplyComponentInstanceData

Public function

void

 

DisableGroundScattering

(
    bool NewGroundScattering
)

Set DisableGroundScattering

Public function

void

 

DisableSunDisk

(
    bool NewSunDisk
)

Set DisableSunDisk

Public function Const

const FAtmos...

 

GetPrecomputeParameters()

Public function Const

FLinearColor

 

GetTransmittance

(
    const FVector& SunDirection
)

This needs to be in this header to be accessible to Lightmass.

Public function Static

FLinearColor

 

GetTransmittance

(
    const FVector& SunDirection,
    float AtmosphericFogHeightScaleRayl...
)

This needs to be in this header to be accessible to Lightmass.

Public function

void

 

InitResource()

Public function

void

 

ReleaseResource()

Public function

void

 

SetAltitudeScale

(
    float NewAltitudeScale
)

Set AltitudeScale

Public function

void

 

SetDefaultBrightness

(
    float NewBrightness
)

Set brightness of the light

Public function

void

 

SetDefaultLightColor

(
    FLinearColor NewLightColor
)

Set color of the light

Public function

void

 

SetDensityMultiplier

(
    float NewDensityMultiplier
)

Set DensityMultiplier

Public function

void

 

SetDensityOffset

(
    float NewDensityOffset
)

Set DensityOffset

Public function

void

 

SetDistanceOffset

(
    float NewDistanceOffset
)

Set DistanceOffset

Public function

void

 

SetDistanceScale

(
    float NewDistanceScale
)

Set DistanceScale

Public function

void

 

SetFogMultiplier

(
    float NewFogMultiplier
)

Set FogMultiplier

Public function

void

 

SetPrecomputeParams

(
    float DensityHeight,
    int32 MaxScatteringOrder,
    int32 InscatterAltitudeSampleNum
)

Set PrecomputeParams, only valid in Editor mode

Public function

void

 

SetStartDistance

(
    float NewStartDistance
)

Set StartDistance

Public function

void

 

SetSunMultiplier

(
    float NewSunMultiplier
)

Set SunMultiplier

Public function

void

 

StartPrecompute()

Public function

void

 

UpdatePrecomputedData()

Overridden from UActorComponent

Name Description

Protected function Virtual

void

 

CreateRenderState_Concurrent()

Used to create any rendering thread information for this component

Protected function Virtual

void

 

DestroyRenderState_Concurrent()

Used to shut down any rendering thread structure for this component

Public function Virtual Const

TStructOnSco...

 

GetComponentInstanceData()

Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation

Protected function Virtual

void

 

SendRenderTransform_Concurrent()

Called to send a transform update for this component to the rendering thread

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual Const

bool

 

IsDestructionThreadSafe()

Because FAtmospherePrecomputeDataHandler is a FTicableEditorObject and its destruction is not thread safe.

Public function Virtual Const

bool

 

IsPostLoadThreadSafe()

Called during async load to determine if PostLoad can be called on the loading thread.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInterpChange

(
    UProperty* PropertyThatChanged
)

This is called when property is modified by InterpPropertyTracks

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Enums

Name

Description

Public enum

EPrecomputeState

Deprecated Variables

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback