Tutorial Node: Role-Based Attributes

This is a tutorial node. It creates both an input and output attribute of every supported role-based data type. The values are modified in a simple way so that the compute modifies values.

Installation

To use this node enable omni.graph.tutorials in the Extension Manager.

Inputs

Name

Type

Descripton

Default

A Color3D (inputs:a_color3d)

colord[3]

This is an attribute interpreted as a double-precision 3d color

[0.0, 0.0, 0.0]

A Color3F (inputs:a_color3f)

colorf[3]

This is an attribute interpreted as a single-precision 3d color

[0.0, 0.0, 0.0]

A Color3H (inputs:a_color3h)

colorh[3]

This is an attribute interpreted as a half-precision 3d color

[0.0, 0.0, 0.0]

A Color4D (inputs:a_color4d)

colord[4]

This is an attribute interpreted as a double-precision 4d color

[0.0, 0.0, 0.0, 0.0]

A Color4F (inputs:a_color4f)

colorf[4]

This is an attribute interpreted as a single-precision 4d color

[0.0, 0.0, 0.0, 0.0]

A Color4H (inputs:a_color4h)

colorh[4]

This is an attribute interpreted as a half-precision 4d color

[0.0, 0.0, 0.0, 0.0]

A Frame (inputs:a_frame)

frame[4]

This is an attribute interpreted as a coordinate frame

[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]

A Matrix2D (inputs:a_matrix2d)

matrixd[2]

This is an attribute interpreted as a double-precision 2d matrix

[[1.0, 0.0], [0.0, 1.0]]

A Matrix3D (inputs:a_matrix3d)

matrixd[3]

This is an attribute interpreted as a double-precision 3d matrix

[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]

A Matrix4D (inputs:a_matrix4d)

matrixd[4]

This is an attribute interpreted as a double-precision 4d matrix

[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]

A Normal3D (inputs:a_normal3d)

normald[3]

This is an attribute interpreted as a double-precision 3d normal

[0.0, 0.0, 0.0]

A Normal3F (inputs:a_normal3f)

normalf[3]

This is an attribute interpreted as a single-precision 3d normal

[0.0, 0.0, 0.0]

A Normal3H (inputs:a_normal3h)

normalh[3]

This is an attribute interpreted as a half-precision 3d normal

[0.0, 0.0, 0.0]

A Point3D (inputs:a_point3d)

pointd[3]

This is an attribute interpreted as a double-precision 3d point

[0.0, 0.0, 0.0]

A Point3F (inputs:a_point3f)

pointf[3]

This is an attribute interpreted as a single-precision 3d point

[0.0, 0.0, 0.0]

A Point3H (inputs:a_point3h)

pointh[3]

This is an attribute interpreted as a half-precision 3d point

[0.0, 0.0, 0.0]

A Quatd (inputs:a_quatd)

quatd[4]

This is an attribute interpreted as a double-precision 4d quaternion

[0.0, 0.0, 0.0, 0.0]

A Quatf (inputs:a_quatf)

quatf[4]

This is an attribute interpreted as a single-precision 4d quaternion

[0.0, 0.0, 0.0, 0.0]

A Quath (inputs:a_quath)

quath[4]

This is an attribute interpreted as a half-precision 4d quaternion

[0.0, 0.0, 0.0, 0.0]

A Texcoord2D (inputs:a_texcoord2d)

texcoordd[2]

This is an attribute interpreted as a double-precision 2d texcoord

[0.0, 0.0]

A Texcoord2F (inputs:a_texcoord2f)

texcoordf[2]

This is an attribute interpreted as a single-precision 2d texcoord

[0.0, 0.0]

A Texcoord2H (inputs:a_texcoord2h)

texcoordh[2]

This is an attribute interpreted as a half-precision 2d texcoord

[0.0, 0.0]

A Texcoord3D (inputs:a_texcoord3d)

texcoordd[3]

This is an attribute interpreted as a double-precision 3d texcoord

[0.0, 0.0, 0.0]

A Texcoord3F (inputs:a_texcoord3f)

texcoordf[3]

This is an attribute interpreted as a single-precision 3d texcoord

[0.0, 0.0, 0.0]

A Texcoord3H (inputs:a_texcoord3h)

texcoordh[3]

This is an attribute interpreted as a half-precision 3d texcoord

[0.0, 0.0, 0.0]

A Timecode (inputs:a_timecode)

timecode

This is a computed attribute interpreted as a timecode

1.0

A Vector3D (inputs:a_vector3d)

vectord[3]

This is an attribute interpreted as a double-precision 3d vector

[0.0, 0.0, 0.0]

A Vector3F (inputs:a_vector3f)

vectorf[3]

