reckfellENGINE

BaseMaterial3D

Abstract base class for defining the 3D rendering properties of meshes.

On this page
class BaseMaterial3DReckfellSharpInherits Material

Abstract base class for defining the 3D rendering properties of meshes.

This class serves as a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties132

AOEnabledProperty
# AOEnabled
C#
public bool AOEnabled { get; set; }

If true, ambient occlusion is enabled. Ambient occlusion darkens areas based on the BaseMaterial3D.AOTexture.

AOLightAffectProperty
# AOLightAffect
C#
public float AOLightAffect { get; set; }

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.

AOOnUV2Property
# AOOnUV2
C#
public bool AOOnUV2 { get; set; }

If true, use UV2 coordinates to look up from the BaseMaterial3D.AOTexture.

AOTextureProperty
# AOTexture
C#
public Texture2D AOTexture { get; set; }

Texture that defines the amount of ambient occlusion for a given point on the object.

AOTextureChannelProperty
# AOTextureChannel
C#
public BaseMaterial3D.TextureChannel AOTextureChannel { get; set; }

Specifies the channel of the BaseMaterial3D.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.

AlbedoColorProperty
# AlbedoColor
C#
public Color AlbedoColor { get; set; }

Base color multiplied by the albedo texture when assigned. Alpha alone does not enable transparency: Transparency=Disabled remains opaque even at A=0. Final lit-material color also depends on lighting and Environment.

AlbedoTextureProperty
# AlbedoTexture
C#
public Texture2D AlbedoTexture { get; set; }

Texture to multiply by BaseMaterial3D.AlbedoColor. Used for basic texturing of objects. If the texture appears unexpectedly too dark or too bright, check BaseMaterial3D.AlbedoTextureForceSrgb.

AlbedoTextureForceSrgbProperty
# AlbedoTextureForceSrgb
C#
public bool AlbedoTextureForceSrgb { get; set; }

If true, forces a conversion of the BaseMaterial3D.AlbedoTexture from nonlinear sRGB encoding to linear encoding. See also BaseMaterial3D.VertexColorIsSrgb. This should only be enabled when needed (typically when using a ViewportTexture as BaseMaterial3D.AlbedoTexture). If BaseMaterial3D.AlbedoTextureForceSrgb is true when it shouldn't be, the texture will appear to be too dark. If BaseMaterial3D.AlbedoTextureForceSrgb is false when it shouldn't be, the texture will appear to be too bright.

AlbedoTextureMsdfProperty
# AlbedoTextureMsdf
C#
public bool AlbedoTextureMsdf { get; set; }

Enables multichannel signed distance field rendering shader. Use BaseMaterial3D.MsdfPixelRange and BaseMaterial3D.MsdfOutlineSize to configure MSDF parameters.

AlphaAntialiasingEdgeProperty
# AlphaAntialiasingEdge
C#
public float AlphaAntialiasingEdge { get; set; }

Threshold at which antialiasing will be applied on the alpha channel.

AlphaAntialiasingModeProperty
# AlphaAntialiasingMode
C#
public BaseMaterial3D.AlphaAntiAliasing AlphaAntialiasingMode { get; set; }

The type of alpha antialiasing to apply.

AlphaHashScaleProperty
# AlphaHashScale
C#
public float AlphaHashScale { get; set; }

The hashing scale for Alpha Hash. Recommended values between 0 and 2.

AlphaScissorThresholdProperty
# AlphaScissorThreshold
C#
public float AlphaScissorThreshold { get; set; }

Cutout threshold for Transparency=AlphaScissor. At threshold 0.5, alpha 0.2 is discarded and 0.8 retained. This is a hard cutout, not smooth translucent blending.

AnisotropyProperty
# Anisotropy
C#
public float Anisotropy { get; set; }

The strength of the anisotropy effect. This is multiplied by BaseMaterial3D.AnisotropyFlowmap's alpha channel if a texture is defined there and the texture contains an alpha channel.

AnisotropyEnabledProperty
# AnisotropyEnabled
C#
public bool AnisotropyEnabled { get; set; }

If true, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminum and hair reflections. Note: Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken. Note: Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting BaseMaterial3D.TextureFilter to BaseMaterial3D.TextureFilterEnum.LinearWithMipmapsAnisotropic.

AnisotropyFlowmapProperty
# AnisotropyFlowmap
C#
public Texture2D AnisotropyFlowmap { get; set; }

Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion. If present, the texture's alpha channel will be used to multiply the strength of the BaseMaterial3D.Anisotropy effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored.

BacklightProperty
# Backlight
C#
public Color Backlight { get; set; }

The color used by the backlight effect. Represents the light passing through an object.

BacklightEnabledProperty
# BacklightEnabled
C#
public bool BacklightEnabled { get; set; }

If true, the backlight effect is enabled. See also BaseMaterial3D.SubsurfScatterTransmittanceEnabled.

BacklightTextureProperty
# BacklightTexture
C#
public Texture2D BacklightTexture { get; set; }

Texture used to control the backlight effect per-pixel. Added to BaseMaterial3D.Backlight.

BentNormalEnabledProperty
# BentNormalEnabled
C#
public bool BentNormalEnabled { get; set; }

If true, the bent normal map is enabled. This allows for more accurate indirect lighting and specular occlusion.

BentNormalTextureProperty
# BentNormalTexture
C#
public Texture2D BentNormalTexture { get; set; }

Texture that specifies the average direction of incoming ambient light at a given pixel. The BaseMaterial3D.BentNormalTexture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from BaseMaterial3D.BentNormalTexture is oriented around the surface normal provided by the Mesh. Note: A bent normal map is different from a regular normal map. When baking a bent normal map make sure to use a cosine distribution for the bent normal map to work correctly. Note: The mesh must have both normals and tangents defined in its vertex data. Otherwise, the shading produced by the bent normal map will not look correct. If creating geometry with SurfaceTool, you can use SurfaceTool.GenerateNormals and SurfaceTool.GenerateTangents to automatically generate normals and tangents respectively. Note: Reckfell expects the bent normal map to use X+, Y+, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines.

BillboardKeepScaleProperty
# BillboardKeepScale
C#
public bool BillboardKeepScale { get; set; }

If true, the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. Only applies when BaseMaterial3D.BillboardMode is not BaseMaterial3D.BillboardModeEnum.Disabled.

BillboardModeProperty
# BillboardMode
C#
public BaseMaterial3D.BillboardModeEnum BillboardMode { get; set; }

Controls how the object faces the camera.

Billboard orientation can be unsuitable for VR when the camera rolls: its left-right axis need not remain horizontal. Check the intended stereo and head-rotation behavior for the application.

BlendModeProperty
# BlendMode
C#
public BaseMaterial3D.BlendModeEnum BlendMode { get; set; }

The material's blend mode. Note: Values other than Mix force the object into the transparent pipeline.

ClearcoatProperty
# Clearcoat
C#
public float Clearcoat { get; set; }

Sets the strength of the clearcoat effect. Setting to 0 looks the same as disabling the clearcoat effect.

ClearcoatEnabledProperty
# ClearcoatEnabled
C#
public bool ClearcoatEnabled { get; set; }

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. Note: Clearcoat rendering is not visible if the material's BaseMaterial3D.ShadingMode is BaseMaterial3D.ShadingModeEnum.Unshaded.

ClearcoatRoughnessProperty
# ClearcoatRoughness
C#
public float ClearcoatRoughness { get; set; }

Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother clearcoat.

ClearcoatTextureProperty
# ClearcoatTexture
C#
public Texture2D ClearcoatTexture { get; set; }

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.

CullModeProperty
# CullMode
C#
public BaseMaterial3D.CullModeEnum CullMode { get; set; }

Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera.

DepthDrawModeProperty
# DepthDrawMode
C#
public BaseMaterial3D.DepthDrawModeEnum DepthDrawMode { get; set; }

Determines when depth rendering takes place. See also BaseMaterial3D.Transparency.

DepthTestProperty
# DepthTest
C#
public BaseMaterial3D.DepthTestEnum DepthTest { get; set; }

Determines which comparison operator is used when testing depth. Note: Changing BaseMaterial3D.DepthTest to a non-default value only has a visible effect when used on a transparent material, or a material that has BaseMaterial3D.DepthDrawMode set to BaseMaterial3D.DepthDrawModeEnum.Disabled.

DetailAlbedoProperty
# DetailAlbedo
C#
public Texture2D DetailAlbedo { get; set; }

Texture that specifies the color of the detail overlay. BaseMaterial3D.DetailAlbedo's alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see BaseMaterial3D.DetailMask. Note: BaseMaterial3D.DetailAlbedo is not modulated by BaseMaterial3D.AlbedoColor.

DetailBlendModeProperty
# DetailBlendMode
C#
public BaseMaterial3D.BlendModeEnum DetailBlendMode { get; set; }

Specifies how the BaseMaterial3D.DetailAlbedo should blend with the current ALBEDO.

DetailEnabledProperty
# DetailEnabled
C#
public bool DetailEnabled { get; set; }

If true, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on BaseMaterial3D.DetailMask and BaseMaterial3D.DetailAlbedo's alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures.

DetailMaskProperty
# DetailMask
C#
public Texture2D DetailMask { get; set; }

Texture used to specify how the detail textures get blended with the base textures. BaseMaterial3D.DetailMask can be used together with BaseMaterial3D.DetailAlbedo's alpha channel (if any).

