From CAD Assembly to Digital Twin: A Complete Vehicle Workflow
Introduction
In this tutorial, we will walk through a complete vehicle workflow in RapidPipeline Twin Studio, using a sportbike CAD assembly as our example. The goal is to end up with a clean, lightweight and visually accurate 3D model that is ready for visualization purposes.
In this first chapter, we will focus on importing and tessellating the CAD model. Rather than tessellating everything in high detail right away, we will start with a quick, coarse import and then selectively increase the quality only where it really matters – either manually, part by part, or in an automated way, using metadata and rules. Finally, we will inspect the result for tessellation issues and clean them up.
If you are new to tessellation in RapidPipeline Twin Studio, we recommend checking out the tessellation tutorial first, which explains the "adaptiveMesh" and "regularizedGrid" methods, as well as the resolution presets, in more detail.
This tutorial is written for RapidPipeline Twin Studio v0.9.10, available for download on our official portal: app.rapidpipeline.com/download.
Sample Files
These sample files are exclusively available for use with RapidPipeline tutorials and RapidPipeline showcases. Any further use (including, but not limited to commercial use, modifications, training, and other use cases than the aforementioned ones) requires a separate license from DGG, and from the creator of the original CAD model.
All sample files for this tutorial are available in the RapidPipeline Vehicle Workflow Files GitHub repository. To get started, download the sportbike CAD assembly:
- CAD assembly (Rhino .3dm): Sportbike_Colors-random.zip (~340 MB)
- Smaller version with a subset of the parts (Rhino .3dm): Sportbike_Colors-random_isolated.zip (~59 MB)
In addition, the model state at the end of each chapter is provided as a USD file, so you can also jump directly into any chapter.
Chapter 1: CAD Import & Tessellation
Importing the CAD Model
To get started, drag the CAD file Sportbike_Colors-random.3dm (see Sample Files) into RapidPipeline Twin Studio's 3D window (or use the "File" menu and choose "Import"). In the import dialog, use the following settings:
- Tessellation Method: "adaptiveMesh"
- Tessellation Resolution: "coarse"
- CAD Sewing: 0.05 (default)
- Convert Z- to Y-Up: enabled
Then press "Import". For a medium complex CAD assembly like this one, import and tessellation should take about 2–4 minutes, depending on your system hardware.
You might wonder why we chose the "coarse" resolution here. This is intentional: it minimizes the loading time and avoids over-tessellating this rather complex model. Since we can always re-tessellate individual parts later on, we only need to spend additional polygons on those parts that are actually important for visualization purposes.

Sportbike CAD model, imported with "adaptiveMesh" tessellation and the "coarse" resolution preset
By default, the resulting tessellated mesh is capped to 10 million faces during import, using decimation. This limit can be disabled in the import settings, if desired.
Re-Tessellating Parts
Now that our model is loaded, let's take a closer look. While the "coarse" preset works well for most of the bike, some parts – especially larger, smoothly curved surfaces – look noticeably faceted. Let's fix this by re-tessellating them with a higher resolution.

Selecting parts of the imported model for re-tessellation
Manual Approach
The simplest way is to select the parts manually and re-tessellate them. In our example, we select the following fuel tank parts and re-tessellate them using the "adaptiveMesh" method with the "extra fine" resolution preset, in order to achieve a less faceted geometry:
- 1579018_FUEL TANK_G01
- 1579027_FUEL TANK OUTER RING COVER_G01
- 1579029_FUEL TANK PLUG_G01
- 1579032_FUEL TANK LOGO COVER_G01

Fuel tank parts before re-tessellation

Fuel tank parts after re-tessellation with "adaptiveMesh" and the "extra fine" resolution preset
Automated Approach (via Metadata & Rules Widget)
Selecting parts by hand works fine for a handful of objects, but our bike contains lots of cylindrically shaped parts. Many of these can be re-tessellated with the "regularizedGrid" method, which results in cleaner and more easily editable geometry. Instead of selecting all of them manually, we can steer this much more efficiently by using automation rules together with the metadata stored in the CAD model:
- Open the rules widget: in the top panel, go to "View" and check "Rules". The rules widget will then be overlaid on top of the actions panel. Note that it is currently only displayed within the "MODEL" section.
- In the rules widget, create a new rule with a "Filter" on the metadata property
PART_NAME, using the valueFORK. - As the "Do" action, choose "Select (replace selection)". You can also find this rule in this RP Rules JSON File.
- Run the rule – all matching fork parts are now being re-tessellated with the "regularizedGrid" method and the "fine" resolution preset.
Show RP Rules JSON File
{
"name": "Sportbike_Colors-random_STEP1_2d",
"rules": [
{
"actions": [
{
"enabled": true,
"params": {
"grid_cell_size": 0,
"grid_resolution": 100,
"max_angle": 30,
"max_surface_deviation": 0.4,
"method": "regularized_grid",
"remove_t_junctions": false,
"resolution": "fine",
"sanity_check": false,
"sewing_tolerance": 0.05
},
"type": "retessellate"
}
],
"description": "",
"enabled": true,
"filters": [
{
"attribute": null,
"case_sensitive": false,
"enabled": true,
"include_descendants": false,
"invert": false,
"key": "PART_NAME",
"match": "contains",
"target": "metadata",
"value": "FORK"
}
],
"id": "7014a685dcea40e194b8c5262c7c63e6",
"name": "grid tessellate FORK"
}
],
"schema": "rpts.rules/1"
}

Rule setup in the rules widget, filtering parts by the metadata property "PART_NAME"

Fork parts after re-tessellation with "regularizedGrid" and the "fine" resolution preset
This process can be repeated for any other group of parts that should be re-tessellated – simply adjust the filter value of the rule.
Checking for Tessellation Issues
With the most important parts re-tessellated, it's time to check the overall result for issues that require a tessellation cleanup. A great way to do this is the "Face Orientation" viewport mode. Here, we mainly look out for two kinds of problems:
- Overlapping faces: usually caused by low tessellation quality settings. These can be fixed by re-tessellating the affected parts with a higher resolution.
- Missing faces: at this time, these require a fix within the respective CAD tool before tessellating. Support for fixing them directly in RapidPipeline Twin Studio is planned for a future update.
In our example, the following parts show small overlapping geometry and need to be re-tessellated using "adaptiveMesh" with the "fine" resolution preset:
- 1579332_FRONT FENDER_G01
- 1579237_HANDLEBAR HOSE FRONT BRAKE C_G01
While we're at it, we also re-tessellate the wheels using "adaptiveMesh" with the "fine" resolution preset, to fix small imperfections and faceting:
- 1579342_FRONT TIRE_G01v
- 1579334_FRONT WHEEL RIM_G01
- 1579551_REAR TIRE_G01
- 1579546_REAR WHEEL RIM_G01

Checking parts for overlapping faces in the "Face Orientation" viewport mode
The handlebar (1579231_HANDLEBAR_G01v), on the other hand, benefits from a regular grid structure. We therefore re-tessellate it using the "regularizedGrid" method with the "extra fine" resolution preset:

Handlebar part showing tessellation issues

Handlebar before re-tessellation (using shading mode "wireframe on surface")

Handlebar after re-tessellation with "regularizedGrid" and the "extra fine" resolution preset (using shading mode "wireframe on surface")
To finalize the tessellation cleanup, go through the rest of the model in the same way and increase the resolution wherever needed. Once you're happy with the result, you have a clean, well-balanced tessellated vehicle model that is ready for the next steps of the showcase workflow!
Checking for Winding Order Issues
Flipped triangles are common in CAD data and show up as holes or dark patches – easy to spot in the "Face Orientation" viewport mode. Unlike wrong mesh normals, which can simply be recomputed, winding order is part of the geometry: fixing it requires knowing which side of each surface should face outwards, which is hard to determine for open, non-watertight CAD surfaces.
RapidPipeline Twin Studio solves this with a ray-traced winding order fix that operates either per mesh lump (flipping connected chunks as a whole) or per triangle. It is available within the "Cleanup Mesh" Action and the rules system. You can learn more about the underlying settings in the 3D Processor settings guide.
In our example, the intercooler (1579254_INTERCOOLER_G01) shows winding order issues. As the flipped triangles are mixed within connected surfaces, we fix them per triangle, by unchecking the "per lump" setting:

Intercooler part showing winding order issues

Settings for the Cleanup Action to correct Winding order per triangle (unchecked per lump setting)
If you simply close the rules widget on the right-hand side, you will quickly get back to the actions. Your rules will not be lost – they are reloaded when you open the rules widget again via "View" in the top panel.

