FogVolume
继承: VisualInstance3D < Node3D < Node < Object
A region that contributes to the default volumetric fog from the world environment.
描述
FogVolume s are used to add localized fog into the global volumetric fog effect. FogVolume s can also remove volumetric fog from specific areas if using a FogMaterial with a negative FogMaterial.density.
Performance of FogVolume s is directly related to their relative size on the screen and the complexity of their attached FogMaterial. It is best to keep FogVolume s relatively small and simple where possible.
Note: FogVolume s only have a visible effect if Environment.volumetric_fog_enabled is true. If you don't want fog to be globally visible (but only within FogVolume nodes), set Environment.volumetric_fog_density to 0.0.
属性
属性说明
Material material
The Material used by the FogVolume. Can be either a built-in FogMaterial or a custom ShaderMaterial.
FogVolumeShape shape = 3
voidset_shape ( value: FogVolumeShape )- FogVolumeShape get_shape ( )
The shape of the FogVolume. This can be set to either RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID, RenderingServer.FOG_VOLUME_SHAPE_CONE, RenderingServer.FOG_VOLUME_SHAPE_CYLINDER, RenderingServer.FOG_VOLUME_SHAPE_BOX or RenderingServer.FOG_VOLUME_SHAPE_WORLD.
Vector3 size = Vector3(2, 2, 2)
The size of the FogVolume when shape is RenderingServer.FOG_VOLUME_SHAPE_ELLIPSOID, RenderingServer.FOG_VOLUME_SHAPE_CONE, RenderingServer.FOG_VOLUME_SHAPE_CYLINDER or RenderingServer.FOG_VOLUME_SHAPE_BOX.
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.volumetric_fog_length (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.FOG_VOLUME_SHAPE_CONE or RenderingServer.FOG_VOLUME_SHAPE_CYLINDER, 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.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。