DetailNormalProperty
# DetailNormal
C#
public Texture2D DetailNormal { get; set; }

Texture that specifies the per-pixel normal of the detail overlay. The BaseMaterial3D.DetailNormal texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from BaseMaterial3D.DetailNormal is oriented around the surface normal provided by the Mesh. Note: Reckfell 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.

DetailUVLayerProperty
# DetailUVLayer
C#
public BaseMaterial3D.DetailUV DetailUVLayer { get; set; }

Specifies whether to use UV or UV2 for the detail layer.

DiffuseModeProperty
# DiffuseMode
C#
public BaseMaterial3D.DiffuseModeEnum DiffuseMode { get; set; }

The algorithm used for diffuse light scattering.

DisableAmbientLightProperty
# DisableAmbientLight
C#
public bool DisableAmbientLight { get; set; }

If true, the object receives no ambient light.

DisableFogProperty
# DisableFog
C#
public bool DisableFog { get; set; }

If true, the object will not be affected by fog (neither volumetric nor depth fog). This is useful for unshaded or transparent materials (e.g. particles), which without this setting will be affected even if fully transparent.

DisableReceiveShadowsProperty
# DisableReceiveShadows
C#
public bool DisableReceiveShadows { get; set; }

If true, the object receives no shadow that would otherwise be cast onto it.

DisableSpecularOcclusionProperty
# DisableSpecularOcclusion
C#
public bool DisableSpecularOcclusion { get; set; }

If true, disables approximate indirect-specular occlusion for this material. Defaults to false, following rendering/reflections/specular_occlusion/enabled. If the global setting is already off, this property does not re-enable occlusion. In current Forward+ and Mobile, the branch without a bent-normal map uses ambient luminance: zero ambient can suppress even a valid reflection. Useful for isolated reflection checks without ambient; does not disable direct shadows or diffuse AO, or create lighting.

DistanceFadeMaxDistanceProperty
# DistanceFadeMaxDistance
C#
public float DistanceFadeMaxDistance { get; set; }

Distance at which the object appears fully opaque. Note: If BaseMaterial3D.DistanceFadeMaxDistance is less than BaseMaterial3D.DistanceFadeMinDistance, the behavior will be reversed. The object will start to fade away at BaseMaterial3D.DistanceFadeMaxDistance and will fully disappear once it reaches BaseMaterial3D.DistanceFadeMinDistance.

DistanceFadeMinDistanceProperty
# DistanceFadeMinDistance
C#
public float DistanceFadeMinDistance { get; set; }

Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible. Note: If BaseMaterial3D.DistanceFadeMinDistance is greater than BaseMaterial3D.DistanceFadeMaxDistance, the behavior will be reversed. The object will start to fade away at BaseMaterial3D.DistanceFadeMaxDistance and will fully disappear once it reaches BaseMaterial3D.DistanceFadeMinDistance.

DistanceFadeModeProperty
# DistanceFadeMode
C#
public BaseMaterial3D.DistanceFadeModeEnum DistanceFadeMode { get; set; }

Specifies which type of fade to use. Can be any of the BaseMaterial3D.DistanceFadeModeEnums.

EmissionProperty
# Emission
C#
public Color Emission { get; set; }

The emitted light's color. See BaseMaterial3D.EmissionEnabled.

EmissionEnabledProperty
# EmissionEnabled
C#
public bool EmissionEnabled { get; set; }

Enables Emission contribution to material brightness. Not a separate Light3D; nearby objects do not automatically receive direct illumination. Glow adds a halo through Environment processing, while indirect illumination requires a separate solution.

EmissionEnergyMultiplierProperty
# EmissionEnergyMultiplier
C#
public float EmissionEnergyMultiplier { get; set; }

Emission multiplier when EmissionEnabled. The example uses 8 for a bright glow source; this is an artistic test setting, not universal exposure or lighting energy for nearby objects.

EmissionIntensityProperty
# EmissionIntensity
C#
public float EmissionIntensity { get; set; }

Luminance of emitted light, measured in nits (candela per square meter). Only available when ProjectSettings.rendering/lights_and_shadows/use_physical_light_units is enabled. The default is roughly equivalent to an indoor lightbulb.

EmissionOnUV2Property
# EmissionOnUV2
C#
public bool EmissionOnUV2 { get; set; }

Use UV2 to read from the BaseMaterial3D.EmissionTexture.

EmissionOperatorProperty
# EmissionOperator
C#
public BaseMaterial3D.EmissionOperatorEnum EmissionOperator { get; set; }

Sets how BaseMaterial3D.Emission interacts with BaseMaterial3D.EmissionTexture. Can either add or multiply.

EmissionTextureProperty
# EmissionTexture
C#
public Texture2D EmissionTexture { get; set; }

Texture that specifies how much surface emits light at a given point.

FixedSizeProperty
# FixedSize
C#
public bool FixedSize { get; set; }

If true, the object is rendered at the same size regardless of distance. The object's size on screen is the same as if the camera was 1.0 units away from the object's origin, regardless of the actual distance from the camera. The Camera3D's field of view (or Camera3D.Size when in orthogonal/frustum mode) still affects the size the object is drawn at.

FovOverrideProperty
# FovOverride
C#
public float FovOverride { get; set; }

Overrides the Camera3D's field of view angle (in degrees). Note: This behaves as if the field of view is set on a Camera3D with Camera3D.KeepAspect set to Camera3D.KeepAspectEnum.Height. Additionally, it may not look correct on a non-perspective camera where the field of view setting is ignored.

GrowProperty
# Grow
C#
public bool Grow { get; set; }

If true, enables the vertex grow setting. This can be used to create mesh-based outlines using a second material pass and its BaseMaterial3D.CullMode set to BaseMaterial3D.CullModeEnum.Front. See also BaseMaterial3D.GrowAmount. Note: Vertex growth cannot create new vertices, which means that visible gaps may occur in sharp corners. This can be alleviated by designing the mesh to use smooth normals exclusively using face weighted normals in the 3D authoring software. In this case, grow will be able to join every outline together, just like in the original mesh.

GrowAmountProperty
# GrowAmount
C#
public float GrowAmount { get; set; }

Grows object vertices in the direction of their normals. Only effective if BaseMaterial3D.Grow is true.

HeightmapDeepParallaxProperty
# HeightmapDeepParallax
C#
public bool HeightmapDeepParallax { get; set; }

If true, uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see BaseMaterial3D.HeightmapEnabled). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference.

HeightmapEnabledProperty
# HeightmapEnabled
C#
public bool HeightmapEnabled { get; set; }

If true, height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also BaseMaterial3D.NormalEnabled. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference. Note: Height mapping is not supported if triplanar mapping is used on the same material. The value of BaseMaterial3D.HeightmapEnabled will be ignored if BaseMaterial3D.Uv1Triplanar is enabled.

HeightmapFlipBinormalProperty
# HeightmapFlipBinormal
C#
public bool HeightmapFlipBinormal { get; set; }

If true, flips the mesh's binormal vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable BaseMaterial3D.HeightmapScale), try setting this to true.

HeightmapFlipTangentProperty
# HeightmapFlipTangent
C#
public bool HeightmapFlipTangent { get; set; }

If true, flips the mesh's tangent vectors when interpreting the height map. If the heightmap effect looks strange when the camera moves (even with a reasonable BaseMaterial3D.HeightmapScale), try setting this to true.

HeightmapFlipTextureProperty
# HeightmapFlipTexture
C#
public bool HeightmapFlipTexture { get; set; }

If true, interprets the height map texture as a depth map, with brighter values appearing to be "lower" in altitude compared to darker values. This can be enabled for compatibility with some materials authored for Reckfell.x. This is not necessary if the Invert import option was used to invert the depth map in Reckfell.x, in which case BaseMaterial3D.HeightmapFlipTexture should remain false.

HeightmapMaxLayersProperty
# HeightmapMaxLayers
C#
public int HeightmapMaxLayers { get; set; }

The number of layers to use for parallax occlusion mapping when the camera is up close to the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. Note: Only effective if BaseMaterial3D.HeightmapDeepParallax is true.

HeightmapMinLayersProperty
# HeightmapMinLayers
C#
public int HeightmapMinLayers { get; set; }

The number of layers to use for parallax occlusion mapping when the camera is far away from the material. Higher values result in a more convincing depth effect, especially in materials that have steep height changes. Higher values have a significant cost on the GPU, so it should only be increased on materials where it makes a significant visual difference. Note: Only effective if BaseMaterial3D.HeightmapDeepParallax is true.

HeightmapScaleProperty
# HeightmapScale
C#
public float HeightmapScale { get; set; }

The heightmap scale to use for the parallax effect (see BaseMaterial3D.HeightmapEnabled). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using BaseMaterial3D.HeightmapFlipTexture as the material will also appear to be "closer" to the camera. In most cases, BaseMaterial3D.HeightmapScale should be kept to a positive value. Note: If the height map effect looks strange regardless of this value, try adjusting BaseMaterial3D.HeightmapFlipBinormal and BaseMaterial3D.HeightmapFlipTangent. See also BaseMaterial3D.HeightmapTexture for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how BaseMaterial3D.HeightmapScale behaves.

HeightmapTextureProperty
# HeightmapTexture
C#
public Texture2D HeightmapTexture { get; set; }