Intercooler part with fixed winding order
Rules File
The winding order fix shown above can also be applied via a rules JSON file. Simply download the file below, import it into the rules widget and run it – the part in question (1579254_INTERCOOLER_G01) is already selected via the rule's filter, and the rule runs the "Cleanup Mesh" action with per-triangle winding order correction on it.
- Rules file: windingOrderFix.rprules.json
Show RP Rules JSON File
{
"name": "windingOrderFix",
"rules": [
{
"actions": [
{
"enabled": true,
"params": {
"action": "Cleanup Mesh",
"config": {
"3dEdit": {
"meshNormals": {
"computationMethod": "area",
"hardAngleThreshold": 60,
"recomputeInputNormals": false
},
"modelEdit": {
"splitMultiMaterialMeshes": false
},
"repair": {
"meshMerging": {
"mode": "byMaterial"
},
"vertexMerging": {
"mergeDistance": {
"percentage": 0
},
"perMesh": false
},
"windingOrder": {
"ignoreTransparency": false,
"perLump": false,
"visibilityMode": "default"
}
}
},
"export": []
}
},
"type": "process"
}
],
"description": "",
"enabled": true,
"filters": [
{
"attribute": null,
"case_sensitive": false,
"enabled": true,
"include_descendants": false,
"invert": false,
"key": null,
"match": "exact",
"target": "node_name",
"value": "1579254_INTERCOOLER_G01"
}
],
"id": "76811e07b8b34242aabd80d63d126f86",
"name": "New rule"
}
],
"schema": "rpts.rules/1"
}
The model state at the end of this chapter is available as a USD file: Sportbike_Colors-random_chapter1.zip (~99 MB). You can use it as the starting point for Chapter 2.
Chapter 2: Clean-up and Data Preparation
In the previous chapter, we imported and tessellated our sportbike CAD assembly, and selectively increased the tessellation quality where it mattered most. The result already looks great, but it still contains a lot of data that is not ideal for a visualization: non-descriptive node names, many repeated small parts, hidden internal parts, as well as many small individual components that make the scene graph unnecessarily complex.
In this chapter, we will clean up and prepare our model. First, we will give the nodes of our scene graph descriptive names, based on the CAD metadata. Then, we will instance repeated parts, such as screws and bolts. After that, we will remove all parts that are not visible from the outside. Finally, we will merge components that belong together – using automation rules and, optionally, the Python scripting API.
Scene Graph Editing
Many CAD assemblies come with non-descriptive part names, as well as mesh names that were converted from or inherited by their parent nodes. To make the scene graph easier to work with, these nodes should be renamed. In RapidPipeline Twin Studio, this can easily be done with the built-in rules system or directly via the Python scripting API.
Renaming
As a simple example, we rename all nodes according to their metadata and node type:
- Parts are named
COMPONENT_GROUP+PART_NAME+ITEM_NUMBER+REVISION_PLM, for exampleFRONT_END_FORK_LEG_UPPER_PART_1579205_G01. - Meshes get the name of their parent part plus the suffix
_MESH, for exampleFRONT_END_FORK_LEG_UPPER_PART_1579205_G01_MESH.
You can use either of the following files to apply this renaming:
- Rules file: rename_from_metadata.rprules.json
- Python script: rename_from_metadata.py
Show RP Rules JSON File
{
"name": "Rename from metadata",
"rules": [
{
"id": "rename_parts",
"name": "Parts: COMPONENT_GROUP_PART_NAME_ITEM_NUMBER_REVISION_PLM",
"enabled": true,
"filters": [
{
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "ITEM_NUMBER"
}
],
"actions": [
{
"type": "rename",
"params": {
"mode": "template",
"template": "{meta:ON_UserStringList/COMPONENT_GROUP}_{meta:ON_UserStringList/PART_NAME}_{meta:ON_UserStringList/ITEM_NUMBER}_{meta:ON_UserStringList/REVISION_PLM}",
"duplicates": "number"
}
},
{
"type": "rename",
"params": {
"mode": "replace",
"find": " ",
"replace": "_",
"regex": false,
"case_sensitive": false,
"duplicates": "number"
}
}
]
},
{
"id": "rename_meshes",
"name": "Meshes: parent name + _MESH",
"enabled": true,
"filters": [
{
"target": "mesh_name",
"value": ".+",
"match": "regex"
}
],
"actions": [
{
"type": "rename",
"params": {
"mode": "template",
"template": "{parent}_MESH",
"duplicates": "number"
}
}
]
}
]
}
Show Python script
"""
Rename parts and meshes from CAD metadata, inside RapidPipeline Twin Studio.
Same result as the RULES set "Rename from metadata":
1. Every node carrying ON_UserStringList/ITEM_NUMBER is renamed to
COMPONENT_GROUP_PART_NAME_ITEM_NUMBER_REVISION_PLM
with spaces replaced by "_" (e.g. FRONT_END_FORK_LEG_UPPER_PART_1579205_G01).
2. Every mesh node is renamed to "<parent name>_MESH".
Siblings that would end up with the same name are numbered: the first keeps the
name, the next ones get _2, _3, ...
Run it from Twin Studio's Python console / script editor (it needs the in-app
`rpts` module). Each step is one undo entry, so two Ctrl+Z undo everything.
Set DRY_RUN = True to only print the planned names.
"""
import rpts
DRY_RUN = False
ATTRIBUTE = "ON_UserStringList"
NAME_KEYS = ["COMPONENT_GROUP", "PART_NAME", "ITEM_NUMBER", "REVISION_PLM"]
MESH_SUFFIX = "_MESH"
PREVIEW_LINES = 10
def build_part_name(values):
"""Join the metadata values with "_"; spaces become "_" and "/" becomes "-".
Returns None when a value is missing or empty, so the node is left alone.
"""
parts = []
for key in NAME_KEYS:
value = values.get(key)
if value is None or str(value).strip() == "":
return None
parts.append(str(value).strip())
return "_".join(parts).replace(" ", "_").replace("/", "-")
def part_names():
"""{path: new_name} for every node that has the metadata, plus skipped paths."""
paths = rpts.find_nodes_by_metadata(key=NAME_KEYS[2], attribute=ATTRIBUTE, as_paths=True)
values = {key: rpts.get_metadata_values(paths, key, attribute=ATTRIBUTE) for key in NAME_KEYS}
names, skipped = {}, []
for path in paths:
name = build_part_name({key: values[key].get(path) for key in NAME_KEYS})
if name is None:
skipped.append(path)
else:
names[path] = name
return names, skipped
def mesh_paths():
"""Paths of all nodes that hold a mesh, in scene order."""
asset = rpts.get_asset()
found, stack = [], [asset.root_node]
while stack:
node = stack.pop()
if node.mesh_index != -1:
found.append(node.path)
stack.extend(node[i] for i in reversed(range(len(node))))
return found
def main():
if rpts.get_asset() is None:
print("No model loaded.")
return
names, skipped = part_names()
meshes = mesh_paths()
print("Parts with metadata: %d (skipped, missing values: %d)" % (len(names), len(skipped)))
print("Mesh nodes: %d" % len(meshes))
for path, name in list(names.items())[:PREVIEW_LINES]:
print(" %s -> %s" % (path, name))
if len(names) > PREVIEW_LINES:
print(" ... and %d more" % (len(names) - PREVIEW_LINES))
for path in skipped[:PREVIEW_LINES]:
print(" skipped %s" % path)
if DRY_RUN:
print("DRY_RUN: nothing renamed.")
return
# Step 1: parts (one undo step). Duplicate names among siblings get _2, _3, ...
renamed_parts = rpts.rename_nodes_map(names, label="Rename parts from metadata", duplicates="number")
print("Parts renamed: %s" % renamed_parts)
# Step 2: meshes take their (new) parent name + suffix (one undo step).
renamed_meshes = rpts.rename_nodes_template(meshes, "{parent}" + MESH_SUFFIX,
label="Rename meshes", duplicates="number")
print("Meshes renamed: %s" % renamed_meshes)
main()

Scene graph before renaming, using the original CAD node names

