RdlCurveGeometry

Overview

RdlCurveGeometry generates curves defined by the node’s parameters.

The example below generates three curves of varying color and radius.

colorData = UserData("colorData") {
    ["color_key"] = "Cd",
    ["color_values_0"] = { 
        Rgb(1.0, 0.0, 0.0),
        Rgb(0.0, 1.0, 0.0),
        Rgb(0.0, 0.0, 1.0),
    },
}

curves1 = RdlCurveGeometry("curves1") {
    ["curve_type"] = "bspline",
    ["curves_subtype"] = "ray_facing",
    ["tessellation_rate"] = 12,
    ["curves_vertex_count"] = { 6, 6, 6 },
    ["vertex_list_0"] = {
        Vec3(0.2, 0.0, 0.0),
        Vec3(0.2, 0.0, 0.0),
        Vec3(-0.2, 0.25, 0.0),
        Vec3(0.2, 0.5, 0.0),
        Vec3(-0.2, 0.75, 0.0),
        Vec3(0.2, 1.0, 0.0),

        Vec3(0.25, 0.0, 0.0),
        Vec3(0.25, 0.0, 0.0),
        Vec3(0.25, 0.25, 0.25),
        Vec3(0.25, 0.5, -0.25),
        Vec3(0.25, 0.75, 0.25),
        Vec3(0.25, 1.0, -0.25),

        Vec3(0.5, 0.0, 0.0),
        Vec3(0.5, 0.0, 0.0),
        Vec3(0.7, 0.25, -0.4),
        Vec3(0.5, 0.5, 0.0),
        Vec3(0.5, 0.75, -0.4),
        Vec3(0.9, 1.0, 0.0),
    },
    ["radius_list"] = {
        0.03, 0.04, 0.05
    },
    ["primitive_attributes"] = { colorData, },
}

The curves can be rendered as ray_facing as in the above example or round

ray_facing round


Attribute Reference

Curve attributes

tessellation_rate

Int
default: 4

Number of segments to split curve spans into

Curves attributes

curve_type

Int enum
  0 = “linear”
  1 = “bezier” (default)
  2 = “bspline”

Curve interpolation type is linear, bezier, or bspline

curves_vertex_count

IntVector
default: {}

List of vertices per curve

part_indices

IntVector
default: {}

List of part indices. No index should have a value greater than the size of 'curves_vertex_count'

part_list

StringVector
default: {}

List of part names, used in conjunction with 'part_indices' to assign per-part materials

radius_list

FloatVector
default: {}

List of radius values. The rate will be determined based on the number of values. A single value will be interpreted as constant. If the number of values matches the number of curves, the rate will be interpreted as uniform. If the number of values matches the number of vertices, the rate will be interpreted as vertex.

uv_list

Vec2fVector
default: {}

If the curves are using UVs, store them per-curve in this list

vertex_list_0

Vec3fVector
default: {}

List of vertex positions used by the curves at motion step 0

vertex_list_1

Vec3fVector
default: {}

If the curves are in motion, the vertex positions for the second motion step are stored in this attribute

Geometry attributes

reverse_normals

Bool
default: False

enable to reverse the normals in the geometry

side_type

Int enum
  0 = “force two-sided” (default)
  1 = “force single-sided”
  2 = “use mesh sidedness”

set single sidedness of the mesh, will affect the visibility of the mesh based on normal direction

Labels attributes

label

String
default:

label used in material aov expresssions

shadow_receiver_label

String
default:

Label used to associate Geometry objects into ShadowReceiverSets. Using this in combination with the ["shadow_exclusion_mappings"] attribute, shadows from specified geometries or their parts can be suppressed from casting shadows onto one or more specified sets.

Motion Blur attributes

accleration_list

Vec3fVector
default: {}

Optionally declared vertex accelerations for quadratic motion interpolation

curved_motion_blur_sample_count

Int
default: 10

Number of time samples generated along each curve when using curved motion blur

motion_blur_type

Int enum
  -1 = “best” (default)
  0 = “static”
  1 = “velocity”
  2 = “frame delta”
  3 = “acceleration”
  4 = “hermite”

Motion blur type for PolygonMesh/Points/Curves.
"static" will treat the mesh as static.
"velocity" will blur using the supplied vertex positions and velocities.
"frame delta" will interpolate between the two supplied vertex positions.
"acceleration" will blur using the supplied vertex positions, velocities and accelerations.
"hermite" will use supplied pair of positions and pair of velocities to interpolate along a cubic Hermite curve.
"best" will use choose the method which provides the highest quality given the available data.