The texture to use as a height map. See also BaseMaterial3D.HeightmapEnabled. For best results, the texture should be normalized (with BaseMaterial3D.HeightmapScale reduced to compensate). In GIMP(https://gimp.org), this can be done using Colors > Auto > Equalize. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves. Note: To reduce memory usage and improve loading times, you may be able to use a lower-resolution heightmap texture as most heightmaps are only comprised of low-frequency data.

MetallicProperty
# Metallic
C#
public float Metallic { get; set; }

Surface metallic response, typically 0 for a dielectric and 1 for a metal. Does not supply environment reflections. A metal without suitable light/reflection sources can appear dark; arbitrary albedo amplification is not a substitute.

MetallicSpecularProperty
# MetallicSpecular
C#
public float MetallicSpecular { get; set; }

Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to 0.0, no specular reflections will be visible. This differs from the BaseMaterial3D.SpecularModeEnum.Disabled BaseMaterial3D.SpecularModeEnum as BaseMaterial3D.SpecularModeEnum.Disabled only applies to the specular lobe from the light source. Note: Unlike BaseMaterial3D.Metallic, this is not energy-conserving, so it should be left at 0.5 in most cases. See also BaseMaterial3D.Roughness.

MetallicTextureProperty
# MetallicTexture
C#
public Texture2D MetallicTexture { get; set; }

Texture used to specify metallic for an object. This is multiplied by BaseMaterial3D.Metallic.

MetallicTextureChannelProperty
# MetallicTextureChannel
C#
public BaseMaterial3D.TextureChannel MetallicTextureChannel { get; set; }

Specifies the channel of the BaseMaterial3D.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.

MsdfOutlineSizeProperty
# MsdfOutlineSize
C#
public float MsdfOutlineSize { get; set; }

The width of the shape outline.

MsdfPixelRangeProperty
# MsdfPixelRange
C#
public float MsdfPixelRange { get; set; }

The width of the range around the shape between the minimum and maximum representable signed distance.

NoDepthTestProperty
# NoDepthTest
C#
public bool NoDepthTest { get; set; }

If true, depth testing is disabled and the object will be drawn in render order.

NormalEnabledProperty
# NormalEnabled
C#
public bool NormalEnabled { get; set; }

If true, normal mapping is enabled. This has a slight performance cost, especially on mobile GPUs.

NormalScaleProperty
# NormalScale
C#
public float NormalScale { get; set; }

The strength of the normal map's effect.

NormalTextureProperty
# NormalTexture
C#
public Texture2D NormalTexture { get; set; }

Surface normal texture; enable NormalEnabled. Changes shading normals, not the silhouette or physics shape. Check import, channel conventions and mesh tangents separately; normal-map import is outside the runnable example.

OrmTextureProperty
# OrmTexture
C#
public Texture2D OrmTexture { get; set; }

The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of BaseMaterial3D.AOTexture, BaseMaterial3D.RoughnessTexture and BaseMaterial3D.MetallicTexture in OrmMaterial3D. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored.

ParticlesAnimEnabledProperty
# ParticlesAnimEnabled
C#
public bool ParticlesAnimEnabled { get; set; }

If true, enables particles_anim_* properties. The ParticleProcessMaterial.AnimSpeedMin or CpuParticles3D.AnimSpeedMin should also be set to a value bigger than zero for the animation to play. Note: For compatibility reasons, this property is ignored and always enabled when BaseMaterial3D.BillboardMode is set to BaseMaterial3D.BillboardModeEnum.Particles.

ParticlesAnimHFramesProperty
# ParticlesAnimHFrames
C#
public int ParticlesAnimHFrames { get; set; }

The number of horizontal frames in the particle sprite sheet. Only enabled when BaseMaterial3D.ParticlesAnimEnabled is true or BaseMaterial3D.BillboardMode is set to BaseMaterial3D.BillboardModeEnum.Particles.

ParticlesAnimLoopProperty
# ParticlesAnimLoop
C#
public bool ParticlesAnimLoop { get; set; }

If true, particle animations are looped. Only enabled when BaseMaterial3D.ParticlesAnimEnabled is true or BaseMaterial3D.BillboardMode is set to BaseMaterial3D.BillboardModeEnum.Particles.

ParticlesAnimVFramesProperty
# ParticlesAnimVFrames
C#
public int ParticlesAnimVFrames { get; set; }

The number of vertical frames in the particle sprite sheet. Only enabled when BaseMaterial3D.ParticlesAnimEnabled is true or BaseMaterial3D.BillboardMode is set to BaseMaterial3D.BillboardModeEnum.Particles.

PointSizeProperty
# PointSize
C#
public float PointSize { get; set; }

The point size in pixels. See BaseMaterial3D.UsePointSize.

ProximityFadeDistanceProperty
# ProximityFadeDistance
C#
public float ProximityFadeDistance { get; set; }

Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.

ProximityFadeEnabledProperty
# ProximityFadeEnabled
C#
public bool ProximityFadeEnabled { get; set; }

If true, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object.

RefractionEnabledProperty
# RefractionEnabled
C#
public bool RefractionEnabled { get; set; }

If true, the refraction effect is enabled. Distorts transparency based on light from behind the object. Note: Refraction is implemented using the screen texture. Only opaque materials will appear in the refraction, since transparent materials do not appear in the screen texture.

RefractionScaleProperty
# RefractionScale
C#
public float RefractionScale { get; set; }

The strength of the refraction effect.

RefractionTextureProperty
# RefractionTexture
C#
public Texture2D RefractionTexture { get; set; }

Texture that controls the strength of the refraction per-pixel. Multiplied by BaseMaterial3D.RefractionScale.

RefractionTextureChannelProperty
# RefractionTextureChannel
C#
public BaseMaterial3D.TextureChannel RefractionTextureChannel { get; set; }

Specifies the channel of the BaseMaterial3D.RefractionTexture in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored refraction in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

RimProperty
# Rim
C#
public float Rim { get; set; }

Sets the strength of the rim lighting effect.

RimEnabledProperty
# RimEnabled
C#
public bool RimEnabled { get; set; }

If true, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object. Note: Rim lighting is not visible if the material's BaseMaterial3D.ShadingMode is BaseMaterial3D.ShadingModeEnum.Unshaded.

RimTextureProperty
# RimTexture
C#
public Texture2D RimTexture { get; set; }

Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by BaseMaterial3D.Rim.

RimTintProperty
# RimTint
C#
public float RimTint { get; set; }

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.

RoughnessProperty
# Roughness
C#
public float Roughness { get; set; }

Surface roughness, usually 0..1: lower values give tighter highlights/sharper reflections, higher values a broader response. Does not change polygon count or mesh geometry.

RoughnessTextureProperty
# RoughnessTexture
C#
public Texture2D RoughnessTexture { get; set; }

Texture used to control the roughness per-pixel. Multiplied by BaseMaterial3D.Roughness.

RoughnessTextureChannelProperty
# RoughnessTextureChannel
C#
public BaseMaterial3D.TextureChannel RoughnessTextureChannel { get; set; }

Specifies the channel of the BaseMaterial3D.RoughnessTexture in which the roughness 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.

ShadingModeProperty
# ShadingMode
C#
public BaseMaterial3D.ShadingModeEnum ShadingMode { get; set; }

Material lighting mode. Unshaded removes ordinary light-source response; PerPixel supplies a standard lit surface. Unshaded does not automatically disable every environment effect or transparency rule.

ShadowToOpacityProperty
# ShadowToOpacity
C#
public bool ShadowToOpacity { get; set; }

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.

SpecularModeProperty
# SpecularMode
C#
public BaseMaterial3D.SpecularModeEnum SpecularMode { get; set; }

The method for rendering the specular blob. Note: BaseMaterial3D.SpecularMode only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, VoxelGI, SDFGI or ReflectionProbes. To disable reflections from these sources as well, set BaseMaterial3D.MetallicSpecular to 0.0 instead.

StencilColorProperty
# StencilColor
C#
public Color StencilColor { get; set; }

The primary color of the stencil effect.

StencilCompareProperty
# StencilCompare
C#
public BaseMaterial3D.StencilCompareEnum StencilCompare { get; set; }

The comparison operator to use for stencil masking operations.

StencilFlagsProperty
# StencilFlags
C#
public int StencilFlags { get; set; }

The flags dictating how the stencil operation behaves.

StencilModeProperty
# StencilMode
C#
public BaseMaterial3D.StencilModeEnum StencilMode { get; set; }

The stencil effect mode.

StencilOutlineThicknessProperty
# StencilOutlineThickness
C#
public float StencilOutlineThickness { get; set; }

The outline thickness for BaseMaterial3D.StencilModeEnum.Outline.

StencilReferenceProperty
# StencilReference
C#
public int StencilReference { get; set; }

The stencil reference value (0-255). Typically a power of 2.

SubsurfScatterEnabledProperty
# SubsurfScatterEnabled
C#
public bool SubsurfScatterEnabled { get; set; }

If true, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality. Note: Subsurface scattering is not supported on viewports that have a transparent background (where Viewport.TransparentBg is true).

SubsurfScatterSkinModeProperty
# SubsurfScatterSkinMode
C#
public bool SubsurfScatterSkinMode { get; set; }

If true, subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering.

SubsurfScatterStrengthProperty
# SubsurfScatterStrength
C#
public float SubsurfScatterStrength { get; set; }

The strength of the subsurface scattering effect. The depth of the effect is also controlled by ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale, which is set globally.

SubsurfScatterTextureProperty
# SubsurfScatterTexture
C#
public Texture2D SubsurfScatterTexture { get; set; }

Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by BaseMaterial3D.SubsurfScatterStrength.

SubsurfScatterTransmittanceBoostProperty
# SubsurfScatterTransmittanceBoost
C#
public float SubsurfScatterTransmittanceBoost { get; set; }

The intensity of the subsurface scattering transmittance effect.

SubsurfScatterTransmittanceColorProperty
# SubsurfScatterTransmittanceColor
C#
public Color SubsurfScatterTransmittanceColor { get; set; }

The color to multiply the subsurface scattering transmittance effect with. Ignored if BaseMaterial3D.SubsurfScatterSkinMode is true.

SubsurfScatterTransmittanceDepthProperty
# SubsurfScatterTransmittanceDepth
C#
public float SubsurfScatterTransmittanceDepth { get; set; }

The depth of the subsurface scattering transmittance effect.

SubsurfScatterTransmittanceEnabledProperty
# SubsurfScatterTransmittanceEnabled
C#
public bool SubsurfScatterTransmittanceEnabled { get; set; }

If true, enables subsurface scattering transmittance. Only effective if BaseMaterial3D.SubsurfScatterEnabled is true. See also BaseMaterial3D.BacklightEnabled.

SubsurfScatterTransmittanceTextureProperty
# SubsurfScatterTransmittanceTexture
C#
public Texture2D SubsurfScatterTransmittanceTexture { get; set; }

The texture to use for multiplying the intensity of the subsurface scattering transmittance intensity. See also BaseMaterial3D.SubsurfScatterTexture. Ignored if BaseMaterial3D.SubsurfScatterSkinMode is true.

TextureFilterProperty
# TextureFilter
C#
public BaseMaterial3D.TextureFilterEnum TextureFilter { get; set; }

Filter flags for the texture. Note: BaseMaterial3D.HeightmapTexture is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering.

TextureRepeatProperty
# TextureRepeat
C#
public bool TextureRepeat { get; set; }

If true, the texture repeats when exceeding the texture's size. See BaseMaterial3D.Flags.UseTextureRepeat.

TransparencyProperty
# Transparency
C#
public BaseMaterial3D.TransparencyEnum Transparency { get; set; }

Selects alpha handling. Disabled keeps the surface opaque, Alpha blends with the background, and AlphaScissor discards fragments below the threshold. Alpha can change sorting and cost; it is not an automatic physical-glass model.

UV2OffsetProperty
# UV2Offset
C#
public Vector3 UV2Offset { get; set; }

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. The Z component is used when BaseMaterial3D.UV2Triplanar is enabled, but it is not used anywhere else.

UV2ScaleProperty
# UV2Scale
C#
public Vector3 UV2Scale { get; set; }

How much to scale the UV2 coordinates. This is multiplied by UV2 in the vertex function. The Z component is used when BaseMaterial3D.UV2Triplanar is enabled, but it is not used anywhere else.

UV2TriplanarProperty
# UV2Triplanar
C#
public bool UV2Triplanar { get; set; }

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.

UV2TriplanarSharpnessProperty
# UV2TriplanarSharpness
C#
public float UV2TriplanarSharpness { get; set; }

A lower number blends the texture more softly while a higher number blends the texture more sharply. Note: BaseMaterial3D.UV2TriplanarSharpness is clamped between 0.0 and 150.0 (inclusive) as values outside that range can look broken depending on the mesh.

UV2WorldTriplanarProperty
# UV2WorldTriplanar
C#
public bool UV2WorldTriplanar { get; set; }

If true, triplanar mapping for UV2 is calculated in world space rather than object local space. See also BaseMaterial3D.UV2Triplanar.

UseFovOverrideProperty
# UseFovOverride
C#
public bool UseFovOverride { get; set; }

If true use BaseMaterial3D.FovOverride to override the Camera3D's field of view angle.

UseParticleTrailsProperty
# UseParticleTrails
C#
public bool UseParticleTrails { get; set; }

Enables trail-pose deformation support in the surface material. Also requires emitter TrailEnabled and a compatible mesh/skin. Does not replace ProcessMaterial; inspect the effective MaterialOverride.

UsePointSizeProperty
# UsePointSize
C#
public bool UsePointSize { get; set; }

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 BaseMaterial3D.PointSize.

UseZClipScaleProperty
# UseZClipScale
C#
public bool UseZClipScale { get; set; }

If true use BaseMaterial3D.ZClipScale to scale the object being rendered towards the camera to avoid clipping into things like walls.

Uv1OffsetProperty
# Uv1Offset
C#
public Vector3 Uv1Offset { get; set; }

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. The Z component is used when BaseMaterial3D.Uv1Triplanar is enabled, but it is not used anywhere else.

Uv1ScaleProperty
# Uv1Scale
C#
public Vector3 Uv1Scale { get; set; }

How much to scale the UV coordinates. This is multiplied by UV in the vertex function. The Z component is used when BaseMaterial3D.Uv1Triplanar is enabled, but it is not used anywhere else.

Uv1TriplanarProperty
# Uv1Triplanar
C#
public bool Uv1Triplanar { get; set; }

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.

Uv1TriplanarSharpnessProperty
# Uv1TriplanarSharpness
C#
public float Uv1TriplanarSharpness { get; set; }

A lower number blends the texture more softly while a higher number blends the texture more sharply. Note: BaseMaterial3D.Uv1TriplanarSharpness is clamped between 0.0 and 150.0 (inclusive) as values outside that range can look broken depending on the mesh.

Uv1WorldTriplanarProperty
# Uv1WorldTriplanar
C#
public bool Uv1WorldTriplanar { get; set; }

If true, triplanar mapping for UV is calculated in world space rather than object local space. See also BaseMaterial3D.Uv1Triplanar.

VertexColorIsSrgbProperty
# VertexColorIsSrgb
C#
public bool VertexColorIsSrgb { get; set; }

If true, vertex colors are considered to be stored in nonlinear sRGB encoding and are converted to linear encoding during rendering. If false, vertex colors are considered to be stored in linear encoding and are rendered as-is. See also BaseMaterial3D.AlbedoTextureForceSrgb. Note: Only effective when using the Forward+ and Mobile rendering methods, not Compatibility.

VertexColorUseAsAlbedoProperty
# VertexColorUseAsAlbedo
C#
public bool VertexColorUseAsAlbedo { get; set; }

If true, the vertex color is used as albedo color.

ZClipScaleProperty
# ZClipScale
C#
public float ZClipScale { get; set; }

Scales the object being rendered towards the camera to avoid clipping into things like walls. This is intended to be used for objects that are fixed with respect to the camera like player arms, tools, etc. Lighting and shadows will continue to work correctly when this setting is adjusted, but screen-space effects like SSAO and SSR may break with lower scales. Therefore, try to keep this setting as close to 1.0 as possible.

Methods154

GetAOLightAffectfloat
# GetAOLightAffect
C#
public float GetAOLightAffect();
Returns float
GetAOTextureChannelBaseMaterial3D.TextureChannel
# GetAOTextureChannel
C#
public BaseMaterial3D.TextureChannel GetAOTextureChannel();
Returns BaseMaterial3D.TextureChannel
GetAlbedoColor
# GetAlbedo
C#
public Color GetAlbedo();
Returns Color
GetAlphaAntialiasingBaseMaterial3D.AlphaAntiAliasing
# GetAlphaAntialiasing
C#
public BaseMaterial3D.AlphaAntiAliasing GetAlphaAntialiasing();
Returns BaseMaterial3D.AlphaAntiAliasing
GetAlphaAntialiasingEdgefloat
# GetAlphaAntialiasingEdge
C#
public float GetAlphaAntialiasingEdge();
Returns float
GetAlphaHashScalefloat
# GetAlphaHashScale
C#
public float GetAlphaHashScale();
Returns float
GetAlphaScissorThresholdfloat
# GetAlphaScissorThreshold
C#
public float GetAlphaScissorThreshold();
Returns float
GetAnisotropyfloat
# GetAnisotropy
C#
public float GetAnisotropy();
Returns float
GetBacklightColor
# GetBacklight
C#
public Color GetBacklight();
Returns Color
GetBillboardModeBaseMaterial3D.BillboardModeEnum
# GetBillboardMode
C#
public BaseMaterial3D.BillboardModeEnum GetBillboardMode();
Returns BaseMaterial3D.BillboardModeEnum
GetBlendModeBaseMaterial3D.BlendModeEnum
# GetBlendMode
C#
public BaseMaterial3D.BlendModeEnum GetBlendMode();
Returns BaseMaterial3D.BlendModeEnum
GetClearcoatfloat
# GetClearcoat
C#
public float GetClearcoat();
Returns float
GetClearcoatRoughnessfloat
# GetClearcoatRoughness
C#
public float GetClearcoatRoughness();
Returns float
GetCullModeBaseMaterial3D.CullModeEnum
# GetCullMode
C#
public BaseMaterial3D.CullModeEnum GetCullMode();
Returns BaseMaterial3D.CullModeEnum
GetDepthDrawModeBaseMaterial3D.DepthDrawModeEnum
# GetDepthDrawMode
C#
public BaseMaterial3D.DepthDrawModeEnum GetDepthDrawMode();
Returns BaseMaterial3D.DepthDrawModeEnum
GetDepthTestBaseMaterial3D.DepthTestEnum
# GetDepthTest
C#
public BaseMaterial3D.DepthTestEnum GetDepthTest();
Returns BaseMaterial3D.DepthTestEnum
GetDetailBlendModeBaseMaterial3D.BlendModeEnum
# GetDetailBlendMode
C#
public BaseMaterial3D.BlendModeEnum GetDetailBlendMode();
Returns BaseMaterial3D.BlendModeEnum
GetDetailUVBaseMaterial3D.DetailUV
# GetDetailUV
C#
public BaseMaterial3D.DetailUV GetDetailUV();
Returns BaseMaterial3D.DetailUV
GetDiffuseModeBaseMaterial3D.DiffuseModeEnum
# GetDiffuseMode
C#
public BaseMaterial3D.DiffuseModeEnum GetDiffuseMode();
Returns BaseMaterial3D.DiffuseModeEnum
GetDistanceFadeBaseMaterial3D.DistanceFadeModeEnum
# GetDistanceFade
C#
public BaseMaterial3D.DistanceFadeModeEnum GetDistanceFade();
Returns BaseMaterial3D.DistanceFadeModeEnum
GetDistanceFadeMaxDistancefloat
# GetDistanceFadeMaxDistance
C#
public float GetDistanceFadeMaxDistance();
Returns float
GetDistanceFadeMinDistancefloat
# GetDistanceFadeMinDistance
C#
public float GetDistanceFadeMinDistance();
Returns float
GetEmissionColor
# GetEmission
C#
public Color GetEmission();
Returns Color
GetEmissionEnergyMultiplierfloat
# GetEmissionEnergyMultiplier
C#
public float GetEmissionEnergyMultiplier();
Returns float
GetEmissionIntensityfloat
# GetEmissionIntensity
C#
public float GetEmissionIntensity();
Returns float
GetEmissionOperatorBaseMaterial3D.EmissionOperatorEnum
# GetEmissionOperator
C#
public BaseMaterial3D.EmissionOperatorEnum GetEmissionOperator();
Returns BaseMaterial3D.EmissionOperatorEnum
GetFeaturebool
# GetFeature
C#
public bool GetFeature(BaseMaterial3D.Feature feature);

Returns true if the specified feature is enabled.

Parameters
NameTypeDefault
featureBaseMaterial3D.Feature—
Returns bool
GetFlagbool
# GetFlag
C#
public bool GetFlag(BaseMaterial3D.Flags flag);

Returns true if the specified flag is enabled.

Parameters
NameTypeDefault
flagBaseMaterial3D.Flags—
Returns bool
GetFovOverridefloat
# GetFovOverride
C#
public float GetFovOverride();
Returns float
GetGrowfloat
# GetGrow
C#
public float GetGrow();
Returns float
GetHeightmapDeepParallaxFlipBinormalbool
# GetHeightmapDeepParallaxFlipBinormal
C#
public bool GetHeightmapDeepParallaxFlipBinormal();
Returns bool
GetHeightmapDeepParallaxFlipTangentbool
# GetHeightmapDeepParallaxFlipTangent
C#
public bool GetHeightmapDeepParallaxFlipTangent();
Returns bool
GetHeightmapDeepParallaxMaxLayersint
# GetHeightmapDeepParallaxMaxLayers
C#
public int GetHeightmapDeepParallaxMaxLayers();
Returns int
GetHeightmapDeepParallaxMinLayersint
# GetHeightmapDeepParallaxMinLayers
C#
public int GetHeightmapDeepParallaxMinLayers();
Returns int
GetHeightmapScalefloat
# GetHeightmapScale
C#
public float GetHeightmapScale();
Returns float
GetMetallicfloat
# GetMetallic
C#
public float GetMetallic();
Returns float
GetMetallicTextureChannelBaseMaterial3D.TextureChannel
# GetMetallicTextureChannel
C#
public BaseMaterial3D.TextureChannel GetMetallicTextureChannel();
Returns BaseMaterial3D.TextureChannel
GetMsdfOutlineSizefloat
# GetMsdfOutlineSize
C#
public float GetMsdfOutlineSize();
Returns float
GetMsdfPixelRangefloat
# GetMsdfPixelRange
C#
public float GetMsdfPixelRange();
Returns float
GetNormalScalefloat
# GetNormalScale
C#
public float GetNormalScale();
Returns float
GetParticlesAnimHFramesint
# GetParticlesAnimHFrames
C#
public int GetParticlesAnimHFrames();
Returns int
GetParticlesAnimLoopbool
# GetParticlesAnimLoop
C#
public bool GetParticlesAnimLoop();
Returns bool
GetParticlesAnimVFramesint
# GetParticlesAnimVFrames
C#
public int GetParticlesAnimVFrames();
Returns int
GetPointSizefloat
# GetPointSize
C#
public float GetPointSize();
Returns float
GetProximityFadeDistancefloat
# GetProximityFadeDistance
C#
public float GetProximityFadeDistance();
Returns float
GetRefractionfloat
# GetRefraction
C#
public float GetRefraction();
Returns float
GetRefractionTextureChannelBaseMaterial3D.TextureChannel
# GetRefractionTextureChannel
C#
public BaseMaterial3D.TextureChannel GetRefractionTextureChannel();
Returns BaseMaterial3D.TextureChannel
GetRimfloat
# GetRim
C#
public float GetRim();
Returns float
GetRimTintfloat
# GetRimTint
C#
public float GetRimTint();
Returns float
GetRoughnessfloat
# GetRoughness
C#
public float GetRoughness();
Returns float
GetRoughnessTextureChannelBaseMaterial3D.TextureChannel
# GetRoughnessTextureChannel
C#
public BaseMaterial3D.TextureChannel GetRoughnessTextureChannel();
Returns BaseMaterial3D.TextureChannel
GetShadingModeBaseMaterial3D.ShadingModeEnum
# GetShadingMode
C#
public BaseMaterial3D.ShadingModeEnum GetShadingMode();
Returns BaseMaterial3D.ShadingModeEnum
GetSpecularfloat
# GetSpecular
C#
public float GetSpecular();
Returns float
GetSpecularModeBaseMaterial3D.SpecularModeEnum
# GetSpecularMode
C#
public BaseMaterial3D.SpecularModeEnum GetSpecularMode();
Returns BaseMaterial3D.SpecularModeEnum
GetStencilCompareBaseMaterial3D.StencilCompareEnum
# GetStencilCompare
C#
public BaseMaterial3D.StencilCompareEnum GetStencilCompare();
Returns BaseMaterial3D.StencilCompareEnum
GetStencilEffectColorColor
# GetStencilEffectColor
C#
public Color GetStencilEffectColor();
Returns Color
GetStencilEffectOutlineThicknessfloat
# GetStencilEffectOutlineThickness
C#
public float GetStencilEffectOutlineThickness();
Returns float
GetStencilFlagsint
# GetStencilFlags
C#
public int GetStencilFlags();
Returns int
GetStencilModeBaseMaterial3D.StencilModeEnum
# GetStencilMode
C#
public BaseMaterial3D.StencilModeEnum GetStencilMode();
Returns BaseMaterial3D.StencilModeEnum
GetStencilReferenceint
# GetStencilReference
C#
public int GetStencilReference();
Returns int
GetSubsurfaceScatteringStrengthfloat
# GetSubsurfaceScatteringStrength
C#
public float GetSubsurfaceScatteringStrength();
Returns float
GetTextureTexture2D
# GetTexture
C#
public Texture2D GetTexture(BaseMaterial3D.TextureParam param);

Returns the Texture2D associated with the specified texture param.

Parameters
NameTypeDefault
paramBaseMaterial3D.TextureParam—
Returns Texture2D
GetTextureFilterBaseMaterial3D.TextureFilterEnum
# GetTextureFilter
C#
public BaseMaterial3D.TextureFilterEnum GetTextureFilter();
Returns BaseMaterial3D.TextureFilterEnum
GetTransmittanceBoostfloat
# GetTransmittanceBoost
C#
public float GetTransmittanceBoost();
Returns float
GetTransmittanceColorColor
# GetTransmittanceColor
C#
public Color GetTransmittanceColor();
Returns Color
GetTransmittanceDepthfloat
# GetTransmittanceDepth
C#
public float GetTransmittanceDepth();
Returns float
GetTransparencyBaseMaterial3D.TransparencyEnum
# GetTransparency
C#
public BaseMaterial3D.TransparencyEnum GetTransparency();
Returns BaseMaterial3D.TransparencyEnum
GetUV2OffsetVector3
# GetUV2Offset
C#
public Vector3 GetUV2Offset();
Returns Vector3
GetUV2ScaleVector3
# GetUV2Scale
C#
public Vector3 GetUV2Scale();
Returns Vector3
GetUV2TriplanarBlendSharpnessfloat
# GetUV2TriplanarBlendSharpness
C#
public float GetUV2TriplanarBlendSharpness();
Returns float
GetUv1OffsetVector3
# GetUv1Offset
C#
public Vector3 GetUv1Offset();
Returns Vector3
GetUv1ScaleVector3
# GetUv1Scale
C#
public Vector3 GetUv1Scale();
Returns Vector3
GetUv1TriplanarBlendSharpnessfloat
# GetUv1TriplanarBlendSharpness
C#
public float GetUv1TriplanarBlendSharpness();
Returns float
GetZClipScalefloat
# GetZClipScale
C#
public float GetZClipScale();
Returns float
IsGrowEnabledbool
# IsGrowEnabled
C#
public bool IsGrowEnabled();
Returns bool
IsHeightmapDeepParallaxEnabledbool
# IsHeightmapDeepParallaxEnabled
C#
public bool IsHeightmapDeepParallaxEnabled();
Returns bool
IsProximityFadeEnabledbool
# IsProximityFadeEnabled
C#
public bool IsProximityFadeEnabled();
Returns bool
SetAOLightAffectvoid
# SetAOLightAffect
C#
public void SetAOLightAffect(float amount);
Parameters
NameTypeDefault
amountfloat—
SetAOTextureChannelvoid
# SetAOTextureChannel
C#
public void SetAOTextureChannel(BaseMaterial3D.TextureChannel channel);
Parameters
NameTypeDefault
channelBaseMaterial3D.TextureChannel—
SetAlbedovoid
# SetAlbedo
C#
public void SetAlbedo(Color albedo);
Parameters
NameTypeDefault
albedoColor—
SetAlphaAntialiasingvoid
# SetAlphaAntialiasing
C#
public void SetAlphaAntialiasing(BaseMaterial3D.AlphaAntiAliasing alphaAA);
Parameters
NameTypeDefault
alphaAABaseMaterial3D.AlphaAntiAliasing—
SetAlphaAntialiasingEdgevoid
# SetAlphaAntialiasingEdge
C#
public void SetAlphaAntialiasingEdge(float edge);
Parameters
NameTypeDefault
edgefloat—
SetAlphaHashScalevoid
# SetAlphaHashScale
C#
public void SetAlphaHashScale(float threshold);
Parameters
NameTypeDefault
thresholdfloat—
SetAlphaScissorThresholdvoid
# SetAlphaScissorThreshold
C#
public void SetAlphaScissorThreshold(float threshold);
Parameters
NameTypeDefault
thresholdfloat—
SetAnisotropyvoid
# SetAnisotropy
C#
public void SetAnisotropy(float anisotropy);
Parameters
NameTypeDefault
anisotropyfloat—
SetBacklightvoid
# SetBacklight
C#
public void SetBacklight(Color backlight);
Parameters
NameTypeDefault
backlightColor—
SetBillboardModevoid
# SetBillboardMode
C#
public void SetBillboardMode(BaseMaterial3D.BillboardModeEnum mode);
Parameters
NameTypeDefault
modeBaseMaterial3D.BillboardModeEnum—
SetBlendModevoid
# SetBlendMode
C#
public void SetBlendMode(BaseMaterial3D.BlendModeEnum blendMode);
Parameters
NameTypeDefault
blendModeBaseMaterial3D.BlendModeEnum—
SetClearcoatvoid
# SetClearcoat
C#
public void SetClearcoat(float clearcoat);
Parameters
NameTypeDefault
clearcoatfloat—
SetClearcoatRoughnessvoid
# SetClearcoatRoughness
C#
public void SetClearcoatRoughness(float clearcoatRoughness);
Parameters
NameTypeDefault
clearcoatRoughnessfloat—
SetCullModevoid
# SetCullMode
C#
public void SetCullMode(BaseMaterial3D.CullModeEnum cullMode);
Parameters
NameTypeDefault
cullModeBaseMaterial3D.CullModeEnum—
SetDepthDrawModevoid
# SetDepthDrawMode
C#
public void SetDepthDrawMode(BaseMaterial3D.DepthDrawModeEnum depthDrawMode);
Parameters
NameTypeDefault
depthDrawModeBaseMaterial3D.DepthDrawModeEnum—
SetDepthTestvoid
# SetDepthTest
C#
public void SetDepthTest(BaseMaterial3D.DepthTestEnum depthTest);
Parameters
NameTypeDefault
depthTestBaseMaterial3D.DepthTestEnum—
SetDetailBlendModevoid
# SetDetailBlendMode
C#
public void SetDetailBlendMode(BaseMaterial3D.BlendModeEnum detailBlendMode);
Parameters
NameTypeDefault
detailBlendModeBaseMaterial3D.BlendModeEnum—
SetDetailUVvoid
# SetDetailUV
C#
public void SetDetailUV(BaseMaterial3D.DetailUV detailUV);
Parameters
NameTypeDefault
detailUVBaseMaterial3D.DetailUV—
SetDiffuseModevoid
# SetDiffuseMode
C#
public void SetDiffuseMode(BaseMaterial3D.DiffuseModeEnum diffuseMode);
Parameters
NameTypeDefault
diffuseModeBaseMaterial3D.DiffuseModeEnum—
SetDistanceFadevoid
# SetDistanceFade
C#
public void SetDistanceFade(BaseMaterial3D.DistanceFadeModeEnum mode);
Parameters
NameTypeDefault
modeBaseMaterial3D.DistanceFadeModeEnum—
SetDistanceFadeMaxDistancevoid
# SetDistanceFadeMaxDistance
C#
public void SetDistanceFadeMaxDistance(float distance);
Parameters
NameTypeDefault
distancefloat—
SetDistanceFadeMinDistancevoid
# SetDistanceFadeMinDistance
C#
public void SetDistanceFadeMinDistance(float distance);
Parameters
NameTypeDefault
distancefloat—
SetEmissionvoid
# SetEmission
C#
public void SetEmission(Color emission);
Parameters
NameTypeDefault
emissionColor—
SetEmissionEnergyMultipliervoid
# SetEmissionEnergyMultiplier
C#
public void SetEmissionEnergyMultiplier(float emissionEnergyMultiplier);
Parameters
NameTypeDefault
emissionEnergyMultiplierfloat—
SetEmissionIntensityvoid
# SetEmissionIntensity
C#
public void SetEmissionIntensity(float emissionEnergyMultiplier);
Parameters
NameTypeDefault
emissionEnergyMultiplierfloat—
SetEmissionOperatorvoid
# SetEmissionOperator
C#
public void SetEmissionOperator(BaseMaterial3D.EmissionOperatorEnum @operator);
Parameters
NameTypeDefault
operatorBaseMaterial3D.EmissionOperatorEnum—
SetFeaturevoid
# SetFeature
C#
public void SetFeature(BaseMaterial3D.Feature feature, bool enable);

If enable is true, enables the specified feature. Many features that are available in BaseMaterial3D need to be enabled before use. This way, the cost for using the feature is only incurred when specified. Features can also be enabled by setting their corresponding property to true.

Parameters
NameTypeDefault
featureBaseMaterial3D.Feature—
enablebool—
SetFlagvoid
# SetFlag
C#
public void SetFlag(BaseMaterial3D.Flags flag, bool enable);

If enable is true, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting their corresponding property to true.

Parameters
NameTypeDefault
flagBaseMaterial3D.Flags—
enablebool—
SetFovOverridevoid
# SetFovOverride
C#
public void SetFovOverride(float scale);
Parameters
NameTypeDefault
scalefloat—
SetGrowvoid
# SetGrow
C#
public void SetGrow(float amount);
Parameters
NameTypeDefault
amountfloat—
SetGrowEnabledvoid
# SetGrowEnabled
C#
public void SetGrowEnabled(bool enable);
Parameters
NameTypeDefault
enablebool—
SetHeightmapDeepParallaxvoid
# SetHeightmapDeepParallax
C#
public void SetHeightmapDeepParallax(bool enable);
Parameters
NameTypeDefault
enablebool—
SetHeightmapDeepParallaxFlipBinormalvoid
# SetHeightmapDeepParallaxFlipBinormal
C#
public void SetHeightmapDeepParallaxFlipBinormal(bool flip);
Parameters
NameTypeDefault
flipbool—
SetHeightmapDeepParallaxFlipTangentvoid
# SetHeightmapDeepParallaxFlipTangent
C#
public void SetHeightmapDeepParallaxFlipTangent(bool flip);
Parameters
NameTypeDefault
flipbool—
SetHeightmapDeepParallaxMaxLayersvoid
# SetHeightmapDeepParallaxMaxLayers
C#
public void SetHeightmapDeepParallaxMaxLayers(int layer);
Parameters
NameTypeDefault
layerint—
SetHeightmapDeepParallaxMinLayersvoid
# SetHeightmapDeepParallaxMinLayers
C#
public void SetHeightmapDeepParallaxMinLayers(int layer);
Parameters
NameTypeDefault
layerint—
SetHeightmapScalevoid
# SetHeightmapScale
C#
public void SetHeightmapScale(float heightmapScale);
Parameters
NameTypeDefault
heightmapScalefloat—
SetMetallicvoid
# SetMetallic
C#
public void SetMetallic(float metallic);
Parameters
NameTypeDefault
metallicfloat—
SetMetallicTextureChannelvoid
# SetMetallicTextureChannel
C#
public void SetMetallicTextureChannel(BaseMaterial3D.TextureChannel channel);
Parameters
NameTypeDefault
channelBaseMaterial3D.TextureChannel—
SetMsdfOutlineSizevoid
# SetMsdfOutlineSize
C#
public void SetMsdfOutlineSize(float size);
Parameters
NameTypeDefault
sizefloat—
SetMsdfPixelRangevoid
# SetMsdfPixelRange
C#
public void SetMsdfPixelRange(float range);
Parameters
NameTypeDefault
rangefloat—
SetNormalScalevoid
# SetNormalScale
C#
public void SetNormalScale(float normalScale);
Parameters
NameTypeDefault
normalScalefloat—
SetParticlesAnimHFramesvoid
# SetParticlesAnimHFrames
C#
public void SetParticlesAnimHFrames(int frames);
Parameters
NameTypeDefault
framesint—
SetParticlesAnimLoopvoid
# SetParticlesAnimLoop
C#
public void SetParticlesAnimLoop(bool loop);
Parameters
NameTypeDefault
loopbool—
SetParticlesAnimVFramesvoid
# SetParticlesAnimVFrames
C#
public void SetParticlesAnimVFrames(int frames);
Parameters
NameTypeDefault
framesint—
SetPointSizevoid
# SetPointSize
C#
public void SetPointSize(float pointSize);
Parameters
NameTypeDefault
pointSizefloat—
SetProximityFadeDistancevoid
# SetProximityFadeDistance
C#
public void SetProximityFadeDistance(float distance);
Parameters
NameTypeDefault
distancefloat—
SetProximityFadeEnabledvoid
# SetProximityFadeEnabled
C#
public void SetProximityFadeEnabled(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetRefractionvoid
# SetRefraction
C#
public void SetRefraction(float refraction);
Parameters
NameTypeDefault
refractionfloat—
SetRefractionTextureChannelvoid
# SetRefractionTextureChannel
C#
public void SetRefractionTextureChannel(BaseMaterial3D.TextureChannel channel);
Parameters
NameTypeDefault
channelBaseMaterial3D.TextureChannel—
SetRimvoid
# SetRim
C#
public void SetRim(float rim);
Parameters
NameTypeDefault
rimfloat—
SetRimTintvoid
# SetRimTint
C#
public void SetRimTint(float rimTint);
Parameters
NameTypeDefault
rimTintfloat—
SetRoughnessvoid
# SetRoughness
C#
public void SetRoughness(float roughness);
Parameters
NameTypeDefault
roughnessfloat—
SetRoughnessTextureChannelvoid
# SetRoughnessTextureChannel
C#
public void SetRoughnessTextureChannel(BaseMaterial3D.TextureChannel channel);
Parameters
NameTypeDefault
channelBaseMaterial3D.TextureChannel—
SetShadingModevoid
# SetShadingMode
C#
public void SetShadingMode(BaseMaterial3D.ShadingModeEnum shadingMode);
Parameters
NameTypeDefault
shadingModeBaseMaterial3D.ShadingModeEnum—
SetSpecularvoid
# SetSpecular
C#
public void SetSpecular(float specular);
Parameters
NameTypeDefault
specularfloat—
SetSpecularModevoid
# SetSpecularMode
C#
public void SetSpecularMode(BaseMaterial3D.SpecularModeEnum specularMode);
Parameters
NameTypeDefault
specularModeBaseMaterial3D.SpecularModeEnum—
SetStencilComparevoid
# SetStencilCompare
C#
public void SetStencilCompare(BaseMaterial3D.StencilCompareEnum stencilCompare);
Parameters
NameTypeDefault
stencilCompareBaseMaterial3D.StencilCompareEnum—
SetStencilEffectColorvoid
# SetStencilEffectColor
C#
public void SetStencilEffectColor(Color stencilColor);
Parameters
NameTypeDefault
stencilColorColor—
SetStencilEffectOutlineThicknessvoid
# SetStencilEffectOutlineThickness
C#
public void SetStencilEffectOutlineThickness(float stencilOutlineThickness);
Parameters
NameTypeDefault
stencilOutlineThicknessfloat—
SetStencilFlagsvoid
# SetStencilFlags
C#
public void SetStencilFlags(int stencilFlags);
Parameters
NameTypeDefault
stencilFlagsint—
SetStencilModevoid
# SetStencilMode
C#
public void SetStencilMode(BaseMaterial3D.StencilModeEnum stencilMode);
Parameters
NameTypeDefault
stencilModeBaseMaterial3D.StencilModeEnum—
SetStencilReferencevoid
# SetStencilReference
C#
public void SetStencilReference(int stencilReference);
Parameters
NameTypeDefault
stencilReferenceint—
SetSubsurfaceScatteringStrengthvoid
# SetSubsurfaceScatteringStrength
C#
public void SetSubsurfaceScatteringStrength(float strength);
Parameters
NameTypeDefault
strengthfloat—
SetTexturevoid
# SetTexture
C#
public void SetTexture(BaseMaterial3D.TextureParam param, Texture2D texture);

Sets the texture for the slot specified by param.

Parameters
NameTypeDefault
paramBaseMaterial3D.TextureParam—
textureTexture2D—
SetTextureFiltervoid
# SetTextureFilter
C#
public void SetTextureFilter(BaseMaterial3D.TextureFilterEnum mode);
Parameters
NameTypeDefault
modeBaseMaterial3D.TextureFilterEnum—
SetTransmittanceBoostvoid
# SetTransmittanceBoost
C#
public void SetTransmittanceBoost(float boost);
Parameters
NameTypeDefault
boostfloat—
SetTransmittanceColorvoid
# SetTransmittanceColor
C#
public void SetTransmittanceColor(Color color);
Parameters
NameTypeDefault
colorColor—
SetTransmittanceDepthvoid
# SetTransmittanceDepth
C#
public void SetTransmittanceDepth(float depth);
Parameters
NameTypeDefault
depthfloat—
SetTransparencyvoid
# SetTransparency
C#
public void SetTransparency(BaseMaterial3D.TransparencyEnum transparency);
Parameters
NameTypeDefault
transparencyBaseMaterial3D.TransparencyEnum—
SetUV2Offsetvoid
# SetUV2Offset
C#
public void SetUV2Offset(Vector3 offset);
Parameters
NameTypeDefault
offsetVector3—
SetUV2Scalevoid
# SetUV2Scale
C#
public void SetUV2Scale(Vector3 scale);
Parameters
NameTypeDefault
scaleVector3—
SetUV2TriplanarBlendSharpnessvoid
# SetUV2TriplanarBlendSharpness
C#
public void SetUV2TriplanarBlendSharpness(float sharpness);
Parameters
NameTypeDefault
sharpnessfloat—
SetUv1Offsetvoid
# SetUv1Offset
C#
public void SetUv1Offset(Vector3 offset);
Parameters
NameTypeDefault
offsetVector3—
SetUv1Scalevoid
# SetUv1Scale
C#
public void SetUv1Scale(Vector3 scale);
Parameters
NameTypeDefault
scaleVector3—
SetUv1TriplanarBlendSharpnessvoid
# SetUv1TriplanarBlendSharpness
C#
public void SetUv1TriplanarBlendSharpness(float sharpness);
Parameters
NameTypeDefault
sharpnessfloat—
SetZClipScalevoid
# SetZClipScale
C#
public void SetZClipScale(float scale);
Parameters
NameTypeDefault
scalefloat—

BaseMaterial3D.AlphaAntiAliasing

ValueDescription
AlphaToCoverage = 1

Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask.

AlphaToCoverageAndToOne = 2

Enables AlphaToCoverage and forces all non-zero alpha values to 1. Alpha values in the material are passed to the AntiAliasing sample mask.

Off = 0

Disables Alpha AntiAliasing for the material.

BaseMaterial3D.BillboardModeEnum

ValueDescription
Disabled = 0

Billboard mode is disabled.

Enabled = 1

The object's Z axis will always face the camera.

FixedY = 2

The object's X axis will always face the camera.

Particles = 3

Used for particle systems when assigned to GpuParticles3D and CpuParticles3D nodes (flipbook animation). Enables particles_anim_* properties. The ParticleProcessMaterial.AnimSpeedMin or CpuParticles3D.AnimSpeedMin should also be set to a value bigger than zero for the animation to play. For animations without bilboarding, see BaseMaterial3D.ParticlesAnimEnabled.

BaseMaterial3D.BlendModeEnum

ValueDescription
Add = 1

The color of the object is added to the background.

Mix = 0

Default blend mode. The color of the object is blended over the background based on the object's alpha value.

Mul = 3

The color of the object is multiplied by the background.

PremultAlpha = 4

The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the PREMUL_ALPHA_FACTOR built-in so that lighting can be modulated as well.

Sub = 2

The color of the object is subtracted from the background.

BaseMaterial3D.CullModeEnum

ValueDescription
Back = 0

Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes, this means that only the exterior of the mesh will be visible.

Disabled = 2

No face culling is performed; both the front face and back face will be visible.

Front = 1

Front face triangles will be culled when facing the camera. This results in only the back side of triangles being drawn. For closed-surface meshes, this means that the interior of the mesh will be drawn instead of the exterior.

BaseMaterial3D.DepthDrawModeEnum

ValueDescription
Always = 1

Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them. Note: This does not influence whether transparent objects are included in the depth prepass or not. For that, see BaseMaterial3D.TransparencyEnum.

Disabled = 2

Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled).

OpaqueOnly = 0

Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass.

BaseMaterial3D.DepthTestEnum

ValueDescription
Default = 0

Depth test will discard the pixel if it is behind other pixels.

Inverted = 1

Depth test will discard the pixel if it is in front of other pixels. Useful for stencil effects.

BaseMaterial3D.DetailUV

ValueDescription
UV1 = 0

Use UV with the detail texture.

UV2 = 1

Use UV2 with the detail texture.

BaseMaterial3D.DiffuseModeEnum

ValueDescription
Burley = 0

Default diffuse scattering algorithm.

Lambert = 1

Diffuse scattering ignores roughness.

LambertWrap = 2

Extends Lambert to cover more than 90 degrees when roughness increases.

Toon = 3

Uses a hard cut for lighting, with smoothing affected by roughness.

BaseMaterial3D.DistanceFadeModeEnum

ValueDescription
Disabled = 0

Do not use distance fade.

ObjectDither = 3

Smoothly fades the object out based on the object's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than BaseMaterial3D.DistanceFadeModeEnum.PixelAlpha and BaseMaterial3D.DistanceFadeModeEnum.PixelDither.

PixelAlpha = 1

Smoothly fades the object out based on each pixel's distance from the camera using the alpha channel.

PixelDither = 2

Smoothly fades the object out based on each pixel's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than BaseMaterial3D.DistanceFadeModeEnum.PixelAlpha.

BaseMaterial3D.EmissionOperatorEnum

ValueDescription
Add = 0

Adds the emission color to the color from the emission texture.

Multiply = 1

Multiplies the emission color by the color from the emission texture.

BaseMaterial3D.Feature

BaseMaterial3D.Flags

ValueDescription
AOOnUV2 = 10

Use UV2 coordinates to look up from the BaseMaterial3D.AOTexture.

AlbedoFromVertexColor = 1

Set ALBEDO to the per-vertex color specified in the mesh.

AlbedoTextureForceSrgb = 12

Forces the shader to convert albedo from nonlinear sRGB encoding to linear encoding. See also BaseMaterial3D.AlbedoTextureForceSrgb.

AlbedoTextureMsdf = 20

Enables multichannel signed distance field rendering shader.

BillboardKeepScale = 5

Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when BaseMaterial3D.BillboardMode is BaseMaterial3D.BillboardModeEnum.Enabled.

DisableAmbientLight = 14

Disables receiving ambient light.

DisableDepthTest = 0

Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth.

DisableFog = 21

Disables receiving depth-based or volumetric fog.

DisableSpecularOcclusion = 22

Disables specular occlusion.

DontReceiveShadows = 13

Disables receiving shadows from other objects.

EmissionOnUV2 = 11

Use UV2 coordinates to look up from the BaseMaterial3D.EmissionTexture.

FixedSize = 4

Object is scaled by depth so that it always appears the same size on screen.

InvertHeightmap = 17

Invert values read from a depth texture to convert them to height values (heightmap).

Max = 25

Represents the size of the BaseMaterial3D.Flags enum.

ParticleTrailsMode = 19

Enables parts of the shader required for GpuParticles3D trails to function. This also requires using a mesh with appropriate skinning, such as RibbonTrailMesh or TubeTrailMesh. Enabling this feature outside of materials used in GpuParticles3D meshes will break material rendering.

SrgbVertexColor = 2

Vertex colors are considered to be stored in nonlinear sRGB encoding and are converted to linear encoding during rendering. See also BaseMaterial3D.VertexColorIsSrgb. Note: Only effective when using the Forward+ and Mobile rendering methods.

SubsurfaceModeSkin = 18

Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin.

UV2UseTriplanar = 7

Use triplanar texture lookup for all texture lookups that would normally use UV2.

UV2UseWorldTriplanar = 9

Use triplanar texture lookup for all texture lookups that would normally use UV2.

UseFovOverride = 24

Enables using BaseMaterial3D.FovOverride.

UsePointSize = 3

Uses point size to alter the size of primitive points. Also changes the albedo texture lookup to use POINT_COORD instead of UV.

UseShadowToOpacity = 15

Enables the shadow to opacity feature.

UseTextureRepeat = 16

Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.

UseZClipScale = 23

Enables using BaseMaterial3D.ZClipScale.

Uv1UseTriplanar = 6

Use triplanar texture lookup for all texture lookups that would normally use UV.

Uv1UseWorldTriplanar = 8

Use triplanar texture lookup for all texture lookups that would normally use UV.

BaseMaterial3D.ShadingModeEnum

ValueDescription
Max = 3

Represents the size of the BaseMaterial3D.ShadingModeEnum enum.

PerPixel = 1

The object will be shaded per pixel. Useful for realistic shading effects.

PerVertex = 2

The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality.

Unshaded = 0

The object will not receive shadows. This is the fastest to render, but it disables all interactions with lights.

BaseMaterial3D.SpecularModeEnum

ValueDescription
Disabled = 2

No specular blob. This is slightly faster to render than other specular modes.

SchlickGgx = 0

Default specular blob. Note: Forward+ uses multiscattering for more accurate reflections, although the impact of multiscattering is more noticeable on rough metallic surfaces than on smooth, non-metallic surfaces. Note: Mobile and Compatibility don't perform multiscattering for performance reasons. Instead, they perform single scattering, which means rough metallic surfaces may look slightly darker than intended.

Toon = 1

Toon blob which changes size based on roughness.

BaseMaterial3D.StencilCompareEnum

ValueDescription
Always = 0

Always passes the stencil test.

Equal = 2

Passes the stencil test when the reference value is equal to the existing stencil value.

Greater = 4

Passes the stencil test when the reference value is greater than the existing stencil value.

GreaterOrEqual = 6

Passes the stencil test when the reference value is greater than or equal to the existing stencil value.

Less = 1

Passes the stencil test when the reference value is less than the existing stencil value.

LessOrEqual = 3

Passes the stencil test when the reference value is less than or equal to the existing stencil value.

NotEqual = 5

Passes the stencil test when the reference value is not equal to the existing stencil value.

BaseMaterial3D.StencilFlagsEnum

ValueDescription
Read = 1

The material will only be rendered where it passes a stencil comparison with existing stencil buffer values.

Write = 2

The material will write the reference value to the stencil buffer where it passes the depth test.

WriteDepthFail = 4

The material will write the reference value to the stencil buffer where it fails the depth test.

BaseMaterial3D.StencilModeEnum

ValueDescription
Custom = 3

Enables stencil operations without a preset.

Disabled = 0

Disables stencil operations.

Outline = 1

Stencil preset which applies an outline to the object. Note: Requires a Material.NextPass material which will be automatically applied. Any manual changes made to Material.NextPass will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a Material.NextPass material on a material that uses stencil presets, use GeometryInstance3D.MaterialOverlay instead.

Xray = 2

Stencil preset which shows a silhouette of the object behind walls. Note: Requires a Material.NextPass material which will be automatically applied. Any manual changes made to Material.NextPass will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a Material.NextPass material on a material that uses stencil presets, use GeometryInstance3D.MaterialOverlay instead.

BaseMaterial3D.TextureChannel

ValueDescription
Alpha = 3

Used to read from the alpha channel of a texture.

Blue = 2

Used to read from the blue channel of a texture.

Grayscale = 4

Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture.

Green = 1

Used to read from the green channel of a texture.

Red = 0

Used to read from the red channel of a texture.

BaseMaterial3D.TextureFilterEnum

ValueDescription
Linear = 1

The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).

