mirror of
https://github.com/godotengine/godot.git
synced 2025-01-29 13:20:43 +00:00
Document GI techniques ignoring VisualInstance3D and Camera3D layers
This also improves documentation for a few other properties in those classes.
This commit is contained in:
parent
afb2480947
commit
40bf95ca8e
@ -154,7 +154,10 @@
|
||||
The [CameraAttributes] to use for this camera.
|
||||
</member>
|
||||
<member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575">
|
||||
The culling mask that describes which 3D render layers are rendered by this camera.
|
||||
The culling mask that describes which [member VisualInstance3D.layers] are rendered by this camera. By default, all 20 user-visible layers are rendered.
|
||||
[b]Note:[/b] Since the [member cull_mask] allows for 32 layers to be stored in total, there are an additional 12 layers that are only used internally by the engine and aren't exposed in the editor. Setting [member cull_mask] using a script allows you to toggle those reserved layers, which can be useful for editor plugins.
|
||||
To adjust [member cull_mask] more easily using a script, use [method get_cull_mask_value] and [method set_cull_mask_value].
|
||||
[b]Note:[/b] [VoxelGI], SDFGI and [LightmapGI] will always take all layers into account to determine what contributes to global illumination. If this is an issue, set [member GeometryInstance3D.gi_mode] to [constant GeometryInstance3D.GI_MODE_DISABLED] for meshes and [member Light3D.light_bake_mode] to [constant Light3D.BAKE_DISABLED] for lights to exclude them from global illumination.
|
||||
</member>
|
||||
<member name="current" type="bool" setter="set_current" getter="is_current" default="false">
|
||||
If [code]true[/code], the ancestor [Viewport] is currently using this camera.
|
||||
@ -167,7 +170,7 @@
|
||||
The [Environment] to use for this camera.
|
||||
</member>
|
||||
<member name="far" type="float" setter="set_far" getter="get_far" default="4000.0">
|
||||
The distance to the far culling boundary for this camera relative to its local Z axis.
|
||||
The distance to the far culling boundary for this camera relative to its local Z axis. Higher values allow the camera to see further away, while decreasing [member far] can improve performance if it results in objects being partially or fully culled.
|
||||
</member>
|
||||
<member name="fov" type="float" setter="set_fov" getter="get_fov" default="75.0">
|
||||
The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
|
||||
@ -188,7 +191,7 @@
|
||||
The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT].
|
||||
</member>
|
||||
<member name="near" type="float" setter="set_near" getter="get_near" default="0.05">
|
||||
The distance to the near culling boundary for this camera relative to its local Z axis.
|
||||
The distance to the near culling boundary for this camera relative to its local Z axis. Lower values allow the camera to see objects more up close to its origin, at the cost of lower precision across the [i]entire[/i] range. Values lower than the default can lead to increased Z-fighting.
|
||||
</member>
|
||||
<member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera3D.ProjectionType" default="0">
|
||||
The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size.
|
||||
|
@ -60,6 +60,8 @@
|
||||
The render layer(s) this [VisualInstance3D] is drawn on.
|
||||
This object will only be visible for [Camera3D]s whose cull mask includes any of the render layers this [VisualInstance3D] is set to.
|
||||
For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal.
|
||||
To adjust [member layers] more easily using a script, use [method get_layer_mask_value] and [method set_layer_mask_value].
|
||||
[b]Note:[/b] [VoxelGI], SDFGI and [LightmapGI] will always take all layers into account to determine what contributes to global illumination. If this is an issue, set [member GeometryInstance3D.gi_mode] to [constant GeometryInstance3D.GI_MODE_DISABLED] for meshes and [member Light3D.light_bake_mode] to [constant Light3D.BAKE_DISABLED] for lights to exclude them from global illumination.
|
||||
</member>
|
||||
<member name="sorting_offset" type="float" setter="set_sorting_offset" getter="get_sorting_offset" default="0.0">
|
||||
The amount by which the depth of this [VisualInstance3D] will be adjusted when sorting by depth. Uses the same units as the engine (which are typically meters). Adjusting it to a higher value will make the [VisualInstance3D] reliably draw on top of other [VisualInstance3D]s that are otherwise positioned at the same spot. To ensure it always draws on top of other objects around it (not positioned at the same spot), set the value to be greater than the distance between this [VisualInstance3D] and the other nearby [VisualInstance3D]s.
|
||||
|
Loading…
Reference in New Issue
Block a user