RampMap


Attribute Reference

Additional properties attributes

input_texture_coordinates

Vec3f bindable
default: [ 0, 0, 0 ]

Bind custom UV coordinates

uv_repeat

Vec2f
default: [ 1, 1 ]

Number of times to repeat the ramp pattern

uv_wave

Vec2f
default: [ 0, 0 ]

Creates waves which perturb the ramp pattern

wrap_type

Int enum
  0 = “wrap” (default)
  1 = “clamp”

Whether to repeat the ramp or maintain the color at each edge

Ramp Knot attributes

colors

RgbVector
default: [[ 0, 0, 0 ], [ 0.25, 0.25, 0.25 ], [ 0.75, 0.75, 0.75 ], [ 1, 1, 1 ]]

List of colors on the ramp

interpolations

IntVector
default: {}

None: 0 | Linear: 1 | Exponential Up: 2 | Exponential Down: 3 |
   Smooth: 4 | Catmull Rom: 5 | Monotone Cubic: 6

positions

FloatVector
default: {}

Color ramp

Ramp properties attributes

camera

Camera
default: None

Camera used to define camera and screen space

color_space

Int enum
  0 = “rgb” (default)
  1 = “hsv”
  2 = “hsl”

Color space to perform interpolation in

input

Float bindable
default: 1.0

Input signal for ramp, used when ramp type is set to input

object

Geometry
default: None

No documentation available

ramp_type

Int enum
  0 = “v” (default)
  1 = “u”
  2 = “diagonal”
  3 = “radial”
  4 = “circular”
  5 = “box”
  6 = “uxv”
  7 = “four corner”
  8 = “input”

Determines input signal / shape of the ramp

space

Int enum
  0 = “render” (default)
  1 = “camera”
  2 = “world”
  3 = “screen”
  4 = “object”
  5 = “reference”
  6 = “texture”

Only applies when 'texture coordinates' is set to 'default state coordinates'

General attributes

texture_coordinates

Int enum
  0 = “default state coordinates” (default)
  1 = “input texture coordinates”

Whether to read existing coordinates or bind custom ones


Examples

local planeGeom = MmGeometry("/Scene/geometry/planeGeom") {
    ["node xform"] = scale(2, 1, 1) * translate(-3, 1, 0),
    ["model"] = "plane_xy_unit.mm",
}

local rampMap0 = RampMap("/Scene/surfacing/rampMap0") {
    -- positions, colors, interpolations have same number of elements
    ["positions"] = { 0.0, 0.33, 0.5, 0.75, 1.0 },
    ["colors"] = { Rgb(0.9, 0.1, 0.1), Rgb(0.1, 0.025, 0.4), Rgb(0.8, 0.1, 0.2), Rgb(0.2, 0.8, 0.1), Rgb(0.1, 1.0, 1.0) },
    ["interpolations"] = { 1, 1, 1, 1, 1 },
    ["ramp type"] = 1,
    ["wrap type"] = 0,
    ["uv repeat"] = Vec2(1.5, 1.0),
    ["space"] = 6,
    ["object"] = planeGeom,
    ["color space"] = 2
}