LinearWithMipmaps = 3

The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look smooth from up close, and smooth from a distance.

LinearWithMipmapsAnisotropic = 5

The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

Max = 6

Represents the size of the BaseMaterial3D.TextureFilterEnum enum.

Nearest = 0

The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).

NearestWithMipmaps = 2

The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look pixelated from up close, and smooth from a distance.

NearestWithMipmapsAnisotropic = 4

The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

BaseMaterial3D.TextureParam

ValueDescription
Albedo = 0

Texture specifying per-pixel color.

AmbientOcclusion = 8

Texture specifying per-pixel ambient occlusion value.

Backlight = 12

Texture specifying per-pixel backlight color.

BentNormal = 18

Texture specifying per-pixel bent normal vector.

Clearcoat = 6

Texture specifying per-pixel clearcoat value.

DetailAlbedo = 15

Texture specifying per-pixel detail color.

DetailMask = 14

Texture specifying per-pixel detail mask blending value.

DetailNormal = 16

Texture specifying per-pixel detail normal.

Emission = 3

Texture specifying per-pixel emission color.

Flowmap = 7

Texture specifying per-pixel flowmap direction for use with BaseMaterial3D.Anisotropy.

Heightmap = 9

Texture specifying per-pixel height.

Max = 19

Represents the size of the BaseMaterial3D.TextureParam enum.