Scene graph after renaming the nodes according to their metadata and node type
Hierarchy Changes & Node Grouping
Within future updates of RapidPipeline Twin Studio it will be possible to group multiple nodes under a new or inherited parent node, as well as making more general changes to the hierarchy. This functionality will also be available within the upcoming RapidPipeline TwinStudio MCP connector.
Instancing Components and Parts
For smaller parts that are repeated all over the model, such as screws and bolts, we recommend instancing these types of meshes instead (also known as de-duplication of meshes): identical parts then share the same mesh data, which keeps the model lightweight while still allowing each part to be positioned individually.
Again, we can use the CAD metadata to identify similar parts that are worth instancing. We create two rules, both with a "Filter" on the metadata property COMPONENT_TYPE, using the value SCREW:
Rule 1 – Assign a shared material:
As the "Do" action, choose "Assign Material" and select "Plastic_White". Only meshes that share the same material can be instanced, so this step makes sure that all screws can end up as instances of each other.
Rule 2 – Instance the parts:
As the "Do" action, choose "Run processing action" and select "Instance Identical Meshes". In the action settings, disable "Use vertex data" (useVertexData: false), so that parts with slightly different vertex counts are instanced as well.
You can use either of the following files to apply both rules:
- Rules file: instance_SCREWs.rprules.json
- Python script: instance_SCREWs.rules.py
Show RP Rules JSON File
{
"name": "instance_SCREWs",
"rules": [
{
"actions": [
{
"enabled": true,
"params": {
"material": "Plastic_White"
},
"type": "assign_material"
}
],
"description": "",
"enabled": true,
"filters": [
{
"attribute": null,
"case_sensitive": false,
"enabled": true,
"include_descendants": false,
"invert": false,
"key": "COMPONENT_TYPE",
"match": "exact",
"target": "metadata",
"value": "SCREW"
}
],
"id": "4652ff1b392f4469b3dc53ecde76530c",
"name": "apply shared mtl to SCREWs"
},
{
"actions": [
{
"enabled": true,
"params": {
"action": "Instance Identical Meshes",
"config": {
"3dEdit": {
"modelEdit": {
"removeDuplicateMeshes": {
"useNames": false,
"useVertexData": false
}
}
},
"export": []
}
},
"type": "process"
}
],
"description": "",
"enabled": true,
"filters": [
{
"attribute": null,
"case_sensitive": false,
"enabled": true,
"include_descendants": false,
"invert": false,
"key": "COMPONENT_TYPE",
"match": "exact",
"target": "metadata",
"value": "SCREW"
}
],
"id": "b8843b0bc5034dd9846936acf0f2042f",
"name": "Instance SCREWs"
}
],
"schema": "rpts.rules/1"
}
Show Python script
# Rule set : Untitled
# Generated: RPTS rules export, 2026-11-25
# Source : (rule set not loaded from a file)
#
# Run in the RPTS Script Editor or Python console. Each action is one undo step.
# Requires the scripting feature for processing actions.
#
# Export only: edit the rule set (.rprules.json / RULES dock) and export again, or edit
# this script by hand. Disabled rules/actions/filters are commented out and marked
# '(disabled)': uncomment them to re-enable. Rules run in order; filters are
# re-evaluated before every action; a failing rule does not stop the others.
import json
import copy
import os
import rpts
# ── Helpers ─────────────────────────────────────────────────────────────
def log(msg):
print("[Rules script] " + str(msg))
def matches(filters, scope=None):
"""Paths matching ALL filters (AND), in scene order.
Evaluated over the whole scene (scope is kept only for signature compatibility)."""
return rpts.find_nodes(filters, as_paths=True)
def top_most(paths):
"""Order-preserving, de-duplicated paths that have no ancestor in the list."""
wanted = set(paths)
out, seen = [], set()
for p in paths:
if p in seen:
continue
seen.add(p)
i = p.find("/", 1)
covered = False
while i != -1:
if p[:i] in wanted:
covered = True
break
i = p.find("/", i + 1)
if not covered:
out.append(p)
return out
def scene_tree():
"""(root_path, children, parent, mesh_nodes) of the loaded scene, as plain data."""
asset = rpts.get_asset()
if asset is None:
raise RuntimeError("No model loaded.")
root = asset.root_node
children, parent, mesh_nodes = {root.path: []}, {}, set()
stack = [root]
while stack:
node = stack.pop()
path = node.path
children.setdefault(path, [])
for i in range(len(node)):
child = node[i]
children[path].append(child.path)
parent[child.path] = path
try:
if child.mesh_index != -1:
mesh_nodes.add(child.path)
except Exception:
pass
stack.append(child)
return root.path, children, parent, mesh_nodes
def ancestors_of(path, root, parent):
"""Ancestor paths of `path`, nearest first (the scene root is excluded)."""
out = []
p = parent.get(path)
while p is not None and p != root:
out.append(p)
p = parent.get(p)
return out
def resolve_material(name):
"""Material name -> value accepted by rpts.materials.assign, or None (logged).
Order: scene:// path, scene materials by name, library name/original_name
(ambiguous -> error), existing .mtlx file path."""
if not name or not isinstance(name, str):
log("assign_material: ERROR no material name given - skipped")
return None
if name.startswith("scene://"):
return name
for m in rpts.materials.list_scene_materials():
if m["name"] == name:
return m["path"]
found = []
for m in rpts.materials.list_library():
if name in (m["name"], m["original_name"]) and m["path"] not in found:
found.append(m["path"])
if len(found) == 1:
return found[0]
if len(found) > 1:
log("assign_material: ERROR ambiguous material name %r (%d library matches) - skipped"
% (name, len(found)))
return None
if name.lower().endswith(".mtlx") and os.path.isfile(name):
return name
log("assign_material: ERROR material %r not found in scene or library - skipped" % (name,))
return None
def assign_material(paths, name):
"""Assign a material (by name) to the mesh nodes under `paths`. One undo step."""
material = resolve_material(name) # resolved first, like the engine, even with 0 matches
if material is None or not paths:
return 0
# rpts.materials.assign expands non-mesh nodes to their mesh descendants itself.
return rpts.materials.assign(paths, material)
def process(paths, config):
"""Run a processing action on the mesh nodes under `paths` only (never the whole scene).
One undo step. The asset is replaced by processing: re-run matches() afterwards."""
if not paths:
log("process: no matched nodes -> skipped")
return False
root, children, parent, mesh_nodes = scene_tree()
meshes, stack = set(), list(paths)
while stack:
q = stack.pop()
if q in mesh_nodes:
meshes.add(q)
stack.extend(children.get(q, ()))
if not meshes:
log("process: no mesh nodes among %d matches -> skipped" % len(paths))
return False
log("process: %d matched nodes (%d mesh nodes)" % (len(paths), len(meshes)))
# Panel parity: the MODEL ACTIONS panel replaces the config's "export" with the FBX default.
cfg = copy.deepcopy(config)
try:
from magic_actions import utils as action_utils
action_utils.overrideExports(cfg, "fbx")
except Exception:
# Fallback copy of that block when magic_actions.utils cannot be imported.
cfg.pop("export", None)
cfg["export"] = [{
"fileName": "scene_file",
"format": {"fbx": {"3dsMaxPhysicalMaterial": {"textureFormat": {"default": "png"}}}},
}]
# process() works on the engine selection: select the matches temporarily.
# (The engine uses an internal wait-for-selection call; the public set_selection is the
# closest equivalent - the verification below catches a selection that did not apply.)
asset = rpts.get_asset()
previous = rpts.get_selection(as_paths=True)
rpts.set_selection(list(paths))
if not rpts.get_selection(as_paths=True):
log("process: ERROR could not select the matched nodes - skipped")
return False
ok = None
try:
ok = asset.process(json.dumps(cfg))
finally:
try:
rpts.set_selection(previous) # best effort: paths may be gone after processing
except Exception:
pass
if ok is None or ok is False:
log("process: ERROR processing failed (returned %r)" % (ok,))
return False
return True
# ── Run ────────────────────────────────────────────────────────────────
FAILED = []
# ── Rule 1: apply shared mtl to SCREWs ────────────────────────────────
FILTERS_1 = [
{
'attribute': None,
'case_sensitive': False,
'enabled': True,
'include_descendants': False,
'invert': False,
'key': 'COMPONENT_TYPE',
'match': 'exact',
'target': 'metadata',
'value': 'SCREW',
},
]
try:
m = matches(FILTERS_1)
log("'%s': %d matched" % ('apply shared mtl to SCREWs', len(m)))
# action 1: assign_material 'Plastic_White'
assign_material(m, 'Plastic_White')
except Exception as e:
FAILED.append('apply shared mtl to SCREWs')
log("'%s': ERROR %s" % ('apply shared mtl to SCREWs', e))
# ── Rule 2: Instance SCREWs ───────────────────────────────────────────
FILTERS_2 = [
{
'attribute': None,
'case_sensitive': False,
'enabled': True,
'include_descendants': False,
'invert': False,
'key': 'COMPONENT_TYPE',
'match': 'exact',
'target': 'metadata',
'value': 'SCREW',
},
]
# process action: Instance Identical Meshes
CONFIG_2_1 = {
'3dEdit': {'modelEdit': {'removeDuplicateMeshes': {'useNames': False, 'useVertexData': False}}},
'export': [],
}
try:
m = matches(FILTERS_2)
log("'%s': %d matched" % ('Instance SCREWs', len(m)))
# action 1: process 'Instance Identical Meshes'
process(m, CONFIG_2_1)
except Exception as e:
FAILED.append('Instance SCREWs')
log("'%s': ERROR %s" % ('Instance SCREWs', e))
log("Finished: %d rule(s) run, %d failed." % (2, len(FAILED)))

