SpatialMaterial Properties |
The SpatialMaterial type exposes the following members.
Name | Description | |
---|---|---|
AlbedoColor | The material's base color. | |
AlbedoTexture | Texture to multiply by AlbedoColor. Used for basic texturing of objects. | |
Anisotropy | The strength of the anisotropy effect. | |
AnisotropyEnabled | If true, anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Mesh tangents are needed for this to work. If the mesh does not contain tangents the anisotropy effect will appear broken. | |
AnisotropyFlowmap | Texture that offsets the tangent map for anisotropy calculations. | |
AoEnabled | If true, ambient occlusion is enabled. Ambient occlusion darkens areas based on the AoTexture. | |
AoLightAffect | Amount that ambient occlusion affects lighting from lights. If 0, ambient occlusion only affects ambient light. If 1, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic. | |
AoOnUv2 | If true, use UV2 coordinates to look up from the AoTexture. | |
AoTexture | Texture that defines the amount of ambient occlusion for a given point on the object. | |
AoTextureChannel | Specifies the channel of the AoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. | |
Clearcoat | Sets the strength of the clearcoat effect. Setting to 0 looks the same as disabling the clearcoat effect. | |
ClearcoatEnabled | If true, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough. | |
ClearcoatGloss | Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat. | |
ClearcoatTexture | Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel. | |
DepthDeepParallax | If true, the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping. | |
DepthEnabled | If true, depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also NormalEnabled. Note: Depth mapping is not supported if triplanar mapping is used on the same material. The value of DepthEnabled will be ignored if Uv1Triplanar is enabled. | |
DepthFlipBinormal | If true, direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect. | |
DepthFlipTangent | If true, direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect. | |
DepthMaxLayers | Number of layers to use when using DepthDeepParallax and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp. | |
DepthMinLayers | Number of layers to use when using DepthDeepParallax and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp. | |
DepthScale | Scales the depth offset effect. A higher number will create a larger depth. | |
DepthTexture | Texture used to determine depth at a given pixel. Depth is always stored in the red channel. | |
DetailAlbedo | Texture that specifies the color of the detail overlay. | |
DetailBlendMode | Specifies how the DetailAlbedo should blend with the current ALBEDO. See SpatialMaterialBlendMode for options. | |
DetailEnabled | If true, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on DetailMask. This can be used to add variation to objects, or to blend between two different albedo/normal textures. | |
DetailMask | Texture used to specify how the detail textures get blended with the base textures. | |
DetailNormal | Texture that specifies the per-pixel normal of the detail overlay. Note: Godot expects the normal map to use X+, Y-, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines. | |
DetailUvLayer | Specifies whether to use UV or UV2 for the detail layer. See SpatialMaterialDetailUV for options. | |
DistanceFadeMaxDistance | Distance at which the object appears fully opaque. Note: If distance_fade_max_distance is less than distance_fade_min_distance, the behavior will be reversed. The object will start to fade away at distance_fade_max_distance and will fully disappear once it reaches distance_fade_min_distance. | |
DistanceFadeMinDistance | Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible. Note: If distance_fade_min_distance is greater than distance_fade_max_distance, the behavior will be reversed. The object will start to fade away at distance_fade_max_distance and will fully disappear once it reaches distance_fade_min_distance. | |
DistanceFadeMode | Specifies which type of fade to use. Can be any of the SpatialMaterialDistanceFadeModeEnums. | |
DynamicObject |
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.) | |
Emission | The emitted light's color. See EmissionEnabled. | |
EmissionEnabled | If true, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a GIProbe or BakedLightmap is used and this object is used in baked lighting. | |
EmissionEnergy | The emitted light's strength. See EmissionEnabled. | |
EmissionOnUv2 | Use UV2 to read from the EmissionTexture. | |
EmissionOperator | Sets how Emission interacts with EmissionTexture. Can either add or multiply. See SpatialMaterialEmissionOperatorEnum for options. | |
EmissionTexture | Texture that specifies how much surface emits light at a given point. | |
FlagsAlbedoTexForceSrgb | Forces a conversion of the AlbedoTexture from sRGB space to linear space. | |
FlagsDisableAmbientLight | If true, the object receives no ambient light. | |
FlagsDoNotReceiveShadows | If true, the object receives no shadow that would otherwise be cast onto it. | |
FlagsEnsureCorrectNormals | If true, the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling. | |
FlagsFixedSize | If true, the object is rendered at the same size regardless of distance. | |
FlagsNoDepthTest | If true, depth testing is disabled and the object will be drawn in render order. | |
FlagsTransparent | If true, transparency is enabled on the body. See also ParamsBlendMode. | |
FlagsUnshaded | If true, the object is unaffected by lighting. | |
FlagsUsePointSize | If true, render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also ParamsPointSize. | |
FlagsUseShadowToOpacity | If true, enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR. | |
FlagsVertexLighting | If true, lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. | |
FlagsWorldTriplanar | If true, triplanar mapping is calculated in world space rather than object local space. See also Uv1Triplanar. | |
Metallic | A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between 0 and 1 should only be used for blending between metal and non-metal sections. To alter the amount of reflection use Roughness. | |
MetallicSpecular | ||
MetallicTexture | Texture used to specify metallic for an object. This is multiplied by Metallic. | |
MetallicTextureChannel | Specifies the channel of the MetallicTexture in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. | |
NativeInstance | (Inherited from Object.) | |
NextPass | Sets the Material to be used for the next pass. This renders the object again using a different material. Note: only applies to SpatialMaterials and ShaderMaterials with type "Spatial". | |
NormalEnabled | If true, normal mapping is enabled. | |
NormalScale | The strength of the normal map's effect. | |
NormalTexture | Texture used to specify the normal at a given pixel. The normal_texture only uses the red and green channels. The normal read from normal_texture is oriented around the surface normal provided by the Mesh. Note: Godot expects the normal map to use X+, Y-, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines. | |
ParamsAlphaScissorThreshold | Threshold at which the alpha scissor will discard values. | |
ParamsBillboardKeepScale | If true, the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when ParamsBillboardMode is . | |
ParamsBillboardMode | Controls how the object faces the camera. See SpatialMaterialBillboardMode. Note: Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See GitHub issue #41567 for details. | |
ParamsBlendMode | The material's blend mode. Note: Values other than Mix force the object into the transparent pipeline. See SpatialMaterialBlendMode. | |
ParamsCullMode | Which side of the object is not drawn when backfaces are rendered. See SpatialMaterialCullMode. | |
ParamsDepthDrawMode | Determines when depth rendering takes place. See SpatialMaterialDepthDrawMode. See also FlagsTransparent. | |
ParamsDiffuseMode | The algorithm used for diffuse light scattering. See SpatialMaterialDiffuseMode. | |
ParamsGrow | If true, enables the vertex grow setting. See ParamsGrowAmount. | |
ParamsGrowAmount | Grows object vertices in the direction of their normals. | |
ParamsLineWidth | Currently unimplemented in Godot. | |
ParamsPointSize | The point size in pixels. See FlagsUsePointSize. | |
ParamsSpecularMode | The method for rendering the specular blob. See SpatialMaterialSpecularMode. | |
ParamsUseAlphaScissor | If true, the shader will discard all pixels that have an alpha value less than ParamsAlphaScissorThreshold. | |
ParticlesAnimHFrames | The number of horizontal frames in the particle sprite sheet. Only enabled when using . See ParamsBillboardMode. | |
ParticlesAnimLoop | If true, particle animations are looped. Only enabled when using . See ParamsBillboardMode. | |
ParticlesAnimVFrames | The number of vertical frames in the particle sprite sheet. Only enabled when using . See ParamsBillboardMode. | |
ProximityFadeDistance | Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade. | |
ProximityFadeEnable | If true, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object. | |
RefractionEnabled | If true, the refraction effect is enabled. Distorts transparency based on light from behind the object. | |
RefractionScale | The strength of the refraction effect. | |
RefractionTexture | Texture that controls the strength of the refraction per-pixel. Multiplied by RefractionScale. | |
RefractionTextureChannel | Specifies the channel of the AoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. | |
RenderPriority | Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. Note: this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). | |
ResourceLocalToScene | If true, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene. | |
ResourceName | The name of the resource. This is an optional identifier. If ResourceName is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the ResourceName will be displayed as the tab name in the script editor. | |
ResourcePath | The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index. | |
Rim | Sets the strength of the rim lighting effect. | |
RimEnabled | If true, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. | |
RimTexture | Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by Rim. | |
RimTint | The amount of to blend light and albedo color when rendering rim effect. If 0 the light color is used, while 1 means albedo color is used. An intermediate value generally works best. | |
Roughness | Surface reflection. A value of 0 represents a perfect mirror while a value of 1 completely blurs the reflection. See also Metallic. | |
RoughnessTexture | Texture used to control the roughness per-pixel. Multiplied by Roughness. | |
RoughnessTextureChannel | Specifies the channel of the AoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use. | |
SubsurfScatterEnabled | If true, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. | |
SubsurfScatterStrength | The strength of the subsurface scattering effect. | |
SubsurfScatterTexture | Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by SubsurfScatterStrength. | |
Transmission | The color used by the transmission effect. Represents the light passing through an object. | |
TransmissionEnabled | If true, the transmission effect is enabled. | |
TransmissionTexture | Texture used to control the transmission effect per-pixel. Added to Transmission. | |
Uv1Offset | How much to offset the UV coordinates. This amount will be added to UV in the vertex function. This can be used to offset a texture. | |
Uv1Scale | How much to scale the UV coordinates. This is multiplied by UV in the vertex function. | |
Uv1Triplanar | If true, instead of using UV textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. | |
Uv1TriplanarSharpness | A lower number blends the texture more softly while a higher number blends the texture more sharply. | |
Uv2Offset | How much to offset the UV2 coordinates. This amount will be added to UV2 in the vertex function. This can be used to offset a texture. | |
Uv2Scale | How much to scale the UV2 coordinates. This is multiplied by UV2 in the vertex function. | |
Uv2Triplanar | If true, instead of using UV2 textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing. | |
Uv2TriplanarSharpness | A lower number blends the texture more softly while a higher number blends the texture more sharply. | |
VertexColorIsSrgb | If true, the model's vertex colors are processed as sRGB mode. | |
VertexColorUseAsAlbedo | If true, the vertex color is used as albedo color. |