reckfellENGINE

FogVolume

Local or global volumetric-fog contribution.

On this page
class FogVolumeReckfellSharpInherits VisualInstance3D

An Entity3D object with a fog shape, size and material. Requires Forward+ and enabled Environment volumetric fog. FogMaterial supplies built-in behavior; a fog-type ShaderMaterial defines a custom contribution.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

FogVolumeConstructor
# FogVolume
C#
public FogVolume();

Creates a Box volume of size (2,2,2) with no assigned material. Requires Forward+ and enabled environment volumetric fog. In current RD, no assigned material selects default density-1 fog rather than disabling the volume. Assign a FogMaterial or fog-type ShaderMaterial to control its contribution.

Properties3

MaterialProperty
# Material
C#
public Material Material { get; set; }

Local participating-medium material. Use FogMaterial or a ShaderMaterial with shader_type fog; StandardMaterial3D describes a mesh surface and is not a fog shader. A visible FogVolume requires Forward+ and VolumetricFogEnabled on the effective Environment.

ShapeProperty
# Shape
C#
public RenderingServer.FogVolumeShape Shape { get; set; }

Volumetric fog region: Ellipsoid, Cone, Cylinder, Box or World from RenderingServer.FogVolumeShape. Local shapes use Size and the Entity transform. World acts globally without Size bounds; it does not replace Environment.VolumetricFogEnabled.

SizeProperty
# Size
C#
public Vector3 Size { get; set; }

Full local volume dimensions, not half-extents. Assignment clamps negative components to zero; zero dimensions do not define a useful fog region. Shape=World is not bounded by this size. The example Box uses 10×5×10.

Methods6

GetMaterialMaterial
# GetMaterial
C#
public Material GetMaterial();

Volume contribution material: FogMaterial or a ShaderMaterial with shader_type fog. Assignment does not enable Environment.VolumetricFogEnabled. Volumes using the same material share its parameter values. null clears the assignment, but current RD uses its default material; set Visible=false to hide the volume.

Returns Material

Assigned Material, or null. This getter does not return the internal renderer default material.

GetShapeRenderingServer.FogVolumeShape
# GetShape
C#
public RenderingServer.FogVolumeShape GetShape();

Volume shape: Ellipsoid, Cone, Cylinder, Box or World. Local shapes use Size and the Entity3D transform; World is global. In current RD, referencing SDF disables the automatic shape mask, so provide your own DENSITY mask.

Returns RenderingServer.FogVolumeShape

Assigned FogVolumeShape value.

GetSizeVector3
# GetSize
C#
public Vector3 GetSize();

Full local-shape size, not half-extents or fog-grid resolution. Negative components are clamped to zero. World shape does not use this size as a global-volume boundary.

Returns Vector3

Stored size after negative components are clamped to zero.

SetMaterialvoid
# SetMaterial
C#
public void SetMaterial(Material material);

Volume contribution material: FogMaterial or a ShaderMaterial with shader_type fog. Assignment does not enable Environment.VolumetricFogEnabled. Volumes using the same material share its parameter values. null clears the assignment, but current RD uses its default material; set Visible=false to hide the volume.

Parameters
NameTypeDefault
materialMaterial—
material

Fog material, or null. null selects the RD default rather than disabling the volume.

SetShapevoid
# SetShape
C#
public void SetShape(RenderingServer.FogVolumeShape shape);

Volume shape: Ellipsoid, Cone, Cylinder, Box or World. Local shapes use Size and the Entity3D transform; World is global. In current RD, referencing SDF disables the automatic shape mask, so provide your own DENSITY mask.

Parameters
NameTypeDefault
shapeRenderingServer.FogVolumeShape—
shape

FogVolumeShape; World is not constrained by Size.

SetSizevoid
# SetSize
C#
public void SetSize(Vector3 size);

Full local-shape size, not half-extents or fog-grid resolution. Negative components are clamped to zero. World shape does not use this size as a global-volume boundary.

Parameters
NameTypeDefault
sizeVector3—
size

Full size; use positive components for a nonempty local shape.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.