Screws before instancing, each with its own mesh and material

Screws after assigning a shared material and running "Instance Identical Meshes"

Checking the status of instances versus separate meshes via their material assignments
Removing Invisible Parts
A CAD assembly like our sportbike contains many parts that are completely hidden inside the model – for example, internal engine components. While they are important for engineering, they are not visible in a visualization and only add unnecessary weight to our 3D model.
To get rid of them, select the whole model and run the action "Remove Occluded Parts". In our example, this reduces the number of parts from 2083 down to 1091 – without any visible difference from the outside.

Sportbike model before running "Remove Occluded Parts", with some of the hidden internal parts highlighted

Sportbike model after running "Remove Occluded Parts", reduced from 2596 to 1506 parts
Merging Components
Next, let's reduce the complexity of the scene graph by merging components that belong together. A good example is the bike's chain: it consists of many individual chain links, but for visualization purposes, it is much more convenient to work with the chain as one single object.
Just like before, we can use the rules widget together with the CAD metadata to automate this. We create two rules (you can also find both of them in this RP Rules JSON File):
Rule 1 – Assign a material:
- Create a rule with a "Filter" on the metadata property
COMPONENT_TYPE, using the valueCHAIN_LINK. - As the "Do" action, choose "Assign Material" and select "Plastic_White".
Rule 2 – Merge the parts:
- Create a rule with a "Filter" on the metadata property
COMPONENT_TYPE, using the valueCHAIN_LINK. - As the "Do" action, choose "Run processing action" and select "Scene Graph Flattening".
Show RP Rules JSON File
{
"name": "PINKI-Sportbike_Colors-random_STEP2_assign-mtl_merge-flatten",
"rules": [
{
"actions": [
{
"enabled": true,
"params": {
"material": "Plastic_White"
},
"type": "assign_material"
}
],
"description": "",
"enabled": true,
"filters": [
{
"attribute": null,
"case_sensitive": false,
"enabled": true,
"include_descendants": false,
"invert": false,
"key": "COMPONENT_TYPE",
"match": "contains",
"target": "metadata",
"value": "CHAIN_LINK"
}
],
"id": "7014a685dcea40e194b8c5262c7c63e6",
"name": "Assign Single Mtl"
},
{
"actions": [
{
"enabled": true,
"params": {
"action": "Scene Graph Flattening",
"config": {
"3dEdit": {
"modelEdit": {
"splitMultiMaterialMeshes": false
}
},
"export": [],
"sceneGraphFlattening": {
"method": "auto",
"preservedSceneDepth": 0,
"splitMode": "auto"
}
}
},
"type": "process"
}
],
"description": "",
"enabled": true,
"filters": [
{
"attribute": null,
"case_sensitive": false,
"enabled": true,
"include_descendants": false,
"invert": false,
"key": "COMPONENT_TYPE",
"match": "contains",
"target": "metadata",
"value": "CHAIN_LINK"
}
],
"id": "f3774c14d0864f00a9846f474f733b52",
"name": "Merge/Flatten"
}
],
"schema": "rpts.rules/1"
}
Assigning a shared material first makes sure that all chain links end up with the same material, so they can be merged into a single mesh.

Rule setup in the rules widget, assigning a material to all chain links and merging them