Metallic = 1

Texture specifying per-pixel metallic value.

Normal = 4

Texture specifying per-pixel normal vector.

Orm = 17

Texture holding ambient occlusion, roughness, and metallic.

Refraction = 13

Texture specifying per-pixel refraction strength.

Rim = 5

Texture specifying per-pixel rim value.

Roughness = 2

Texture specifying per-pixel roughness value.

SubsurfaceScattering = 10

Texture specifying per-pixel subsurface scattering.

SubsurfaceTransmittance = 11

Texture specifying per-pixel transmittance for subsurface scattering.

BaseMaterial3D.TransparencyEnum

ValueDescription
Alpha = 1

The material will use the texture's alpha values for transparency. This is the slowest to render, and disables shadow casting.

AlphaDepthPrePass = 4

The material will use the texture's alpha value for transparency, but will discard fragments with an alpha of less than 0.99 during the depth prepass and fragments with an alpha less than 0.1 during the shadow pass. This also supports casting shadows.

AlphaHash = 3

The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. Alpha hashing is suited for hair rendering.

AlphaScissor = 2

The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendered in the depth prepass. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. For textures using this mode see the Preserve Alpha Test Coverage option in the texture import settings to improve distant rendering and popping.

Disabled = 0

The material will not use transparency. This is the fastest to render.

Max = 5

Represents the size of the BaseMaterial3D.TransparencyEnum enum.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.