From 566ffc2695770162aff9890c06e183497e41d57e Mon Sep 17 00:00:00 2001 From: clayjohn Date: Sun, 5 Jan 2020 00:33:16 -0800 Subject: Document most VisualServer functions --- doc/classes/VisualServer.xml | 110 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 107 insertions(+), 3 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 612bfb41c6..3165f348ab 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -1417,6 +1417,7 @@ + Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias]. @@ -1425,6 +1426,7 @@ + Returns the axis-aligned bounding box that covers the full extent of the GI probe. @@ -1433,6 +1435,7 @@ + Returns the cell size set by [method gi_probe_set_cell_size]. @@ -1441,6 +1444,7 @@ + Returns the data used by the GI probe. @@ -1449,6 +1453,7 @@ + Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range]. @@ -1457,6 +1462,7 @@ + Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy]. @@ -1465,6 +1471,7 @@ + Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias]. @@ -1473,6 +1480,7 @@ + Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation]. @@ -1481,6 +1489,7 @@ + Returns the Transform set by [method gi_probe_set_to_cell_xform]. @@ -1489,6 +1498,7 @@ + Returns [code]true[/code] if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress]. @@ -1497,6 +1507,7 @@ + Returns [code]true[/code] if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior]. @@ -1507,6 +1518,7 @@ + Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias]. @@ -1517,6 +1529,7 @@ + Sets the axis-aligned bounding box that covers the extent of the GI probe. @@ -1527,6 +1540,7 @@ + Sets the size of individual cells within the GI probe. @@ -1537,6 +1551,7 @@ + Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress]. @@ -1547,6 +1562,7 @@ + Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself. @@ -1557,6 +1573,7 @@ + Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [member GIProbe.dynamic_range]. @@ -1567,6 +1584,7 @@ + Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy]. @@ -1577,6 +1595,7 @@ + Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [member GIProbe.interior]. @@ -1587,6 +1606,7 @@ + Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [member GIProbe.normal_bias]. @@ -1597,6 +1617,7 @@ + Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation]. @@ -1607,6 +1628,7 @@ + Sets the to cell [Transform] for this GI probe. @@ -2019,7 +2041,7 @@ - Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. + Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. @@ -2031,7 +2053,7 @@ - Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. + Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. @@ -2045,7 +2067,7 @@ - Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. + Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. @@ -2057,6 +2079,7 @@ + If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits]. @@ -2067,6 +2090,7 @@ + Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options. @@ -2077,6 +2101,7 @@ + Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. @@ -2087,6 +2112,7 @@ + Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [member OmniLight.omni_shadow_detail]. @@ -2097,6 +2123,7 @@ + Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight.omni_shadow_mode]. @@ -2107,6 +2134,7 @@ + Sets the color of the light. Equivalent to [member Light.light_color]. @@ -2117,6 +2145,7 @@ + Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask]. @@ -2127,6 +2156,7 @@ + If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light.light_negative]. @@ -2139,6 +2169,7 @@ + Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param]. @@ -2149,6 +2180,7 @@ + Not implemented in Godot 3.x. @@ -2159,6 +2191,7 @@ + If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light.shadow_reverse_cull_face]. @@ -2169,6 +2202,7 @@ + If [code]true[/code], light will cast shadows. Equivalent to [member Light.shadow_enabled]. @@ -2179,6 +2213,7 @@ + Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color]. @@ -2331,6 +2366,7 @@ + Returns the default value for the param if available. Otherwise returns an empty [Variant]. @@ -2603,6 +2639,7 @@ + Function is unused in Godot 3.x. @@ -2615,6 +2652,7 @@ + Function is unused in Godot 3.x. @@ -2686,6 +2724,7 @@ + Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. @@ -2702,6 +2741,7 @@ + Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count]. @@ -2719,6 +2759,7 @@ + Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. @@ -2727,6 +2768,7 @@ + Returns the number of instances allocated for this multimesh. @@ -2735,6 +2777,7 @@ + Returns the RID of the mesh that will be used in drawing this multimesh. @@ -2743,6 +2786,7 @@ + Returns the number of visible instances for this multimesh. @@ -2753,6 +2797,7 @@ + Returns the color by which the specified instance will be modulated. @@ -2763,6 +2808,7 @@ + Returns the custom data associated with the specified instance. @@ -2773,6 +2819,7 @@ + Returns the [Transform] of the specified instance. @@ -2783,6 +2830,7 @@ + Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms. @@ -2795,6 +2843,7 @@ + Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]. @@ -2807,6 +2856,7 @@ + Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]. @@ -2819,6 +2869,7 @@ + Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. @@ -2831,6 +2882,7 @@ + Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. @@ -2841,6 +2893,11 @@ + Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. + + All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc. + + [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats. @@ -2851,6 +2908,7 @@ + Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. @@ -2861,6 +2919,7 @@ + Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]. @@ -2887,6 +2946,7 @@ + Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb]. @@ -2895,6 +2955,7 @@ + Returns [code]true[/code] if particles are currently set to emitting. @@ -2903,6 +2964,7 @@ + Returns [code]true[/code] if particles are not emitting and particles are set to inactive. @@ -2911,6 +2973,7 @@ + Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]. @@ -2919,6 +2982,7 @@ + Reset the particles on the next update. Equivalent to [method Particles.restart] @@ -2929,6 +2993,7 @@ + Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount]. @@ -2939,6 +3004,7 @@ + Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb]. @@ -2949,6 +3015,7 @@ + Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member Particles.draw_order]. @@ -2961,6 +3028,7 @@ + Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4]. @@ -2971,6 +3039,7 @@ + Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes]. @@ -2981,6 +3050,7 @@ + Sets the [Transform] that will be used by the particles when they first emit. @@ -2991,6 +3061,7 @@ + If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member Particles.emitting]. @@ -3001,6 +3072,7 @@ + Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness]. @@ -3011,6 +3083,7 @@ + Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps]. @@ -3021,6 +3094,7 @@ + If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta]. @@ -3031,6 +3105,7 @@ + Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime]. @@ -3041,6 +3116,7 @@ + If [code]true[/code], particles will emit once and then stop. Equivalent to [member Particles.one_shot]. @@ -3051,6 +3127,7 @@ + Sets the preprocess time for the particles animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member Particles.preprocess]. @@ -3061,6 +3138,7 @@ + Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material]. @@ -3071,6 +3149,7 @@ + Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness]. @@ -3081,6 +3160,7 @@ + Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale]. @@ -3091,6 +3171,7 @@ + If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member Particles.local_coords]. @@ -3253,6 +3334,7 @@ + Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options. @@ -3263,6 +3345,7 @@ + Sets the environment that will be used with this scenario. @@ -3273,6 +3356,7 @@ + Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. @@ -3285,6 +3369,7 @@ + Sets the size of the reflection atlas shared by all reflection probes in this scenario. @@ -3308,6 +3393,7 @@ + If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode. @@ -3316,6 +3402,7 @@ + Sets the default clear color which is used when a specific clear color has not been selected. @@ -3485,6 +3572,7 @@ + Not implemented in Godot 3.x. @@ -3505,6 +3593,7 @@ + Allocates the GPU memory for the texture. @@ -3561,6 +3650,7 @@ + Returns the depth of the texture. @@ -3614,6 +3704,7 @@ + Returns the type of the texture, can be any of the [enum TextureType]. @@ -3662,6 +3753,7 @@ + Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly. @@ -3707,6 +3799,7 @@ + Resizes the texture to the specified dimensions. @@ -4459,10 +4552,13 @@ The instance is a light. + The instance is a reflection probe. + The instance is a GI probe. + The instance is a lightmap capture. Represents the size of the [enum InstanceType] enum. @@ -4568,20 +4664,28 @@ + Use [Transform2D] to store MultiMesh transform. + Use [Transform] to store MultiMesh transform. + MultiMesh does not use per-instance color. + MultiMesh color uses 8 bits per component. This packs the color into a single float. + MultiMesh color uses a float per channel. + MultiMesh does not use custom data. + MultiMesh custom data uses 8 bits per component. This packs the 4-component custom data into a single float. + MultiMesh custom data uses a float per component. -- cgit v1.2.3