The chain links after merging, now represented as a single part
This process can be repeated for any other parts which should be merged, such as rivets, levers etc. – simply adjust the filter value of the rules. For small parts that are repeated many times across the model, have a look at instancing instead.
Optional: Advanced Merging with the Python Scripting API
More complex merging operations can be achieved using the Python scripting API. In this optional example, we want to identify mirrored parts (such as the left and right fork legs) based on their metadata and naming, and merge them into one mesh. This makes the material assignment workflow within RapidPipeline Twin Studio much smoother, since each pair only needs to be handled once.
To run a Python script, first open the Python console via the top panel: View → Python Console. There are two ways to run the script from there:
- Copy & paste: Copy the script's contents into the Python console and hit Enter.
- Import & run: Click the "..." icon in the Python console to select the script file, which imports and runs it directly.
You can download the script here: merge_mirrored_twins.py
Show Python script
# Merge every "mirrored twin" (LEFT/RIGHT) group found by metadata PART_NAME:
# 1. assign the "white plastic" material to all nodes of all qualifying groups;
# 2. run the "Scene Graph Flattening" processing action (default settings) once
# PER qualifying group (each twin pair/group separately).
# Paste into the in-app Python Console. Everything lives inside a function, so no
# globals leak into the __main__ namespace shared with plugins.
#
def _merge_twins():
import re
import os
import sys
import copy
import json
import rpts
# ------------------------------ CONFIG ------------------------------
PROPERTY_NAME = "PART_NAME"
SIDE_TOKENS = ("LEFT", "RIGHT")
ALLOW_UNSIDED_TWIN = True # sided member + unsided member of same base counts
CASE_SENSITIVE = False
DRY_RUN = False # True = print the plan only, change NOTHING
MATERIAL_NAME = "Plastic_White" # library/scene material name (see candidates on failure)
ASSIGN_MATERIAL = True
FLATTEN = True
FLATTEN_ACTION_NAME = "Scene Graph Flattening" # meta.json "name"
# --------------------------------------------------------------------
flags = 0 if CASE_SENSITIVE else re.IGNORECASE
side_re = re.compile(
r'(?:^|[\s_-]+)(' + '|'.join(re.escape(t) for t in SIDE_TOKENS) + r')(?=$|[\s_-])',
flags)
def norm_side(s):
return s if CASE_SENSITIVE else s.upper()
def norm_base(s):
s = re.sub(r'[\s_-]+', ' ', s).strip()
return s if CASE_SENSITIVE else s.upper()
def read_part_name(node):
# Same read as rp_extensions._metadata_attributes, rp_extensions.py:1202-1229.
md = getattr(node, "metadata", None)
if md is None:
return None
try:
attribs = list(md)
except TypeError:
attribs = [md[i] for i in range(len(md))]
flat = None
entry = None
for attrib in attribs:
entries = []
for group in ("uints", "floats", "strings"):
for sub in (getattr(attrib, group, None) or []):
entries.append((sub.title, sub.value))
if attrib.title == PROPERTY_NAME and flat is None:
# FLAT property: attribute TITLE = name (rp_extensions.py:1310-1316, 2307-2333).
for k, v in entries:
if k == "":
flat = v
break
else:
if len(entries) == 1:
flat = entries[0][1]
if entry is None:
for k, v in entries:
if k == PROPERTY_NAME:
entry = v
break
val = flat if flat is not None else entry
if val is None:
return None
val = str(val).strip()
return val or None
# ---- scene scan + detection (identical logic to select_mirrored_twins.py) ----
def scan(quiet_errors=False):
"""Walks the CURRENT asset (fetched fresh: processing replaces it).
Returns dict(groups, qualifying, total, members, skipped, children, mesh_index)
or None if no model is loaded."""
asset = rpts.get_asset()
if asset is None:
return None
members = []
skipped = []
total = 0
children = {}
mesh_index = {}
root = asset.root_node
stack = [(root, True)]
while stack:
node, is_root = stack.pop()
path = node.path
children[path] = [node[i].path for i in range(len(node))]
try:
mesh_index[path] = node.mesh_index
except Exception:
mesh_index[path] = -1
if not is_root:
total += 1
try:
pname = read_part_name(node)
except Exception as e:
if not quiet_errors:
print("merge_twins: metadata read failed on %s: %s" % (path, e))
pname = None
if pname is None:
skipped.append((path, node.name))
else:
members.append((path, node.name, pname))
for i in range(len(node) - 1, -1, -1):
stack.append((node[i], False))
groups = {}
for path, name, pname in members:
sides = [norm_side(m.group(1)) for m in side_re.finditer(pname)]
base = norm_base(side_re.sub('', pname))
side = sides[0] if sides else None
groups.setdefault(base, []).append((side, path, name, pname))
qualifying = []
for base in sorted(groups):
mem = groups[base]
sided = set(s for s, _p, _n, _pn in mem if s)
has_unsided = any(s is None for s, _p, _n, _pn in mem)
if len(sided) >= 2 or (ALLOW_UNSIDED_TWIN and sided and has_unsided):
qualifying.append(base)
return {"groups": groups, "qualifying": qualifying, "total": total,
"members": members, "skipped": skipped,
"children": children, "mesh_index": mesh_index}
def mesh_count(sc, paths):
n = 0
seen = set()
stack = list(paths)
while stack:
p = stack.pop()
if p in seen:
continue
seen.add(p)
if sc["mesh_index"].get(p, -1) != -1:
n += 1
stack.extend(sc["children"].get(p, ()))
return n
# ---- material lookup (rp_extensions.py:4117-4142, 3238-3286) ----
def norm_mat(s):
return re.sub(r'[\s_-]+', ' ', str(s)).strip().lower()
def resolve_material(name):
"""Returns (value_for_assign, description) or (None, error_text).
Order: scene material by name, then library name/original_name. Exact match
first, then case/space/underscore-insensitive. Never guesses between
several different candidates."""
scene = rpts.materials.list_scene_materials() # rp_extensions.py:3265
lib = rpts.materials.list_library() # rp_extensions.py:3238
if name.startswith("scene://"):
return name, "scene path"
for exact in (True, False):
def same(a):
return a == name if exact else norm_mat(a) == norm_mat(name)
hits = []
for m in scene:
if same(m["name"]) and m["path"] not in [h[0] for h in hits]:
hits.append((m["path"], "scene material %r" % m["name"]))
if not hits:
for m in lib:
if (same(m["name"]) or same(m["original_name"])) \
and m["path"] not in [h[0] for h in hits]:
hits.append((m["path"], "library material %r (%s)" % (m["name"], m["path"])))
if len(hits) == 1:
return hits[0]
if len(hits) > 1:
return None, "ambiguous: %s" % "; ".join(h[1] for h in hits)
cands = []
for m in scene:
if "plastic" in m["name"].lower():
cands.append("scene: %s (%s)" % (m["name"], m["path"]))
for m in lib:
if "plastic" in m["name"].lower() or "plastic" in m["original_name"].lower():
cands.append("library: %s (%s)" % (m["name"], m["path"]))
return None, ("material %r not found in scene or library. Candidates containing 'plastic':\n %s"
% (name, "\n ".join(cands) if cands else "<none>"))
# ---- flattening config: the action's DEFAULTS + the panel's export override ----
def flatten_config():
"""rpd_config.json of FLATTEN_ACTION_NAME (rp_extensions.py:64-92) with the
panel's export override (rp_extensions.py:4273-4293); the raw file has
"export": [] and the processed nodes would vanish."""
from PySide6.QtCore import QCoreApplication
app_dir = os.path.normpath(QCoreApplication.applicationDirPath())
actions_dir = os.path.join(app_dir, "python_modules", "magic-actions", "actions")
vers = [d for d in os.listdir(actions_dir)
if re.match(r'^v\d+\.\d+\.\d+$', d) and os.path.isdir(os.path.join(actions_dir, d))]
if not vers:
raise RuntimeError("no versioned action folder in %s" % actions_dir)
newest = max(vers, key=lambda v: tuple(int(x) for x in v[1:].split('.')))
pdir = os.path.join(actions_dir, newest, "processing")
for d in sorted(os.listdir(pdir)):
mp = os.path.join(pdir, d, "meta.json")
cp = os.path.join(pdir, d, "rpd_config.json")
if not os.path.isfile(mp):
continue
with open(mp, encoding="utf-8") as f:
if json.load(f).get("name") != FLATTEN_ACTION_NAME:
continue
with open(cp, encoding="utf-8") as f:
cfg = copy.deepcopy(json.load(f))
try:
from magic_actions import utils as action_utils
action_utils.overrideExports(cfg, "fbx")
except Exception:
cfg.pop("export", None)
cfg["export"] = [{
"fileName": "scene_file",
"format": {"fbx": {"3dsMaxPhysicalMaterial": {"textureFormat": {"default": "png"}}}},
}]
return cfg
raise RuntimeError("processing action %r not found in %s" % (FLATTEN_ACTION_NAME, pdir))
# ================================ MAIN ================================
sc = scan()
if sc is None:
print("merge_twins: no model loaded.")
return
qualifying = sc["qualifying"]
groups = sc["groups"]
print("=" * 70)
print("Merge mirrored twins by %s (%s)" % (PROPERTY_NAME, "DRY RUN" if DRY_RUN else "LIVE"))
print("=" * 70)
all_paths = []
for base in qualifying:
print("\n[%s]" % (base or "<empty base>"))
for side, path, name, pname in groups[base]:
print(" %-8s %s (%s) PART_NAME=%r" % (side or "-", name, path, pname))
all_paths.append(path)
print("\n" + "-" * 70)
print("Nodes scanned (root excluded): %d" % sc["total"])
print("Nodes with %s: %d in %d base name(s)" % (PROPERTY_NAME, len(sc["members"]), len(groups)))
print("Qualifying groups: %d, nodes: %d" % (len(qualifying), len(all_paths)))
print("Skipped (no %s): %d" % (PROPERTY_NAME, len(sc["skipped"])))
print("Plan: assign material=%s (%r), flatten=%s (%r) once per group"
% (ASSIGN_MATERIAL, MATERIAL_NAME, FLATTEN, FLATTEN_ACTION_NAME))
if not qualifying:
print("Nothing to do.")
return
# Resolve material and config up front so a bad name stops BEFORE anything changes.
mat_value = None
if ASSIGN_MATERIAL:
mat_value, info = resolve_material(MATERIAL_NAME)
if mat_value is None:
print("\nERROR: %s\nStopping: nothing assigned, nothing flattened." % info)
return
print("Material resolved: %s" % info)
cfg_json = None
if FLATTEN:
try:
cfg_json = json.dumps(flatten_config())
except Exception as e:
print("\nERROR: cannot build the flattening config: %s\nStopping: nothing changed." % e)
return
print("Flatten config: default settings of %r (+ panel export override)" % FLATTEN_ACTION_NAME)
if DRY_RUN:
print("\nDRY_RUN: would assign material to %d node(s) (one undo step per group)," % len(all_paths))
print("then flatten %d group(s) separately (%d undo steps)." % (len(qualifying), len(qualifying)))
for base in qualifying:
paths = [p for _s, p, _n, _pn in groups[base]]
print(" %-30s meshes under nodes: %d" % (base or "<empty>", mesh_count(sc, paths)))
print("DRY_RUN: scene unchanged.")
return
report = {b: {"nodes": [p for _s, p, _n, _pn in groups[b]], "material": "-", "flatten": "-"}
for b in qualifying}
previous_selection = []
try:
previous_selection = list(rpts.get_selection(as_paths=True))
except Exception:
pass
# ---- 1. material: one call per group, each = ONE undo step (rp_extensions.py:3306-3351).
# rpts.materials.assign expands non-mesh nodes to their mesh descendants itself.
if ASSIGN_MATERIAL:
print("\n--- assigning material ---")
for base in qualifying:
try:
n = rpts.materials.assign(report[base]["nodes"], mat_value)
report[base]["material"] = "ok (%s mesh binding(s) changed)" % n
except Exception as e:
report[base]["material"] = "ERROR: %s" % e
print("[%s] material: %s" % (base, report[base]["material"]))
# ---- 2. flatten once per group. Flattening replaces the asset and restructures the
# tree, so precomputed paths of OTHER groups can be stale. Therefore after every
# flatten the scene is re-scanned and the next group is re-detected by its base name
# and its CURRENT paths are used. Already-processed bases are never re-run.
if FLATTEN:
print("\n--- flattening (one run per group) ---")
done = set()
for base in qualifying:
try:
cur = scan(quiet_errors=True)
if cur is None:
report[base]["flatten"] = "SKIPPED: no model loaded"
print("[%s] flatten: %s" % (base, report[base]["flatten"]))
continue
if base not in cur["qualifying"] or base in done:
report[base]["flatten"] = ("SKIPPED: group no longer detected after earlier "
"flattening (merged/renamed/metadata lost)")
print("[%s] flatten: %s" % (base, report[base]["flatten"]))
continue
paths = [p for _s, p, _n, _pn in cur["groups"][base]]
nmesh = mesh_count(cur, paths)
if nmesh == 0:
report[base]["flatten"] = "SKIPPED: no mesh nodes under the group"
print("[%s] flatten: %s" % (base, report[base]["flatten"]))
continue
# Never process with an empty selection (= whole scene, RPScriptingAPI.cpp:213-216).
rpts.set_selection(paths) # propagates to subtrees; waits for selection change
if not rpts.get_selection(as_paths=True):
report[base]["flatten"] = "ERROR: could not select the group; not processed"
print("[%s] flatten: %s" % (base, report[base]["flatten"]))
continue
asset = rpts.get_asset()
# Synchronous (RPScriptingAPI.cpp:229-240); one undo step (viewport.cpp:1383).
ok = asset.process(cfg_json)
if ok is None or ok is False:
report[base]["flatten"] = "ERROR: process returned %r" % (ok,)
else:
done.add(base)
report[base]["flatten"] = "ok (%d node(s), %d mesh node(s))" % (len(paths), nmesh)
print("[%s] flatten: %s" % (base, report[base]["flatten"]))
except Exception as e:
report[base]["flatten"] = "ERROR: %s" % e
print("[%s] flatten: %s" % (base, report[base]["flatten"]))
try:
rpts.set_selection(previous_selection) # best effort: paths may be gone
except Exception:
pass
# ---- summary ----
print("\n" + "=" * 70)
print("SUMMARY")
print("=" * 70)
bad = 0
for base in qualifying:
r = report[base]
print("[%s] nodes=%d material=%s flatten=%s" % (base, len(r["nodes"]), r["material"], r["flatten"]))
if r["material"].startswith("ERROR") or r["flatten"].startswith("ERROR"):
bad += 1
print("Groups: %d, with errors: %d" % (len(qualifying), bad))
print("Undo: Ctrl+Z reverts one step at a time (one per material call, one per flatten).")
_merge_twins()
del _merge_twins
The script performs the following operations:
- It identifies parts that have a mirrored counterpart, by analyzing the CAD metadata (e.g., "FORK LEG UPPER PART" and "FORK LEG UPPER PART LEFT").
- It assigns a blank white material to all identified parts, in order to facilitate merging.
- It merges each identified pair into one mesh node.
At this point, the identified parts are merged into a single mesh. With RP TwinStudio v1.0, it will also be possible to group the identified parts under a shared node instead.
The model state at the end of this chapter is available as a USD file: Sportbike_Colors-random_chapter2.zip (~59 MB). You can use it as the starting point for Chapter 3.
Chapter 3: UVs and Materials
With a clean and well-structured model at hand, we can now give our sportbike its final look. In this chapter, we will first generate UVs for the whole model, so that we can later use materials with more advanced properties and texture maps. Then, we will assign materials – first manually, then automated via rules.
Within a future update we will also look at a fully automated, advanced workflow using the MCP connector.
Assigning Projection Mapping UVs
RapidPipeline Twin Studio offers several projection mapping methods to generate UVs:
- Planar
- Cylindric
- Spherical
- Cube
For our model and purposes, cube UVs (also known as box mapping) are fully sufficient, and they enable us to apply more advanced material properties and texture maps later on.
- Select all parts (Ctrl + A).
- Assign cube UVs to the whole model.
- Inspect the result within the "UV View".
Alternatively, the processing action Generate Tiling UVs can be called via the Rules widget as well. In there, the UV scale can also be specified (Add Action -> Run Processing Action -> Generate Tiling UVs -> Edit ...). The JSON settings within the Edit pannel are following the 3D Processing Schema.
However, UV scale is currently not offered as a UI element as RP Twin Studios Material and UV Creation Philosophy is based on real-world scaled Textures and Materials. Within the v1.0 release of RP TwinStudio a Texture Transform Attribute will be available within the Material Editor.

UV View of the model without UVs

UV View with applied cube UVs (box mapping)
Creating UV atlases is also possible. However, we recommend doing this as part of the optimization step, or for specific workflows where a shared atlas is required.
Assigning Materials
Manual Approach
To assign materials manually, simply drag and drop materials from the default library (or from an imported library) onto parts of the model. The assigned materials then appear on the right side, from where they can also be re-assigned to other parts as material instances.
The previous steps we applied to the structure of our model (instancing, merging parts, renaming etc.) make this, as well as the following steps, a lot easier – both by simplifying the assignments themselves, and by giving more context for automated material assignment approaches.

Assigning materials via drag and drop from the material library
The chain links we merged earlier can now easily be assigned a material by hand, since the whole chain is a single mesh. In addition, thanks to the UVs we assigned in the previous step, the material details – given by the material's textures – are now visible on the surface of the chain link meshes. In this example, the titanium material from the basic material library was assigned.

The merged chain with the titanium material assigned, showing texture details thanks to the previously assigned UVs
Automated Approach (via Rules)
Just like in the previous chapters, we can use the CAD metadata to automate the material assignment. In this example workflow, new materials are assigned according to the material descriptions stored in the metadata.
The script and rules that assign the most fitting standard materials from a custom library generated based on the basic RP TwinStudio material library were created with the help of AI.
With the RP TwinStudio v1.0 release, it will be possible to generate such assignment rules – and even material edits – on the fly, with the help of the MCP connector and an AI model of your choice!
Before applying the rules, you need to install the custom material library referred to above. Download the library here: vehicle-workflow-material-lib.zip. Unzip the file and place the resulting vehicle-workflow-material-lib folder inside the materials folder of your main RP TwinStudio installation folder. The next time you start RP TwinStudio, the new materials will be available in the material library.
The new material library folder needs to be placed in the materials folder while RP TwinStudio is closed.
With the RP TwinStudio v1.0 release, it will be possible to load and save material libraries via the interface itself, as well as to save and load RP TwinStudio project files.
For now, as a workaround, refer to the chapter-specific USD files provided via links in this documentation.
You can use either of the following files to apply this material assignment:
- Rules file: MTL-assignments.rprules.json
- Python script: MTL-assignments.rules.py
Show RP Rules JSON File
{
"schema": "rpts.rules/1",
"name": "Motorbike metadata demo",
"rules": [
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d02",
"name": "dark_steel -> SB_Gunmetal_BlackOxide_Steel",
"description": "MATERIAL_ID = dark_steel. GUNMETAL (Heat-Treated & Black-Oxide Steel), 1522 parts: fasteners, frame hardware, engine parts.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "dark_steel",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_Gunmetal_BlackOxide_Steel"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d03",
"name": "satin_metal -> SB_SatinSilver_Machined_Aluminium",
"description": "MATERIAL_ID = satin_metal. SATIN SILVER (Machined Aluminium & Stainless Steel), 277 parts: levers, brake discs, calipers, triple clamps.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "satin_metal",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_SatinSilver_Machined_Aluminium"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d04",
"name": "black_plastic -> SB_Black_Matte_Engineering_Plastic",
"description": "MATERIAL_ID = black_plastic. BLACK (Matte Engineering Plastic), 124 parts: connectors, ECU, switches.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "black_plastic",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_Black_Matte_Engineering_Plastic"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d05",
"name": "grey_satin_powder_coat -> SB_Grey_Satin_Powdercoat",
"description": "MATERIAL_ID = grey_satin_powder_coat. GREY (Satin Powder-Coated Metal), 102 parts: frame, engine covers, intercooler.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "grey_satin_powder_coat",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_Grey_Satin_Powdercoat"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d06",
"name": "black_rubber -> SB_Black_Matte_Rubber",
"description": "MATERIAL_ID = black_rubber. BLACK (Matte Synthetic Rubber), 86 parts: tires, hoses, grips, seals.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "black_rubber",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_Black_Matte_Rubber"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d07",
"name": "polished_chrome -> SB_Polished_Chrome",
"description": "MATERIAL_ID = polished_chrome. POLISHED CHROME (Hard-Chromed Steel), 68 parts: fork tubes, pipes, shock rods.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "polished_chrome",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_Polished_Chrome"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d08",
"name": "acid_green_accent -> SB_AcidGreen_Gloss_Powdercoat",
"description": "MATERIAL_ID = acid_green_accent. ACID GREEN (Gloss Powder-Coated Metal), 59 parts: rims, springs, accents.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "acid_green_accent",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_AcidGreen_Gloss_Powdercoat"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d09",
"name": "grey_gloss_paint -> SB_Grey_Gloss_Painted_ABS",
"description": "MATERIAL_ID = grey_gloss_paint. GREY (Gloss Painted ABS Plastic), 30 parts: fuel tank, fairing, fenders, tail panels.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "grey_gloss_paint",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_Grey_Gloss_Painted_ABS"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d10",
"name": "charcoal_synthetic_leather -> SB_Charcoal_Synthetic_Leather",
"description": "MATERIAL_ID = charcoal_synthetic_leather. CHARCOAL (Matte Synthetic Leather over PU Foam), 3 parts: rider seat cover and seat base.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "charcoal_synthetic_leather",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_Charcoal_Synthetic_Leather"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d11",
"name": "clear_glass -> SB_Clear_Tempered_Glass",
"description": "MATERIAL_ID = clear_glass. CLEAR (Tempered Glass), 1 part: headset logo glass.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "clear_glass",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "assign_material",
"params": {
"material": "SB_Clear_Tempered_Glass"
}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d12",
"name": "Select large parts (>= 100 mm)",
"description": "DIMENSIONS is text like '35 x 11 x 11 millimeter'; the regex selects parts whose first dimension has 3+ digits.",
"enabled": true,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "DIMENSIONS",
"value": "^[1-9][0-9]{2,}(\\.[0-9]+)?\\s*x",
"match": "regex",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "select",
"params": {}
},
{
"enabled": true,
"type": "log",
"params": {}
}
]
},
{
"id": "7c2a1d0e9f8a4b3c8d1e2f3a4b5c6d13",
"name": "Show only the engine",
"description": "Disabled by default: enable it live in the demo, run it, then Undo.",
"enabled": false,
"filters": [
{
"enabled": true,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "COMPONENT_GROUP",
"value": "ENGINE",
"match": "exact",
"case_sensitive": false,
"invert": false,
"include_descendants": false
}
],
"actions": [
{
"enabled": true,
"type": "isolate",
"params": {}
}
]
}
]
}
Show Python script
# Rule set : Motorbike metadata demo
# Source : MTL-assignments.rprules.json (STEP 3, OpenPBR Silver Standard materials)
#
# Run in the RPTS Script Editor or Python console. Each action is one undo step.
# Assigns one SB_* material per MATERIAL_ID (all 2272 parts are covered), then
# selects the large parts. The SB_* materials must be in the scene or in a registered
# material library (MATERIALS/Sportbike_OpenPBR_Silver).
import json
import copy
import os
import rpts
# ── Helpers ─────────────────────────────────────────────────────────────
def log(msg):
print("[Rules script] " + str(msg))
def matches(filters, scope=None):
"""Paths matching ALL filters (AND), in scene order.
Evaluated over the whole scene (scope is kept only for signature compatibility)."""
return rpts.find_nodes(filters, as_paths=True)
def top_most(paths):
"""Order-preserving, de-duplicated paths that have no ancestor in the list."""
wanted = set(paths)
out, seen = [], set()
for p in paths:
if p in seen:
continue
seen.add(p)
i = p.find("/", 1)
covered = False
while i != -1:
if p[:i] in wanted:
covered = True
break
i = p.find("/", i + 1)
if not covered:
out.append(p)
return out
def scene_tree():
"""(root_path, children, parent, mesh_nodes) of the loaded scene, as plain data."""
asset = rpts.get_asset()
if asset is None:
raise RuntimeError("No model loaded.")
root = asset.root_node
children, parent, mesh_nodes = {root.path: []}, {}, set()
stack = [root]
while stack:
node = stack.pop()
path = node.path
children.setdefault(path, [])
for i in range(len(node)):
child = node[i]
children[path].append(child.path)
parent[child.path] = path
try:
if child.mesh_index != -1:
mesh_nodes.add(child.path)
except Exception:
pass
stack.append(child)
return root.path, children, parent, mesh_nodes
def ancestors_of(path, root, parent):
"""Ancestor paths of `path`, nearest first (the scene root is excluded)."""
out = []
p = parent.get(path)
while p is not None and p != root:
out.append(p)
p = parent.get(p)
return out
def resolve_material(name):
"""Material name -> value accepted by rpts.materials.assign, or None (logged).
Order: scene:// path, scene materials by name, library name/original_name
(ambiguous -> error), existing .mtlx file path."""
if not name or not isinstance(name, str):
log("assign_material: ERROR no material name given - skipped")
return None
if name.startswith("scene://"):
return name
for m in rpts.materials.list_scene_materials():
if m["name"] == name:
return m["path"]
found = []
for m in rpts.materials.list_library():
if name in (m["name"], m["original_name"]) and m["path"] not in found:
found.append(m["path"])
if len(found) == 1:
return found[0]
if len(found) > 1:
log("assign_material: ERROR ambiguous material name %r (%d library matches) - skipped"
% (name, len(found)))
return None
if name.lower().endswith(".mtlx") and os.path.isfile(name):
return name
log("assign_material: ERROR material %r not found in scene or library - skipped" % (name,))
return None
def assign_material(paths, name):
"""Assign a material (by name) to the mesh nodes under `paths`. One undo step."""
material = resolve_material(name) # resolved first, like the engine, even with 0 matches
if material is None or not paths:
return 0
# rpts.materials.assign expands non-mesh nodes to their mesh descendants itself.
return rpts.materials.assign(paths, material)
# ── Run ────────────────────────────────────────────────────────────────
FAILED = []
RUN = 0
# ── Rule 1: dark_steel -> SB_Gunmetal_BlackOxide_Steel ──────────────────
FILTERS_1 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "dark_steel",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_1)
log("'%s': %d matched" % ('dark_steel -> SB_Gunmetal_BlackOxide_Steel', len(m)))
assign_material(m, 'SB_Gunmetal_BlackOxide_Steel')
RUN += 1
except Exception as e:
FAILED.append('dark_steel -> SB_Gunmetal_BlackOxide_Steel')
log("'%s': ERROR %s" % ('dark_steel -> SB_Gunmetal_BlackOxide_Steel', e))
# ── Rule 2: satin_metal -> SB_SatinSilver_Machined_Aluminium ────────────
FILTERS_2 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "satin_metal",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_2)
log("'%s': %d matched" % ('satin_metal -> SB_SatinSilver_Machined_Aluminium', len(m)))
assign_material(m, 'SB_SatinSilver_Machined_Aluminium')
RUN += 1
except Exception as e:
FAILED.append('satin_metal -> SB_SatinSilver_Machined_Aluminium')
log("'%s': ERROR %s" % ('satin_metal -> SB_SatinSilver_Machined_Aluminium', e))
# ── Rule 3: black_plastic -> SB_Black_Matte_Engineering_Plastic ─────────
FILTERS_3 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "black_plastic",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_3)
log("'%s': %d matched" % ('black_plastic -> SB_Black_Matte_Engineering_Plastic', len(m)))
assign_material(m, 'SB_Black_Matte_Engineering_Plastic')
RUN += 1
except Exception as e:
FAILED.append('black_plastic -> SB_Black_Matte_Engineering_Plastic')
log("'%s': ERROR %s" % ('black_plastic -> SB_Black_Matte_Engineering_Plastic', e))
# ── Rule 4: grey_satin_powder_coat -> SB_Grey_Satin_Powdercoat ──────────
FILTERS_4 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "grey_satin_powder_coat",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_4)
log("'%s': %d matched" % ('grey_satin_powder_coat -> SB_Grey_Satin_Powdercoat', len(m)))
assign_material(m, 'SB_Grey_Satin_Powdercoat')
RUN += 1
except Exception as e:
FAILED.append('grey_satin_powder_coat -> SB_Grey_Satin_Powdercoat')
log("'%s': ERROR %s" % ('grey_satin_powder_coat -> SB_Grey_Satin_Powdercoat', e))
# ── Rule 5: black_rubber -> SB_Black_Matte_Rubber ───────────────────────
FILTERS_5 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "black_rubber",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_5)
log("'%s': %d matched" % ('black_rubber -> SB_Black_Matte_Rubber', len(m)))
assign_material(m, 'SB_Black_Matte_Rubber')
RUN += 1
except Exception as e:
FAILED.append('black_rubber -> SB_Black_Matte_Rubber')
log("'%s': ERROR %s" % ('black_rubber -> SB_Black_Matte_Rubber', e))
# ── Rule 6: polished_chrome -> SB_Polished_Chrome ───────────────────────
FILTERS_6 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "polished_chrome",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_6)
log("'%s': %d matched" % ('polished_chrome -> SB_Polished_Chrome', len(m)))
assign_material(m, 'SB_Polished_Chrome')
RUN += 1
except Exception as e:
FAILED.append('polished_chrome -> SB_Polished_Chrome')
log("'%s': ERROR %s" % ('polished_chrome -> SB_Polished_Chrome', e))
# ── Rule 7: acid_green_accent -> SB_AcidGreen_Gloss_Powdercoat ──────────
FILTERS_7 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "acid_green_accent",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_7)
log("'%s': %d matched" % ('acid_green_accent -> SB_AcidGreen_Gloss_Powdercoat', len(m)))
assign_material(m, 'SB_AcidGreen_Gloss_Powdercoat')
RUN += 1
except Exception as e:
FAILED.append('acid_green_accent -> SB_AcidGreen_Gloss_Powdercoat')
log("'%s': ERROR %s" % ('acid_green_accent -> SB_AcidGreen_Gloss_Powdercoat', e))
# ── Rule 8: grey_gloss_paint -> SB_Grey_Gloss_Painted_ABS ───────────────
FILTERS_8 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "grey_gloss_paint",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_8)
log("'%s': %d matched" % ('grey_gloss_paint -> SB_Grey_Gloss_Painted_ABS', len(m)))
assign_material(m, 'SB_Grey_Gloss_Painted_ABS')
RUN += 1
except Exception as e:
FAILED.append('grey_gloss_paint -> SB_Grey_Gloss_Painted_ABS')
log("'%s': ERROR %s" % ('grey_gloss_paint -> SB_Grey_Gloss_Painted_ABS', e))
# ── Rule 9: charcoal_synthetic_leather -> SB_Charcoal_Synthetic_Leather ───
FILTERS_9 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "charcoal_synthetic_leather",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_9)
log("'%s': %d matched" % ('charcoal_synthetic_leather -> SB_Charcoal_Synthetic_Leather', len(m)))
assign_material(m, 'SB_Charcoal_Synthetic_Leather')
RUN += 1
except Exception as e:
FAILED.append('charcoal_synthetic_leather -> SB_Charcoal_Synthetic_Leather')
log("'%s': ERROR %s" % ('charcoal_synthetic_leather -> SB_Charcoal_Synthetic_Leather', e))
# ── Rule 10: clear_glass -> SB_Clear_Tempered_Glass ──────────────────────
FILTERS_10 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "MATERIAL_ID",
"value": "clear_glass",
"match": "exact",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_10)
log("'%s': %d matched" % ('clear_glass -> SB_Clear_Tempered_Glass', len(m)))
assign_material(m, 'SB_Clear_Tempered_Glass')
RUN += 1
except Exception as e:
FAILED.append('clear_glass -> SB_Clear_Tempered_Glass')
log("'%s': ERROR %s" % ('clear_glass -> SB_Clear_Tempered_Glass', e))
# ── Rule 11: Select large parts (>= 100 mm) ──────────────────────────────
FILTERS_11 = [
{
"enabled": True,
"target": "metadata",
"attribute": "ON_UserStringList",
"key": "DIMENSIONS",
"value": "^[1-9][0-9]{2,}(\\.[0-9]+)?\\s*x",
"match": "regex",
"case_sensitive": False,
"invert": False,
"include_descendants": False
}
]
try:
m = matches(FILTERS_11)
log("'%s': %d matched" % ('Select large parts (>= 100 mm)', len(m)))
rpts.set_selection(m)
for p in m[:20]:
log(" " + p)
if len(m) > 20:
log(" ... and %d more" % (len(m) - 20))
RUN += 1
except Exception as e:
FAILED.append('Select large parts (>= 100 mm)')
log("'%s': ERROR %s" % ('Select large parts (>= 100 mm)', e))
# ── Rule 12: Show only the engine ────────────────────────────────────────
# (disabled in the rule set - not run)
log("Finished: %d rule(s) run, %d failed." % (RUN, len(FAILED)))

