From 1905fdfbcaeefffc4991fd12eced6513565a1155 Mon Sep 17 00:00:00 2001 From: clayjohn Date: Sun, 5 Jan 2020 15:36:50 -0800 Subject: [PATCH] Finish documenting VisualServer --- doc/classes/MultiMesh.xml | 5 +- doc/classes/VisualServer.xml | 116 ++++++++++++++++++++++++++++++++++- 2 files changed, 118 insertions(+), 3 deletions(-) diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 8a72aa155bb..ec65f407cd4 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -11,6 +11,7 @@ http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html + http://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html @@ -87,7 +88,7 @@ - Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers. + Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the [enum CustomDataFormat] used. @@ -153,7 +154,7 @@ Use when you are not using per-instance custom data. - Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision. + Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision and range. Floats packed into 8 bits can only represent values between 0 and 1, numbers outside that range will be clamped. The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision. diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 3165f348ab8..0ead7f5a8a6 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -6,8 +6,16 @@ Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. + The visual server can be used to bypass the scene system entirely. + Resources are created using the [code]*_create[/code] functions. + All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas]. + In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any [Spatial] node with [method Spatial.get_world]. Otherwise, a scenario can be created with [method scenario_create]. + Similarly in 2D, a canvas is needed to draw all canvas items. + In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. + In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. + http://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html @@ -556,7 +564,7 @@ - Sets the parent for the [CanvasItem]. + Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport. @@ -2242,6 +2250,7 @@ + Returns the size of the lightmap capture area. @@ -2250,6 +2259,7 @@ + Returns the energy multiplier used by the lightmap capture. @@ -2258,6 +2268,7 @@ + Returns the octree used by the lightmap capture. @@ -2266,6 +2277,7 @@ + Returns the cell subdivision amount used by this lightmap capture's octree. @@ -2274,6 +2286,7 @@ + Returns the cell transform for this lightmap capture's octree. @@ -2284,6 +2297,7 @@ + Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds]. @@ -2294,6 +2308,7 @@ + Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy]. @@ -2304,6 +2319,7 @@ + Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree]. @@ -2314,6 +2330,7 @@ + Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv]. @@ -2324,6 +2341,7 @@ + Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform]. @@ -3191,6 +3209,7 @@ + If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. @@ -3201,6 +3220,7 @@ + Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. @@ -3211,6 +3231,7 @@ + If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. @@ -3221,6 +3242,7 @@ + If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. @@ -3231,6 +3253,7 @@ + Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. @@ -3241,6 +3264,7 @@ + Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. @@ -3251,6 +3275,7 @@ + Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. @@ -3261,6 +3286,7 @@ + Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. @@ -3271,6 +3297,7 @@ + Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. @@ -3281,6 +3308,7 @@ + Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]. @@ -3291,6 +3319,7 @@ + Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. @@ -3301,6 +3330,7 @@ + Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options. @@ -3476,6 +3506,7 @@ + Allocates the GPU buffers for this skeleton. @@ -3486,6 +3517,7 @@ + Returns the [Transform] set for a specific bone of this skeleton. @@ -3496,6 +3528,7 @@ + Returns the [Transform2D] set for a specific bone of this skeleton. @@ -3508,6 +3541,7 @@ + Sets the [Transform] for a specific bone of this skeleton. @@ -3520,6 +3554,7 @@ + Sets the [Transform2D] for a specific bone of this skeleton. @@ -3536,6 +3571,7 @@ + Returns the number of bones allocated for this skeleton. @@ -4184,6 +4220,7 @@ Marks an error that shows that the index array is empty. + Number of weights/bones per vertex. The minimum Z-layer for canvas items. @@ -4192,8 +4229,10 @@ The maximum Z-layer for canvas items. + Max number of glow levels that can be used with glow post-process effect. + Unused enum in Godot 3.x. The minimum renderpriority of all materials. @@ -4220,12 +4259,16 @@ Marks the back side of a cubemap. + Normal texture with 2 dimensions, width and height. + Texture made up of six faces, can be looked up with a [code]vec3[/code] in shader. + An array of 2-dimensional textures. + A 3-dimensional texture with width, height, and depth. Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. @@ -4340,11 +4383,13 @@ Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. + Flag used to mark a compressed bone array. Flag used to mark a compressed (half float) weight array. + Flag used to mark a compressed index array. Flag used to mark that the array contains 2D vertices. @@ -4380,8 +4425,10 @@ Represents the size of the [enum PrimitiveType] enum. + Blend shapes are normalized. + Blend shapes are relative to base weight. Is a directional (sun) light. @@ -4414,47 +4461,67 @@ Scales the shadow color. + Max distance that shadows will be rendered. + Proportion of shadow atlas occupied by the first split. + Proportion of shadow atlas occupied by the second split. + Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. + Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. + Bias the shadow lookup to fix self-shadowing artifacts. + Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. Represents the size of the [enum LightParam] enum. + Use a dual paraboloid shadow map for omni lights. + Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. + Use more detail vertically when computing shadow map. + Use more detail horizontally when computing shadow map. + Use orthogonal shadow projection for directional light. + Use 2 splits for shadow projection when using directional light. + Use 4 splits for shadow projection when using directional light. + Keeps shadows stable as camera moves but has lower effective resolution. + Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. + Do not update the viewport. + Update the viewport once then set to disabled. + Update the viewport whenever it is visible. + Always update the viewport. The viewport is always cleared before drawing. @@ -4499,16 +4566,22 @@ The Viewport renders 3D but without effects. + Number of objects drawn in a single frame. + Number of vertices drawn in a single frame. + Number of material changes during this frame. + Number of shader changes during this frame. + Number of surface changes during this frame. + Number of draw calls during this frame. Represents the size of the [enum ViewportRenderInfo] enum. @@ -4526,12 +4599,16 @@ Debug draw draws objects in wireframe. + Do not use a debug mode. + Draw all objects as wireframe models. + Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw. + Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code]. The instance does not have a type. @@ -4609,16 +4686,22 @@ The light adds color depending on mask. + Do not apply a filter to canvas light shadows. + Use PCF3 filtering to filter canvas light shadows. + Use PCF5 filtering to filter canvas light shadows. + Use PCF7 filtering to filter canvas light shadows. + Use PCF9 filtering to filter canvas light shadows. + Use PCF13 filtering to filter canvas light shadows. Culling of the canvas occluder is disabled. @@ -4660,8 +4743,10 @@ The amount of vertex memory used. + Hardware supports shaders. This enum is currently unused in Godot 3.x. + Hardware supports multithreading. This enum is currently unused in Godot 3.x. Use [Transform2D] to store MultiMesh transform. @@ -4688,65 +4773,94 @@ MultiMesh custom data uses a float per component. + Reflection probe will update reflections once and then stop. + Reflection probe will update each frame. This mode is necessary to capture moving objects. + Draw particles in the order that they appear in the particles array. + Sort particles based on their lifetime. + Sort particles based on their distance to the camera. + Use the clear color as background. + Use a specified color as the background. + Use a sky resource for the background. + Use a custom color for background, but use a sky for shading and reflections. + Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. + Do not clear the background, use whatever was rendered last frame as the background. Represents the size of the [enum EnvironmentBG] enum. + Use lowest blur quality. Fastest, but may look bad. + Use medium blur quality. + Used highest blur quality. Looks the best, but is the slowest. + Add the effect of the glow on top of the scene. + Blends the glow effect with the screen. Does not get as bright as additive. + Produces a subtle color disturbance around objects. + Shows the glow effect by itself without the underlying scene. + Output color as they came in. + Use the Reinhard tonemapper. + Use the filmic tonemapper. + Use the ACES tonemapper. + Lowest quality of screen space ambient occlusion. + Medium quality screen space ambient occlusion. + Highest quality screen space ambient occlusion. + Disables the blur set for SSAO. Will make SSAO look noisier. + Perform a 1x1 blur on the SSAO output. + Performs a 2x2 blur on the SSAO output. + Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO.