Skip to main content

4. Node Reference

Below are the Node types that are officially recognized by the UBF Specification. Included are the expected inputs and outputs for each Node type, and notes about dynamic inputs and generic types where relevant.

Some nodes have dynamic inputs. Some dynamic inputs can be repeated, with the name ending in .[n]. In this case, the input can be repeated any number of times, as long as the value of n is different (usually incrementing numbers, but specified for each node). The other type of dynamic inputs are where the Port ID is not declared, but should correspond to a value. This is represented by {value}. Each node will describe what that value should evaluate to. These can also be repeated, with different values.

4.1. Arrays

4.1.1. AtIndex

Returns an array element at the specified index.

type: AtIndex
inputs:
- id: Array
type: Array<T>,
- id: Index
type: int
outputs:
- id: Element
type: T
Generic Constraints
T: Any

4.1.2. First

Returns the first element of an Array.

type: First
inputs:
- id: Array
type: Array<T>
outputs:
- id: Element
type: T
Generic Constraints
T: Any

4.1.3. ForEach

Iterates over all elements in an Array.

type: ForEach
inputs:
- id: Exec
type: exec,
- id: Array
type: Array<T>
outputs:
- id: Exec
type: exec,
- id: Loop Body
type: exec,
- id: Array Element
type: T,
- id: Array Index
type: int
Generic Constraints
T: Any

4.1.4. MakeArray

Creates an Array from a list of elements.

type: MakeArray
inputs:
- id: Item.[n]
type: T
outputs:
- id: Array
type: Array<T>
Generic Constraints
T: Any
info

where [n] starts at 1. Any number of inputs can be added, as long as each one increments [n] by 1.

4.2. Control

4.2.1. Entry

The start of execution flow in the Blueprint.

type: Entry
inputs: None
outputs:
- id: Exec
type: exec

4.2.2. ExecuteBlueprint2

Runs another blueprint with the provided inputs.

type: ExecuteBlueprint2
inputs:
- id: Exec
type: exec,
- id: Blueprint
type: Resource<Blueprint>,
- id: {Binding ID}
type: unknown
outputs:
- id: Exec
type: exec,
- id: {Binding ID}
type: unknown
info

For the Inputs and Outputs of this node, the Port IDs should match the Inputs and Outputs respectively of the blueprint that is being run. Any values that are assigned to the Inputs should be passed in as the corresponding Inputs to the Blueprint, and any Output that the Blueprint produces should be forwarded to the corresponding Outputs of this node.

4.3. Debug

4.3.1. DebugLog

Outputs a message to the console.

type: DebugLog
inputs:
- id: Exec
type: exec,
- id: Message
type: string
outputs:
- id: Exec
type: exec

4.4. Functions

4.4.1. Fn

Call a function that is defined in the functions section of the Blueprint.

type: Fn
inputs:
- id: Exec
type: exec,
- id: Graph
type: string,
- id: {Function Binding ID}
type: unknown
outputs:
- id: Exec
type: exec,
- id: {Function Binding ID}
type: unknown
info

The inputs and outputs of this node correspond to the Function inputs and outputs. The inputs are passed into the function, and function outputs are forwared to this node's outputs. The Graph input corresponds to the ID of the function to call

4.5. Literals

4.5.1. BoolLiteral

Represents a true or false value.

type: BoolLiteral
inputs:
- id: Value
type: boolean
outputs:
- id: Bool
type: boolean

4.5.2. ColorLiteral

Represents an RGBA color.

type: ColorLiteral
inputs:
- id: R
type: float,
- id: G
type: float,
- id: B
type: float,
- id: A
type: float
outputs:
- id: Color
type: Color
info

RGBA values are from 0-1

4.5.3. FloatLiteral

Represents a floating point number.

type: FloatLiteral
inputs:
- id: Value
type: float
outputs:
- id: Float
type: float

4.5.4. IntLiteral

Represents an integer value.

type: IntLiteral
inputs:
- id: Value
type: int
outputs:
- id: Int
type: int

4.5.5. StringLiteral

Represents a string value.

type: StringLiteral
inputs:
- id: Value
type: string
outputs:
- id: String
type: string

4.6. Logic

4.6.1. And

Returns true if both of the inputs are true.

type: And
inputs:
- id: A
type: boolean,
- id: B
type: boolean
outputs:
- id: Result
type: boolean

4.6.2. Branch

Execution follows one of the paths based on a true or false value.

type: Branch
inputs:
- id: Exec
type: exec,
- id: Condition
type: boolean
outputs:
- id: True
type: exec,
- id: False
type: exec

4.6.3. Equals

Returns true if both inputs are the same.

type: Equals
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Result
type: boolean
Generic Constraints
T: string, int, float, boolean

4.6.4. GreaterThan

Returns true if A is higher than B.

type: GreaterThan
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Result
type: boolean
Generic Constraints
T: int, float

4.6.5. GreaterThanOrEqual

Returns true if A is higher or the same as B.

type: GreaterThanOrEqual
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Result
type: boolean
Generic Constraints
T: int, float

4.6.6. IsNull

Returns true if the input is null.

type: IsNull
inputs:
- id: Value
type: T
outputs:
- id: IsNull
type: boolean
Generic Constraints
T: Material, Resource<Blueprint>, Resource<Mesh>, Resource<Texture>, MeshConfig, MeshRenderer, SceneNode

4.6.7. LessThan

Returns true if A is lower than B.

type: LessThan
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Result
type: boolean
Generic Constraints
T: int, float

4.6.8. LessThanOrEquals

Returns true if A is lower or the same as B.

type: LessThanOrEquals
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Result
type: boolean
Generic Constraints
T: int, float

4.6.9. MapValue

Converts values of one type into another.

type: MapValue
inputs:
- id: Value
type: T,
- id: Default
type: T,
- id: Input.[n]
type: T,
- id: Output.[n]
type: U
outputs:
- id: Output
type: U
Generic Constraints
T: Any
U: Any
info

Where [n] starts at 1. Any number of Input.[n]/Output.[n] pairs can be added, as long as [n] is incremented by 1.

warning

Each Input.[n] input must be accompanied by an Output.[n] input.

4.6.10. Not

Returns the opposite of the input.

type: Not
inputs:
- id: A
type: boolean
outputs:
- id: Result
type: boolean

4.6.11. NotEquals

Returns true if both inputs are different.

type: NotEquals
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Result
type: boolean
Generic Constraints
T: string, int, float, boolean

4.6.12. Or

Returns true if at least one of the inputs is true.

type: Or
inputs:
- id: A
type: boolean,
- id: B
type: boolean
outputs:
- id: Result
type: boolean

4.6.13. Pick

Returns one of two options based on a boolean value.

type: Pick
inputs:
- id: A
type: T,
- id: B
type: T,
- id: Pick A?
type: boolean
outputs:
- id: Value
type: T
Generic Constraints
T: Any

4.6.14. Xor

Returns true if only one of the inputs is true.

type: Xor
inputs:
- id: A
type: boolean,
- id: B
type: boolean
outputs:
- id: Result
type: boolean

4.7. Materials

4.7.1. ApplyMaterial

Applies a Material to a Mesh.

type: ApplyMaterial
inputs:
- id: Exec
type: exec,
- id: Index
type: int,
- id: Renderer
type: MeshRenderer,
- id: Material
type: Material
outputs:
- id: Exec
type: exec

4.7.2. MakeFurMaterial

Returns a material based on a fur shader.

type: MakeFurMaterial
inputs:
- id: Render Mode
type: string,
- id: Diffuse Texture
type: Resource<Texture>,
- id: Base Color
type: Color,
- id: Use Alpha
type: boolean,
- id: Fresnel_IOR
type: float,
- id: Opacity
type: float,
- id: Use Emission
type: boolean,
- id: Use Emissive Tint
type: boolean,
- id: Emissive Tex
type: Resource<Texture>,
- id: Emissive Color Boost
type: float,
- id: Emissive Tint
type: Color,
- id: Emissive Tint Boost
type: float,
- id: Use Normal Map
type: boolean,
- id: Normal Tex
type: Resource<Texture>,
- id: Use ORM
type: boolean,
- id: ORM
type: Resource<Texture>,
- id: Occlusion
type: float,
- id: Roughness
type: float,
- id: Metallic
type: float,
- id: Height Map
type: Resource<Texture>,
- id: Id Map
type: Resource<Texture>
outputs:
- id: Material
type: Material

4.7.3. MakeHairMaterial

Returns a material based on a hair shader.

type: MakeHairMaterial
inputs:
- id: Render Mode
type: string,
- id: AlphaTex
type: Resource<Texture>,
- id: UseAlphaTex
type: boolean,
- id: Diffuse Texture
type: Resource<Texture>,
- id: Base Color
type: Color,
- id: Use Alpha
type: boolean,
- id: Fresnel_IOR
type: float,
- id: Opacity
type: float,
- id: Use Emission
type: boolean,
- id: Use Emissive Tint
type: boolean,
- id: Emissive Tex
type: Resource<Texture>,
- id: Emissive Color Boost
type: float,
- id: Emissive Tint
type: Color,
- id: Emissive Tint Boost
type: float,
- id: Use Normal Map
type: boolean,
- id: Normal Tex
type: Resource<Texture>,
- id: Use ORM
type: boolean,
- id: ORM
type: Resource<Texture>,
- id: Occlusion
type: float,
- id: Roughness
type: float,
- id: Metallic
type: float
outputs:
- id: Material
type: Material

4.7.4. MakePBRMaterial

Returns a material based on a PBR shader.

type: MakePBRMaterial
inputs:
- id: Render Mode
type: string,
- id: AlphaTex
type: Resource<Texture>,
- id: UseAlphaTex
type: boolean,
- id: Diffuse Texture
type: Resource<Texture>,
- id: Base Color
type: Color,
- id: Use Alpha
type: boolean,
- id: Fresnel_IOR
type: float,
- id: Opacity
type: float,
- id: Use Emission
type: boolean,
- id: Use Emissive Tint
type: boolean,
- id: Emissive Tex
type: Resource<Texture>,
- id: Emissive Color Boost
type: float,
- id: Emissive Tint
type: Color,
- id: Emissive Tint Boost
type: float,
- id: Use Normal Map
type: boolean,
- id: Normal Tex
type: Resource<Texture>,
- id: Use ORM
type: boolean,
- id: ORM
type: Resource<Texture>,
- id: Occlusion
type: float,
- id: Roughness
type: float,
- id: Metallic
type: float
outputs:
- id: Material
type: Material
info

Render Mode must be equal to one of the three following values: UseDiffuse, SolidColor, or VertexColor

4.7.5. MakeSkinMaterial

Returns a material based on a specialized skin shader.

type: MakeSkinMaterial
inputs:
- id: GCLS Tex
type: Resource<Texture>,
- id: Normal Tex
type: Resource<Texture>,
- id: ORS Tex
type: Resource<Texture>,
- id: Skin Color
type: Color,
- id: Redness
type: Color,
- id: Lip Color
type: Color,
- id: Skin Variation
type: float,
- id: Dark Area Hue
type: float,
- id: Dark Area Saturation
type: float,
- id: Dark Area Value
type: float,
- id: Roughness Strength
type: float,
- id: AO Strength
type: float,
- id: Buzzcut Tex
type: Resource<Texture>,
- id: Stubble Tex
type: Resource<Texture>,
- id: Freckles Tex
type: Resource<Texture>,
- id: Moles Tex
type: Resource<Texture>,
- id: Scars Tex
type: Resource<Texture>,
- id: Hair Color
type: Color,
- id: Freckle Color
type: Color,
- id: Mole Color
type: Color,
- id: Scar Color
type: Color,
- id: Stubble Growth
type: float,
- id: Stubble Contrast
type: float,
- id: Mole Normal Strength
type: float,
- id: Scar Color Contrast
type: float,
- id: Scar Color Falloff
type: float,
- id: Scar Normal Strength
type: float
outputs:
- id: Material
type: Material

4.7.6. SetTextureSettings

Configures properties for a given texture resource.

type: SetTextureSettings
inputs:
- id: Texture Resource
type: Resource<Texture>,
- id: sRGB
type: boolean
outputs:
- id: Texture
type: Resource<Texture>

4.8. Math

4.8.1. Add

Returns the sum of two numbers.

type: Add
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Value
type: T
Generic Constraints
T: int, float

4.8.2. Multiply

Returns the product of A and B.

type: Multiply
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Value
type: T
Generic Constraints
T: int, float

4.8.3. Subtract

Returns the result of A - B.

type: Subtract
inputs:
- id: A
type: T,
- id: B
type: T
outputs:
- id: Value
type: T
Generic Constraints
T: int, float

4.9. Parsing

4.9.1. DeserializeJson

Converts a string into a JSON object.

type: DeserializeJson
inputs:
- id: String
type: string
outputs:
- id: Json
type: Json,
- id: Success
type: boolean

4.9.2. GetJsonArrayAttribute

Retrieves an array at the specified path from a JSON object.

type: GetJsonArrayAttribute
inputs:
- id: Json
type: Json,
- id: AttributePath
type: string
outputs:
- id: Value
type: Array<Json>
info

The AttributePath input must be a series of property names separated by a .. To specify an array element, use [x], where x is the 0-based index of the element to retrieve. For example, for this JSON object:

{
  "Property": {
    "Array": [
      {
        "Object": {
          "Hello": "World"
        }
      }
    ]
  }
}

To retrieve the value of Object, you would supply the AttributePath Property.Array.[0]

4.9.3. GetJsonBoolAttribute

Retrieves a boolean value at the specified path from a JSON object.

type: GetJsonBoolAttribute
inputs:
- id: Json
type: Json,
- id: AttributePath
type: string
outputs:
- id: Value
type: boolean
info

The AttributePath input must be a series of property names separated by a .. To specify an array element, use [x], where x is the 0-based index of the element to retrieve. For example, for this JSON object:

{
  "Property": {
    "Array": [
      {
        "Object": {
          "Bool": false
        }
      }
    ]
  }
}

To retrieve the value of Bool, you would supply the AttributePath Property.Array.[0].Bool

4.9.4. GetJsonFloatAttribute

Retrieves a float value at the specified path from a JSON object.

type: GetJsonFloatAttribute
inputs:
- id: Json
type: Json,
- id: AttributePath
type: string
outputs:
- id: Value
type: float
info

The AttributePath input must be a series of property names separated by a .. To specify an array element, use [x], where x is the 0-based index of the element to retrieve. For example, for this JSON object:

{
  "Property": {
    "Array": [
      {
        "Object": {
          "Float": 1.5
        }
      }
    ]
  }
}

To retrieve the value of Float, you would supply the AttributePath Property.Array.[0].Float

4.9.5. GetJsonIntAttribute

Retrieves an int value at the specified path from a JSON object.

type: GetJsonIntAttribute
inputs:
- id: Json
type: Json,
- id: AttributePath
type: string
outputs:
- id: Value
type: int
info

The AttributePath input must be a series of property names separated by a .. To specify an array element, use [x], where x is the 0-based index of the element to retrieve. For example, for this JSON object:

{
  "Property": {
    "Array": [
      {
        "Object": {
          "Integer": 1
        }
      }
    ]
  }
}

To retrieve the value of Integer, you would supply the AttributePath Property.Array.[0].Integer

4.9.6. GetJsonObjectAttribute

Retrieves an object at the specified path from a JSON object.

type: GetJsonObjectAttribute
inputs:
- id: Json
type: Json,
- id: AttributePath
type: string
outputs:
- id: Value
type: Json
info

The AttributePath input must be a series of property names separated by a .. To specify an array element, use [x], where x is the 0-based index of the element to retrieve. For example, for this JSON object:

{
  "Property": {
    "Array": [
      {
        "Object": {}
      }
    ]
  }
}

To retrieve the value of Array, you would supply the AttributePath Property.Array

4.9.7. GetJsonStringAttribute

Retrieves a string value at the specified path from a JSON object.

type: GetJsonStringAttribute
inputs:
- id: Json
type: Json,
- id: AttributePath
type: string
outputs:
- id: Value
type: string
info

The AttributePath input must be a series of property names separated by a .. To specify an array element, use [x], where x is the 0-based index of the element to retrieve. For example, for this JSON object:

{
  "Property": {
    "Array": [
      {
        "Object": {
          "String": "Hello!"
        }
      }
    ]
  }
}

To retrieve the value of String, you would supply the AttributePath Property.Array.[0].String

4.9.8. ParseBool

Attempts to parse a boolean value from a string.

type: ParseBool
inputs:
- id: Input
type: string
outputs:
- id: Output
type: boolean

4.9.9. ParseFloat

Attempts to parse a float value from a string.

type: ParseFloat
inputs:
- id: Input
type: string
outputs:
- id: Output
type: float

4.9.10. ParseInt

Attempts to parse an integer value from a string.

type: ParseInt
inputs:
- id: Input
type: string
outputs:
- id: Output
type: int

4.10. Scene

4.10.1. BindMeshes

Sets the bones of provided meshes to match the bones of another. This allows the meshes to follow the original's animations.

type: BindMeshes
inputs:
- id: Exec
type: exec,
- id: Mesh
type: Array<MeshRenderer>,
- id: Skeleton
type: MeshRenderer
outputs:
- id: Exec
type: exec

4.10.2. CreateMeshConfig

Creates a MeshConfig object based on a given mesh.

type: CreateMeshConfig
inputs:
- id: Exec
type: exec,
- id: Resource
type: Resource<Mesh>,
- id: ConfigOverrideKey
type: string
outputs:
- id: Exec
type: exec,
- id: MeshConfig
type: MeshConfig
info

ConfigOverrideKey should be provided when there is no existing Mesh that can be passed to the Resource input. At that point, it is on the Interpreter to provide a MeshConfig object that corresponds to that key.

4.10.3. CreateSceneNode

Instantiates a new SceneNode.

type: CreateSceneNode
inputs:
- id: Exec
type: exec,
- id: Name
type: string,
- id: Parent
type: SceneNode
outputs:
- id: Exec
type: exec,
- id: Node
type: SceneNode
info

If no Parent input is provided, or the input is a null value, the Interpreter should provide a default.

4.10.4. FindRenderer

Returns the first MeshRenderer in an Array with the given name.

type: FindRenderer
inputs:
- id: Array
type: Array<MeshRenderer>,
- id: Name
type: string
outputs:
- id: Renderer
type: MeshRenderer

4.10.5. FindSceneNodes

Returns an Array of SceneNodes whose names match or partially match the given string filter.

type: FindSceneNodes
inputs:
- id: Root
type: SceneNode,
- id: Filter
type: string
outputs:
- id: Nodes
type: Array<SceneNode>

4.10.6. SetBlendShape

Set the blend shape weight on a Mesh.

type: SetBlendShape
inputs:
- id: Exec
type: exec,
- id: Target
type: MeshRenderer,
- id: ID
type: string,
- id: Value
type: float
outputs:
- id: Exec
type: exec

4.10.7. SetSceneNodeEnabled

Set a SceneNode enabled or disabled based on a boolean input.

type: SetSceneNodeEnabled
inputs:
- id: Exec
type: exec,
- id: Node
type: SceneNode,
- id: Enabled
type: boolean
outputs:
- id: Exec
type: exec

4.10.8. SpawnMesh

Instantiates a Mesh in the scene.

type: SpawnMesh
inputs:
- id: Exec
type: exec,
- id: Resource
type: Resource<Mesh>,
- id: Parent
type: SceneNode,
- id: Config
type: MeshConfig
outputs:
- id: Exec
type: exec,
- id: Scene Nodes
type: Array<SceneNode>,
- id: Renderers
type: Array<MeshRenderer>

4.10.9. TransformPosition

Apply a position transform to a SceneNode.

type: TransformPosition
inputs:
- id: Exec
type: exec,
- id: Transform Object
type: SceneNode,
- id: Use World Space
type: boolean,
- id: Is Additive
type: boolean,
- id: Right
type: float,
- id: Up
type: float,
- id: Forward
type: float
outputs:
- id: Exec
type: exec

4.10.10. TransformRotation

Apply a rotation transform to a SceneNode.

type: TransformRotation
inputs:
- id: Exec
type: exec,
- id: Transform Object
type: SceneNode,
- id: Use World Space
type: boolean,
- id: Is Additive
type: boolean,
- id: Pitch
type: float,
- id: Yaw
type: float,
- id: Roll
type: float
outputs:
- id: Exec
type: exec

4.10.11. TransformScale

Apply a scale transform to a SceneNode.

type: TransformScale
inputs:
- id: Exec
type: exec,
- id: Transform Object
type: SceneNode,
- id: Is Additive
type: boolean,
- id: Right
type: float,
- id: Up
type: float,
- id: Forward
type: float
outputs:
- id: Exec
type: exec

4.11. Strings

4.11.1. Append

Concatenates two strings, and returns the result.

type: Append
inputs:
- id: A
type: string,
- id: B
type: string
outputs:
- id: String
type: string

4.11.2. Contains

Returns true if the provided string contains the substring.

type: Contains
inputs:
- id: String
type: string,
- id: Substring
type: string,
- id: IgnoreCase
type: boolean
outputs:
- id: Matches
type: boolean

4.11.3. FormatString

Returns the original string with instances of {x} replaced by the input at that index.

type: FormatString
inputs:
- id: Input
type: string,
- id: Item.[n]
type: string
outputs:
- id: Result
type: string
info

Example: Given the input string "Hello, {1}. My name is {2}", where Item.1 = "Fred" and Item.2 = "George", the Result string would be "Hello, Fred. My name is George".

4.11.4. Replace

Returns that input string with all instances of a given substring replaced with another.

type: Replace
inputs:
- id: Input
type: string,
- id: ToReplace
type: string,
- id: Replacement
type: string
outputs:
- id: Output
type: string

4.11.5. Split

Splits the string by the separator, and returns an array of the separated chunks.

type: Split
inputs:
- id: String
type: string,
- id: Separator
type: string
outputs:
- id: Array
type: Array<string>

4.11.6. ToLower

Returns the input string, with every character converted to lower case.

type: ToLower
inputs:
- id: Input
type: string
outputs:
- id: Output
type: string

4.11.7. ToString

Converts a value to its string representation.

type: ToString
inputs:
- id: Value
type: T
outputs:
- id: String
type: string
Generic Constraints
T: Any

4.11.8. ToUpper

Returns the original string with all letters capitalized.

type: ToUpper
inputs:
- id: Input
type: string
outputs:
- id: Output
type: string

4.12. Variables

4.12.1. Input

Returns the value of a Binding.

type: Input
inputs:
- id: Input
type: unknown
outputs:
- id: Value
type: T
Generic Constraints
T: Any
info

The value of the Input input should be the Binding ID of the Binding you want to retrieve the value of.

4.12.2. Output

Sets the value of all output Bindings.

type: Output
inputs:
- id: Exec
type: exec,
- id: Out.{Binding ID}
type: unknown
outputs:
- id: Exec
type: exec
info

Binding ID should match the id field of a Binding in your Blueprint. For the following Binding:

{    
  "id": "Example",
  "scope": "input",
  "type": "string",
  "value": "Hello, World!",
}

Then setting "Out.Example" as the id for the input should make the node set the value for this Binding. You can have multiple inputs that correspond to different Binding IDs, to set many values at the same time.

4.12.3. Set

Sets the value of a Binding.

type: Set
inputs:
- id: Exec
type: exec,
- id: Input
type: unknown,
- id: Value
type: unknown
outputs:
- id: Exec
type: exec