This is an attribute interpreted as a single-precision 3d vector

[0.0, 0.0, 0.0]

A Vector3H (inputs:a_vector3h)

vectorh[3]

This is an attribute interpreted as a half-precision 3d vector

[0.0, 0.0, 0.0]

Outputs

Name

Type

Descripton

Default

A Color3D (outputs:a_color3d)

colord[3]

This is a computed attribute interpreted as a double-precision 3d color

None

A Color3F (outputs:a_color3f)

colorf[3]

This is a computed attribute interpreted as a single-precision 3d color

None

A Color3H (outputs:a_color3h)

colorh[3]

This is a computed attribute interpreted as a half-precision 3d color

None

A Color4D (outputs:a_color4d)

colord[4]

This is a computed attribute interpreted as a double-precision 4d color

None

A Color4F (outputs:a_color4f)

colorf[4]

This is a computed attribute interpreted as a single-precision 4d color

None

A Color4H (outputs:a_color4h)

colorh[4]

This is a computed attribute interpreted as a half-precision 4d color

None

A Frame (outputs:a_frame)

frame[4]

This is a computed attribute interpreted as a coordinate frame

None

A Matrix2D (outputs:a_matrix2d)

matrixd[2]

This is a computed attribute interpreted as a double-precision 2d matrix

None

A Matrix3D (outputs:a_matrix3d)

matrixd[3]

This is a computed attribute interpreted as a double-precision 3d matrix

None

A Matrix4D (outputs:a_matrix4d)

matrixd[4]

This is a computed attribute interpreted as a double-precision 4d matrix

None

A Normal3D (outputs:a_normal3d)

normald[3]

This is a computed attribute interpreted as a double-precision 3d normal

None

A Normal3F (outputs:a_normal3f)

normalf[3]

This is a computed attribute interpreted as a single-precision 3d normal

None

A Normal3H (outputs:a_normal3h)

normalh[3]

This is a computed attribute interpreted as a half-precision 3d normal

None

A Point3D (outputs:a_point3d)

pointd[3]

This is a computed attribute interpreted as a double-precision 3d point

None

A Point3F (outputs:a_point3f)

pointf[3]

This is a computed attribute interpreted as a single-precision 3d point

None

A Point3H (outputs:a_point3h)

pointh[3]

This is a computed attribute interpreted as a half-precision 3d point

None

A Quatd (outputs:a_quatd)

quatd[4]

This is a computed attribute interpreted as a double-precision 4d quaternion

None

A Quatf (outputs:a_quatf)

quatf[4]

This is a computed attribute interpreted as a single-precision 4d quaternion

None

A Quath (outputs:a_quath)

quath[4]

This is a computed attribute interpreted as a half-precision 4d quaternion

None

A Texcoord2D (outputs:a_texcoord2d)

texcoordd[2]

This is a computed attribute interpreted as a double-precision 2d texcoord

None

A Texcoord2F (outputs:a_texcoord2f)

texcoordf[2]

This is a computed attribute interpreted as a single-precision 2d texcoord

None

A Texcoord2H (outputs:a_texcoord2h)

texcoordh[2]

This is a computed attribute interpreted as a half-precision 2d texcoord

None

A Texcoord3D (outputs:a_texcoord3d)

texcoordd[3]

This is a computed attribute interpreted as a double-precision 3d texcoord

None

A Texcoord3F (outputs:a_texcoord3f)

texcoordf[3]

This is a computed attribute interpreted as a single-precision 3d texcoord

None

A Texcoord3H (outputs:a_texcoord3h)

texcoordh[3]

This is a computed attribute interpreted as a half-precision 3d texcoord

None

A Timecode (outputs:a_timecode)

timecode

This is a computed attribute interpreted as a timecode

None

A Vector3D (outputs:a_vector3d)

vectord[3]

This is a computed attribute interpreted as a double-precision 3d vector

None

A Vector3F (outputs:a_vector3f)

vectorf[3]

This is a computed attribute interpreted as a single-precision 3d vector

None

A Vector3H (outputs:a_vector3h)

vectorh[3]

This is a computed attribute interpreted as a half-precision 3d vector

None

Metadata

Name

Value

Unique ID

omni.graph.tutorials.RoleData

Version

1

Extension

omni.graph.tutorials

Icon

ogn/icons/omni.graph.tutorials.RoleData.svg

Has State?

False

Implementation Language

C++

Default Memory Type

cpu

Generated Code Exclusions

None

uiName

Tutorial Node: Role-Based Attributes

Categories

tutorials

Generated Class Name

OgnTutorialRoleDataDatabase

Python Module

omni.graph.tutorials

See the accompanying tutorial and annotated code at Tutorial 7 - Role-Based Data Node