primitive_attribute_frame

Int enum
  0 = “first motion step”
  1 = “second motion step”
  2 = “both motion steps” (default)

Which frame(s) do we take the primitive attributes from?
 O : first motion step
 1 : second motion step
 2 : both motion steps

use_rotation_motion_blur

Bool
default: False

If "xform" is time varying and motion blur is enabled, enabling this feature can produce a curved rotation trail. Enabling this feature will disable adaptive tessellation for this mesh

velocity_list_0

Vec3fVector
default: {}

Optionally declared explicit vertex velocities to use instead of vertex positions from a second motion step'

velocity_list_1

Vec3fVector
default: {}

Optionally declared second set of vertex velocities together with vertex positions from the second motion step for cubic motion interpolation

velocity_scale

Float
default: 1.0

Adjusts magnitude of velocity-based motion blur

Ray Tracing attributes

ray_epsilon

Float
default: 0.0

When a secondary ray is fired, anything within this distance of the intersection point will be ignored. Instead, it is considered part of the current intersection's geometry. If zero, an automatically calculated epsilon will be used.

shadow_ray_epsilon

Float
default: 0.0

When a shadow ray is fired, anything within this distance of the intersection point will be ignored. If this value is less than "ray_epsilon", then it has no additional effect.

User Data attributes

primitive_attributes

SceneObject Vector
default: {}

Vector of UserData. Each key/value pair will be added as a primitive attribute of the curves.

Visibility attributes

visible_diffuse_reflection

Bool
default: True

whether the geometry is visible in diffuse reflection

visible_diffuse_transmission

Bool
default: True

whether the geometry is visible in diffuse transmission

visible_glossy_reflection

Bool
default: True

whether the geometry is visible in glossy reflection.

visible_glossy_transmission

Bool
default: True

whether the geometry is visible in glossy transmission (refraction).

visible_in_camera

Bool
default: True

whether the geometry is visible to camera rays

visible_mirror_reflection

Bool
default: True

whether the geometry is visible in miror reflection.

visible_mirror_transmission

Bool
default: True

whether the geometry is visible in miror transmission (refraction).

visible_shadow

Bool
default: True

whether the geometry casts shadows

visible_volume

Bool
default: True

whether the geometry is visible in indirect volume rays

General attributes

contains_camera

Bool
default: False

Specifies whether the geometry contains the camera and should be used for IOR tracking. This should not be changed by the user -- they should instead attach the relevant geometry to the camera, which will then flag this geometry.

curves_subtype

Int enum
  0 = “ray_facing” (default)
  1 = “round”
  2 = “normal_oriented”

Selects the style the curves are rendered

dicing_camera

SceneObject
default: None

Alternate camera that is used for adaptive tessellation. This is useful if you want adaptive tessellation to behave consistently in a sequence, regardless of what the main camera is doing

node_xform

Mat4d blurrable
default: [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]

The 4x4 matrix describing the transformation from local space to world space.

references

Geometry Vector
default: {}

list of geometries that geometry procedural can reference during procedural generate/update stages. For example, an instancer geometry procedural can instance primitives generated by the reference geometry procedural.

shadow_exclusion_mappings

String
default:

A space-separated list of mappings of the form A:B where:
A is a comma-separated list of names of parts of this Geometry, or an asterisk to specify the whole geometry;
B is a comma-separated list of shadow receiver set labels established using the ["shadow_receiver_label"] attribute, or an asterisk to specify to all such sets in the scene.
For each of the listed mappings, shadows from the parts specified in A will be suppressed from casting onto any geometries in the ShadowReceiverSets specified in B.
**Note: no part name should appear more than once in the string, otherwise the behavior is undefined.**

static

Bool
default: True

disable if the geometry will be updated between frames

use_explicit_shading_attributes

Bool
default: False

Enable the use of explicit shading attributes (N, dPds, dPdt) if they are present

use_local_camera_motion_blur

Bool
default: False

Enables experimental feature that also attempts to remove the camera blur in the local regions

use_local_motion_blur

Bool
default: False

Enables the local motion blur feature, which makes the geometry procedural responsible for handling all of the geometry's motion and allows for custom effects