nodes.shader.input

input

Classes

Name Description
AmbientOcclusion Compute how much the hemisphere above the shading point is occluded, for example to add weathering effects to corners.
Bevel Generates normals with round corners.
CameraData Retrieve information about the camera and how it relates to the current shading point’s position
Color A color picker
ColorAttribute Retrieve a color attribute, or the default fallback if none is specified
CurvesInfo Retrieve hair curve information
Fresnel Produce a blending factor depending on the angle between the surface normal and the view direction using Fresnel equations.
Geometry Retrieve geometric information about the current shading point
LayerWeight Produce a blending factor depending on the angle between the surface normal and the view direction.
LightPath Retrieve the type of incoming ray for which the shader is being executed.
ObjectInfo Retrieve information about the object instance
ParticleInfo Retrieve the data of the particle that spawned the object instance, for example to give variation to multiple instances of an object
PointInfo Retrieve information about points in a point cloud
Tangent Generate a tangent direction for the Anisotropic BSDF
TextureCoordinate Retrieve multiple types of texture coordinates.
UVAlongStroke UV coordinates that map a texture along the stroke length
UVMap Retrieve a UV map from the geometry, or the default fallback if none is specified
Wireframe Retrieve the edges of an object as it appears to Cycles.

AmbientOcclusion

AmbientOcclusion(
    color=None,
    distance=1.0,
    normal=None,
    *,
    samples=0,
    inside=False,
    only_local=False,
)
Compute how much the hemisphere above the shading point is occluded, for example to add weathering effects to corners.

Note: For Cycles, this may slow down renders significantly

Parameters

color : InputColor
    Color
distance : InputFloat
    Distance
normal : InputVector
    Normal

Inputs

i.color : ColorSocket
    Color
i.distance : FloatSocket
    Distance
i.normal : VectorSocket
    Normal

Outputs

o.color : ColorSocket
    Color
o.ao : FloatSocket
    AO

Attributes

Name Description
i
inputs
inside
name
node
o
only_local
outputs
samples
tree
type

Bevel

Bevel(radius=0.05, normal=None, *, samples=0)
Generates normals with round corners.

Note: only supported in Cycles, and may slow down renders

Parameters

radius : InputFloat
    Radius
normal : InputVector
    Normal

Inputs

i.radius : FloatSocket
    Radius
i.normal : VectorSocket
    Normal

Outputs

o.normal : VectorSocket
    Normal

Attributes

Name Description
i
inputs
name
node
o
outputs
samples
tree
type

CameraData

CameraData()

Retrieve information about the camera and how it relates to the current shading point’s position

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

Outputs

Attribute Type Description
o.view_vector VectorSocket View Vector
o.view_z_depth FloatSocket View Z Depth
o.view_distance FloatSocket View Distance

Color

Color()

A color picker

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

Outputs

Attribute Type Description
o.color ColorSocket Color

ColorAttribute

ColorAttribute(layer_name='')

Retrieve a color attribute, or the default fallback if none is specified

Attributes

Name Description
i
inputs
layer_name
name
node
o
outputs
tree
type

Outputs

Attribute Type Description
o.color ColorSocket Color
o.alpha FloatSocket Alpha

CurvesInfo

CurvesInfo()

Retrieve hair curve information

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

Outputs

Attribute Type Description
o.is_strand FloatSocket Is Strand
o.intercept FloatSocket Intercept
o.length FloatSocket Length
o.thickness FloatSocket Thickness
o.tangent_normal VectorSocket Tangent Normal
o.random FloatSocket Random

Fresnel

Fresnel(ior=1.5, normal=None)
Produce a blending factor depending on the angle between the surface normal and the view direction using Fresnel equations.

Typically used for mixing reflections at grazing angles

Parameters

ior : InputFloat
    IOR
normal : InputVector
    Normal

Inputs

i.ior : FloatSocket
    IOR
i.normal : VectorSocket
    Normal

Outputs

o.fac : FloatSocket
    Factor

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

Geometry

Geometry()

Retrieve geometric information about the current shading point

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

Outputs

Attribute Type Description
o.position VectorSocket Position
o.normal VectorSocket Normal
o.tangent VectorSocket Tangent
o.true_normal VectorSocket True Normal
o.incoming VectorSocket Incoming
o.parametric VectorSocket Parametric
o.backfacing FloatSocket Backfacing
o.pointiness FloatSocket Pointiness
o.random_per_island FloatSocket Random Per Island

LayerWeight

