Documentation
¶
Overview ¶
FogVolumes are used to add localized fog into the global volumetric fog effect. FogVolumes can also remove volumetric fog from specific areas if using a FogMaterial with a negative FogMaterial.Density.
Performance of FogVolumes is directly related to their relative size on the screen and the complexity of their attached FogMaterial. It is best to keep FogVolumes relatively small and simple where possible.
Note: FogVolumes only have a visible effect if Environment.VolumetricFogEnabled is true. If you don't want fog to be globally visible (but only within FogVolume nodes), set Environment.VolumetricFogDensity to 0.0.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsFogVolume() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode3D() Node3D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
- func (self Instance) ID() ID
- func (self Instance) Material() Material.Instance
- func (self Instance) SetMaterial(value Material.Instance)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetShape(value RenderingServer.FogVolumeShape)
- func (self Instance) SetSize(value Vector3.XYZ)
- func (self Instance) Shape() RenderingServer.FogVolumeShape
- func (self Instance) Size() Vector3.XYZ
- func (self Instance) Virtual(name string) reflect.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsFogVolume ¶
func (*Extension[T]) AsVisualInstance3D ¶
func (self *Extension[T]) AsVisualInstance3D() VisualInstance3D.Instance
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsFogVolume ¶
func (Instance) AsVisualInstance3D ¶
func (self Instance) AsVisualInstance3D() VisualInstance3D.Instance
func (Instance) Material ¶
The Material used by the FogVolume. Can be either a built-in FogMaterial or a custom ShaderMaterial.
func (Instance) SetMaterial ¶
SetMaterial sets the property returned by [GetMaterial].
func (Instance) SetShape ¶
func (self Instance) SetShape(value RenderingServer.FogVolumeShape)
SetShape sets the property returned by [GetShape].
func (Instance) Shape ¶
func (self Instance) Shape() RenderingServer.FogVolumeShape
The shape of the FogVolume. This can be set to either [Renderingserver.FogVolumeShapeEllipsoid], [Renderingserver.FogVolumeShapeCone], [Renderingserver.FogVolumeShapeCylinder], [Renderingserver.FogVolumeShapeBox] or [Renderingserver.FogVolumeShapeWorld].
func (Instance) Size ¶
The size of the FogVolume when Shape is [Renderingserver.FogVolumeShapeEllipsoid], [Renderingserver.FogVolumeShapeCone], [Renderingserver.FogVolumeShapeCylinder] or [Renderingserver.FogVolumeShapeBox].
Note: Thin fog volumes may appear to flicker when the camera moves or rotates. This can be alleviated by increasing ProjectSettings "rendering/environment/volumetric_fog/volume_depth" (at a performance cost) or by decreasing Environment.VolumetricFogLength (at no performance cost, but at the cost of lower fog range). Alternatively, the FogVolume can be made thicker and use a lower density in the Material.
Note: If Shape is [Renderingserver.FogVolumeShapeCone] or [Renderingserver.FogVolumeShapeCylinder], the cone/cylinder will be adjusted to fit within the size. Non-uniform scaling of cone/cylinder shapes via the Size property is not supported, but you can scale the FogVolume node instead.