The model before running the material assignment rules

The model after running the material assignment rules
Exporting Materials and Material Bindings
Instead of only being part of an exported file (such as a USD file), the finalized materials and their bindings can also be exported separately, using the following Python scripts:
- Export materials as a library: export_material_library.py
- Export material bindings as a CSV file: export_bindings.py – resulting CSV file: mtl-assignments.csv
Show Python script (export_material_library.py)
"""
Export all materials used in the current scene as a material library and copy
it into the STEP 3 mtl-lib folder.
rpts.materials.export_scene_as_library() always writes to the Twin Studio
material library root (it takes no target path), so the new library folder is
copied to TARGET afterwards. The original stays in the library root and shows
up there as its own category.
Run in the Twin Studio Python console / script editor (needs the in-app `rpts`).
"""
import os
import shutil
import rpts
LIB_NAME = "vehicle-workflow-material-lib-script-export"
TARGET = "F:/data/_DEMOS/_2026_Vehicle-Demo/STEPS/STEP_3_UV-gen_Materials/mtl-lib"
results = rpts.materials.export_scene_as_library(LIB_NAME)
ok = [r for r in results if r["success"]]
if ok:
src = os.path.dirname(ok[0]["path"]) # folder the app wrote the library to
dst = os.path.join(TARGET, LIB_NAME)
shutil.copytree(src, dst, dirs_exist_ok=True)
print(f"{len(ok)} materials exported to: {src}")
print(f"copied to: {dst}")
else:
print("No material was exported.")
for r in results:
if not r["success"]:
print("FAILED:", r["name"], r["error"])
Show Python script (export_bindings.py)
import rpts
rpts.materials.export_assignments_to_csv("<path-to-csv>/mtl-assignments.csv")
Show resulting CSV file (first 30 lines)
node,material_name
/__root__/_579001_ENGINE_CAGE_A_G01/_579001_ENGINE_CAGE_A_G01,SB_Grey_Satin_Powdercoat
/__root__/_579001_ENGINE_CAGE_A_G01_1/_579001_ENGINE_CAGE_A_G01,SB_Grey_Satin_Powdercoat
/__root__/_579001_ENGINE_CAGE_A_G01_2/_579001_ENGINE_CAGE_A_G01,SB_Grey_Satin_Powdercoat
/__root__/_579001_ENGINE_CAGE_A_G01_3/_579001_ENGINE_CAGE_A_G01,SB_Grey_Satin_Powdercoat
/__root__/_579001_ENGINE_CAGE_A_G01_4/_579001_ENGINE_CAGE_A_G01,SB_Grey_Satin_Powdercoat
/__root__/_579002_MAIN_BODY_PANEL_A_G01/_579002_MAIN_BODY_PANEL_A_G01,SB_Grey_Gloss_Painted_ABS
/__root__/_579003_CONNECTOR_10_G01/_579003_CONNECTOR_10_G01,SB_Black_Matte_Engineering_Plastic
/__root__/_579004_FUEL_TANK_HOSE_RIGHT_G01/_579004_FUEL_TANK_HOSE_RIGHT_G01,SB_Black_Matte_Rubber
/__root__/_579005_FUEL_TANK_HOSE_LEFT_G01/_579005_FUEL_TANK_HOSE_LEFT_G01,SB_Black_Matte_Rubber
/__root__/_579006_ENGINE_CAGE_B_G01/_579006_ENGINE_CAGE_B_G01,SB_Grey_Satin_Powdercoat
/__root__/_579006_ENGINE_CAGE_B_G01_1/_579006_ENGINE_CAGE_B_G01,SB_Grey_Satin_Powdercoat
/__root__/_579006_ENGINE_CAGE_B_G01_2/_579006_ENGINE_CAGE_B_G01,SB_Grey_Satin_Powdercoat
/__root__/_579006_ENGINE_CAGE_B_G01_3/_579006_ENGINE_CAGE_B_G01,SB_Grey_Satin_Powdercoat
/__root__/_579006_ENGINE_CAGE_B_G01_4/_579006_ENGINE_CAGE_B_G01,SB_Grey_Satin_Powdercoat
/__root__/_579007_MAIN_BODY_PANEL_B_G01_1/_579007_MAIN_BODY_PANEL_B_G01,SB_Grey_Gloss_Painted_ABS
/__root__/_579008_CONNECTOR_FUEL_TANK_G01/_579008_CONNECTOR_FUEL_TANK_G01,SB_Black_Matte_Engineering_Plastic
/__root__/_579008_CONNECTOR_FUEL_TANK_G01_1/_579008_CONNECTOR_FUEL_TANK_G01,SB_Black_Matte_Engineering_Plastic
/__root__/_579009_FUEL_TANK_LOWER_COVER_GASKET_G01/_579009_FUEL_TANK_LOWER_COVER_GASKET_G01,SB_Black_Matte_Rubber
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_1/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_10/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_11/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_2/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_3/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_4/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_5/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_6/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_7/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
/__root__/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01_8/_579010_FUEL_TANK_LOWER_COVER_SCREW_G01,SB_Gunmetal_BlackOxide_Steel
...
For the export_bindings.py script to work, you first need to specify the output path: after loading or pasting the script into the Python console, replace the <path-to-csv> placeholder with the folder where the CSV file should be saved, then run the script.
The model state at the end of this chapter is available as a USD file: Sportbike_Colors-random_chapter3.zip (~94 MB). You can use it as the starting point for Chapter 4.
Chapter 4: Rendering
Our sportbike is now fully materialized and ready to render. In this final chapter, we will take a look at the rendering options in RapidPipeline Twin Studio, and render the finished model.
Rendering Options
RapidPipeline Twin Studio provides the following rendering options:
- Custom render view: set up your own camera view and resolution.
- 360° rendering: render a turntable sequence around the model.
- PDP sheet views: render a set of 3 or 6 standard views, e.g., for product detail pages.
All render views are listed in the "Render Views" panel, from where they can be sent to the render queue with the desired resolution factor, quality and output format.

Setting up a custom render view and sending it to the render queue

Multiple render views, created with the 3 view PDP sheet option
Rendering the Fully Materialized Model
Finally, we render our fully materialized model, using a resolution factor of 80% of the original 1920x1080 resolution (resulting in 1536x864 pixels) and the "Default" quality setting:

Final rendering of the fully materialized sportbike model
RP TwinStudio renders in a neutral white studio scene and can output transparent backgrounds, because this imagery is optimized for further use rather than being a final, staged shot:
- AI pipelines: The renders are optimized for AI background generation and multi-angle workflows, where a rendered background would only distract. A future RP TwinStudio release will come with AI background generation built in – and more!
- Accurate appearance: Neutral lighting shows materials and colors without environment color casts.
- Easy reuse: Transparent images fit any website, product page or layout, with a consistent look across a whole catalog.