LayerWeight(blend=0.5, normal=None)
Produce a blending factor depending on the angle between the surface normal and the view direction.

Typically used for layering shaders with the Mix Shader node

Parameters

blend : InputFloat
    Blend
normal : InputVector
    Normal

Inputs

i.blend : FloatSocket
    Blend
i.normal : VectorSocket
    Normal

Outputs

o.fresnel : FloatSocket
    Fresnel
o.facing : FloatSocket
    Facing

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

LightPath

LightPath()
Retrieve the type of incoming ray for which the shader is being executed.

Typically used for non-physically-based tricks

Outputs

o.is_camera_ray : FloatSocket
    Is Camera Ray
o.is_shadow_ray : FloatSocket
    Is Shadow Ray
o.is_diffuse_ray : FloatSocket
    Is Diffuse Ray
o.is_glossy_ray : FloatSocket
    Is Glossy Ray
o.is_singular_ray : FloatSocket
    Is Singular Ray
o.is_reflection_ray : FloatSocket
    Is Reflection Ray
o.is_transmission_ray : FloatSocket
    Is Transmission Ray
o.is_volume_scatter_ray : FloatSocket
    Is Volume Scatter Ray
o.ray_length : FloatSocket
    Ray Length
o.ray_depth : FloatSocket
    Ray Depth
o.diffuse_depth : FloatSocket
    Diffuse Depth
o.glossy_depth : FloatSocket
    Glossy Depth
o.transparent_depth : FloatSocket
    Transparent Depth
o.transmission_depth : FloatSocket
    Transmission Depth
o.portal_depth : FloatSocket
    Portal Depth

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

ObjectInfo

ObjectInfo()

Retrieve information about the object instance

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

Outputs

Attribute Type Description
o.location VectorSocket Location
o.color ColorSocket Color
o.alpha FloatSocket Alpha
o.object_index FloatSocket Object Index
o.material_index FloatSocket Material Index
o.random FloatSocket Random

ParticleInfo

ParticleInfo()

Retrieve the data of the particle that spawned the object instance, for example to give variation to multiple instances of an object

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

Outputs

Attribute Type Description
o.index FloatSocket Index
o.random FloatSocket Random
o.age FloatSocket Age
o.lifetime FloatSocket Lifetime
o.location VectorSocket Location
o.size FloatSocket Size
o.velocity VectorSocket Velocity
o.angular_velocity VectorSocket Angular Velocity

PointInfo

PointInfo()

Retrieve information about points in a point cloud

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type

Outputs

Attribute Type Description
o.position VectorSocket Position
o.radius FloatSocket Radius
o.random FloatSocket Random

Tangent

Tangent(direction_type='RADIAL', axis='Z', uv_map='')

Generate a tangent direction for the Anisotropic BSDF

Attributes

Name Description
axis
direction_type
i
inputs
name
node
o
outputs
tree
type
uv_map

Outputs

Attribute Type Description
o.tangent VectorSocket Tangent

TextureCoordinate

TextureCoordinate(from_instancer=False)
Retrieve multiple types of texture coordinates.

Typically used as inputs for texture nodes

Outputs

o.generated : VectorSocket
    Generated
o.normal : VectorSocket
    Normal
o.uv : VectorSocket
    UV
o.object : VectorSocket
    Object
o.camera : VectorSocket
    Camera
o.window : VectorSocket
    Window
o.reflection : VectorSocket
    Reflection

Attributes

Name Description
from_instancer
i
inputs
name
node
o
outputs
tree
type

UVAlongStroke

UVAlongStroke(use_tips=False)

UV coordinates that map a texture along the stroke length

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type
use_tips

Outputs

Attribute Type Description
o.uv VectorSocket UV

UVMap

UVMap(from_instancer=False, uv_map='')

Retrieve a UV map from the geometry, or the default fallback if none is specified

Attributes

Name Description
from_instancer
i
inputs
name
node
o
outputs
tree
type
uv_map

Outputs

Attribute Type Description
o.uv VectorSocket UV

Wireframe

Wireframe(size=0.01, *, use_pixel_size=False)
Retrieve the edges of an object as it appears to Cycles.

Note: as meshes are triangulated before being processed by Cycles, topology will always appear triangulated

Parameters

size : InputFloat
    Size

Inputs

i.size : FloatSocket
    Size

Outputs

o.fac : FloatSocket
    Factor

Attributes

Name Description
i
inputs
name
node
o
outputs
tree
type
use_pixel_size