basicMat

basicMat

material
basicMat
RayTK
v0.42

Material with a basic lighting model.

The material combines several elements to determine the color of a given surface point.

First, the base color uses the Basecolor parameter and optionally the Base Color Field input. Next, the specular color uses the color and relative position of the light. Third, the “Sky” color acts as a simple pseudo light, that uses the surface normal but doesn’t support shadows.

Parameters

Name Description Regular Handling Read-Only Handling
Enable
Base Color Runtime Baked
Sky Color

Color of the “sky” pseudo-light.

Runtime Baked
Sky Amount

Amount of “sky” light to apply.

Sky Direction

Vector of the direction where the “sky” light comes from.

Runtime Baked
Specular Amount

Amount of specular light color to apply.

Runtime Baked
Specular Exponent

Controls the sharpness of the specular color rolloff.

Runtime Baked
Enable Shadow

Whether to use shadows. If this is enabled, and the Shadow input is connected, that type of shadow is used. If it is enabled but that input is not connected, the default shadow is used.

Baked Baked
Use Local Position

Whether to use the “local” position relative to the input shape when looking up colors using the Base Color Field input. If enabled, the coordinates used for the color field will be “before” any downstream transformations are applied. When disabled, the final global position where a point ends up in the render is used instead.

Baked Baked
Use Surface Color Baked Baked
Apply When Runtime Baked
  • Always:
  • Only If Unassigned:

Inputs

  • SDF Shape: (required)
    • Coordinate Types: vec3
    • Context Types: Context
    • Return Types: Sdf
  • Base Color Field: (optional)
    • Coordinate Types: vec3
    • Context Types: MaterialContext
    • Return Types: float vec4
    • Supports Variables: lightcolor lightpos surfacecolor surfaceuv normal

Variables

  • Light Color:
  • Light Position:
  • Surface Color (r, g, b, is set):
  • Surface UV (u, v, w, is set):
  • Surface Normal: