Omniverse Cad To Simready
NVIDIAOfficialCreated by OmniverseDistributed by NVIDIA
- Skill
- Workflow
- Software development
- Apache-2.0
- Medium risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill acts as an orchestrator for the CAD to SimReady pipeline, coordinating a series of specialized stages including asset conversion, material and physics assignment via Content Agents, validation, and final packaging. It is designed to manage the flow between discrete tools rather than replacing them, ensuring that assets meet specific simulation requirements through a structured, documentation-driven process.
What it does
- Coordinates end-to-end conversion from source CAD or mesh assets to SimReady USD.
- Manages property assignment for materials and physics using Content Agents.
- Performs multi-stage validation gates to ensure asset viability and conformance.
- Automates the assembly of deliverable packages including thumbnails and USD dependencies.
- Provides consolidated reporting on workflow status, validation findings, and stage outputs.
- Supports flexible execution modes including conversion-only and validation-only paths.
When to use it
- When you need to transform raw CAD or source assets into simulation-ready USD files.
- When you require automated material and physics assignment for 3D assets.
- When you need to validate assets against SimReady conformance profiles.
- When you are preparing assets for packaging and distribution in a simulation environment.
Advantages
- Provides a structured, repeatable pipeline for complex asset preparation.
- Integrates multiple specialized stages into a cohesive workflow.
- Ensures consistent validation and conformance across the asset lifecycle.
- Supports modular execution by allowing specific stages to be skipped or isolated.
Usage examples
- “Convert my CAD file at /path/to/model.step to a SimReady asset.”
- The agent will initiate the preflight check, convert the file to USD, apply material and physics properties, validate the result, and output a report.
- “Validate this existing USD file for SimReady conformance.”
- The agent will run the validation-only workflow, checking the provided USD against SimReady profiles and reporting any findings.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/nvidia/omniverse-cad-to-simready/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip omniverse-cad-to-simready.zip -d .agents/skills
Documentation by Omniverse
CAD to SimReady
When to Use
Use this workflow skill for an end-to-end pipeline from a source asset to a SimReady asset or package. It coordinates existing conversion, authoring, validation, conformance, rendering, and packaging references directly; do not replace it with a single monolithic runner command.
This skill is documentation-driven and does not ship scripts/run.py; it must
not depend on a repository checkout. Shell is declared because this workflow
invokes installed stage reference scripts directly, from each reference's
installed directory, and it still must not grow a monolithic runner.
Prerequisites
Prefer
preflightfirst for deterministic setup: it installs/verifies local upstream checkouts, writes acad-to-simready-preflight.jsonmanifest, and exportsPHYSICAL_AI_PREFLIGHT_MANIFESTplusPHYSICAL_AI_REQUIRE_PREFLIGHT=1for downstream references.Python 3.12 and
uv(per repoREADME.md).A Content Agents model provider key when local deployment will run, or explicit endpoint variables plus usage tokens for already-running endpoints; see
references/preflight/README.mdfor the full list.Docker, NVIDIA Container Toolkit, and an NVIDIA GPU for Content Agents and OVRTX stages.
Local upstream checkouts under
${OMNIVERSE_CAD_TO_SIMREADY_UPSTREAM_ROOT:-$HOME/.omniverse-cad-to-simready/upstreams}when a stage needs upstream scripts or specs.
First Action
For any broad CAD/source-asset to SimReady request, assume
property_assignment_intent=run unless the user explicitly asks for
conversion-only, validation-only, or no material/physics assignment.
For conversion-only requests, set property_assignment_intent=skip, do not
deploy Content Agents, run convert-to-usd, then run validate-usd-minimum
on the generated USD if conversion succeeds. For validation-only requests,
set property_assignment_intent=skip and validate the USD the user
provided without rerunning conversion.
Run preflight (or verify an existing PHYSICAL_AI_PREFLIGHT_MANIFEST)
before any converter, validation, Content Agents, OVRTX, packaging, or FET
step; treat it as dependency bootstrap, not workflow routing. Use
--skip-content-agents for conversion-only/validation-only requests.
When property_assignment_intent=run, verify or deploy Content Agents
services immediately after confirming the source path and resolving intent,
before asset-context inspection, converter dependency checks, conversion,
validation, conformance, rendering, packaging, or upstream source builds.
Treat explicitly provided healthy endpoints as user-owned; otherwise run deploy-content-agents,
which deploys the shared standalone OVRTX renderer, then Material, Physics,
and optional Texture service containers in order.
Instructions
Confirm the source asset path exists, resolve
output_root, and classify the request as end-to-end, conversion-only, validation-only, or packaging.Resolve
property_assignment_intentbefore running any asset inspection, converter probe, conversion, validation, conformance, rendering, or packaging step.Run
preflightfor the selected workflow targets, unless a readyPHYSICAL_AI_PREFLIGHT_MANIFESTis already configured. Source the generated env file before running downstream scripts. Treat preflight as dependency setup only: it may use a provided--source-asset,--source-format, or--conversion-toolsvalue to scope dependency checks, butconvert-to-usdand the upstream converter references still decide actual conversion support.Verify or deploy Content Agents services first when
property_assignment_intent=run; block on missing authentication or unhealthy services instead of continuing.Read
references/workflow.mdandreferences/commands.md, then run only the stage references needed for the current request.Run
identify-asset-contexton the original source asset when web search is available or property assignment will run.Route the source through
convert-to-usd, or skip conversion for existing USD input and treat the source path as the current USD path.Run
validate-usd-minimumbefore expensive downstream work. Treat this as a viability gate only: record unit/profile issues such asmetersPerUnit != 1.0, but do not runsimready-conform-profile, FET001, or any other FET repair before Content Agents assignment when property assignment will run.Run Content Agents material, physics, and optional texture assignment on the converted/minimum-valid USD when requested or required.
Run
simready-conform-profileon the latest simulation USD path after property assignment and preserve every selected FET repair report.Run validation gates in order:
omni-asset-validate,omni-asset-validate-geometry,omni-asset-validate-physics, andsimready-validate.Rerun
simready-conform-profilewhensimready-validatereports a repairable requirement, then rerun profile validation on the newest authored USD.Run
ovrtx-render-servicewhen preview, thumbnail, or inspection images are requested. When package outputs are requested, runassemble-package-sourcenext to create the cleandeliverable/package source from the final USD and thumbnail, then runnv-core-package-sampleandnv-core-package-sample-validationon that deliverable folder only.Emit the consolidated workflow report with the final USD path, all stage reports, validation findings, rerun reasons, and next work.
Output Format
Emit a consolidated workflow report in Markdown, and include JSON when the
workflow writes structured artifacts. Report overall status as passed,
blocked, failed, or needs_rerun. See references/workflow.md for the
required Markdown and JSON report fields.
Detailed References
Read only the references needed for the current request:
references/preflight/README.md: deterministic local setup, manifest/env contract, wrappers, deployment opt-out, and guardrail behavior.references/workflow.md: inputs, source routing, detailed workflow, validation policy, output report fields, and next steps.references/commands.md: concrete portable script command patterns.references/assemble-package-source/README.md: two-zone package source assembly, root USD naming, thumbnail placement, and deliverable checks.references/troubleshooting.md: symptom/cause/fix table plus FET (GSP.001/RB.MB.001) repair-routing detail.references/publishing-layout.md: frontmatter compatibility-field notes and layout rationale for this skill's own file tree.
Publishing Layout Notes
Use skills/omniverse-cad-to-simready/ as the source of truth for this
product repo's skill. The .agents/skills symlink is a compatibility alias
for local agentskills.io-style discovery, and the nested references/ tree
is intentional. See references/publishing-layout.md for the alias list,
frontmatter field placement, and flattening rules.
Limitations
This workflow coordinates existing conversion, property assignment, conformance, validation, rendering, and packaging skills; it does not replace them with a single monolithic runner command.
Troubleshooting
Read references/troubleshooting.md only when a specific stage or validation
gate is failing; it owns the symptom/cause/fix table and FET repair routing.
Hard Rules
Prefer the preflight manifest for local upstream roots, converter executables, SimReady validation runtime, OVRTX endpoint, and Content Agents service URLs. When
PHYSICAL_AI_REQUIRE_PREFLIGHT=1is set, do not bypass the manifest with direct upstream discovery.Do not run asset inspection, converter probes, local upstream builds, conversion, validation, conformance, rendering, or packaging before Content Agents readiness when property assignment will run.
Use stage-specific installed reference scripts directly. Do not add or call a single
omniverse-cad-to-simreadyrunner command.For source conversion, delegate to the
convert-to-usdreference; do not substitute another converter for CAD or mesh formats.For property assignment, use Content Agents references as separate atomic steps: material first, then physics, then texture only when requested.
When property assignment will run, do not run
simready-conform-profileor any FET helper before Content Agents. Validate minimum USD first, then run Content Agents on that converted/minimum-valid USD, then apply FET repairs to the latest service-authored USD.When property assignment will run, do not run
simready-validateor any SimReady profile validation before Content Agents. The only validation gate allowed before service calls isvalidate-usd-minimum, which is a basic USD viability check.Stop at the first failing deployment, conversion, property-assignment, or conformance authoring gate unless the user explicitly asks for best-effort continuation.
Do not stop at validation findings after a meaningful USD artifact exists. Continue remaining diagnostic gates and mark the result
needs_rerun.Do not leave a
GSP.001profile failure as an unclassified final finding. Route it to upstreamsimready-foundation-conform-fet-005-simulate-grasp-physics; if the current agent cannot inspect renders or no explicit grasp points are available, report a blocked FET005 repair with the visual evidence path or missing input reason.Preserve every stage report and pass the concrete output USD path from each report into the next stage.
Files
- ATTRIBUTION.mdAdded by AutoGineer936 B
- BENCHMARK.md5.4 KiB
- CHANGELOG.md2.0 KiB
- LICENSELicence file added by AutoGineer11.2 KiB
- SKILL.md10.7 KiB
- agents/openai.yaml427 B
- config/skillspector-baseline.yaml1.6 KiB
- evals/evals.json8.9 KiB
- evals/files/minimal_mesh.stl157 B
- references/assemble-package-source/README.md3.9 KiB
- references/assemble-package-source/scripts/check_dependencies.pyScript2.3 KiB
- references/assemble-package-source/scripts/report_schema.json1.2 KiB
- references/assemble-package-source/scripts/run.pyScript19.2 KiB
- references/commands.md5.3 KiB
- references/content-agents/README.md20.2 KiB
- references/content-agents/references/material-agent-client/README.md13.8 KiB
- references/content-agents/references/material-agent-client/scripts/check_dependencies.pyScript417 B
- references/content-agents/references/material-agent-client/scripts/report_schema.json722 B
- references/content-agents/references/material-agent-client/scripts/run.pyScript405 B
- references/content-agents/references/physics-agent-client/README.md13.7 KiB
- references/content-agents/references/physics-agent-client/scripts/check_dependencies.pyScript417 B
- references/content-agents/references/physics-agent-client/scripts/report_schema.json722 B
- references/content-agents/references/physics-agent-client/scripts/run.pyScript405 B
- references/content-agents/references/texture-agent-client/README.md6.7 KiB
- references/content-agents/references/texture-agent-client/scripts/check_dependencies.pyScript417 B
- references/content-agents/references/texture-agent-client/scripts/report_schema.json722 B
- references/content-agents/references/texture-agent-client/scripts/run.pyScript405 B
- references/content-agents/scripts/check_dependencies.pyScript1.3 KiB
- references/content-agents/scripts/content_agent_check_dependencies.pyScript4.6 KiB
- references/content-agents/scripts/content_agent_client.pyScript76.1 KiB
- references/content-agents/scripts/content_agent_material_cleanup.pyScript10.7 KiB
- references/content-agents/scripts/content_agent_report_schema.json722 B
- references/content-agents/scripts/openusd_upload_prep.pyScript12.8 KiB
- references/content-agents/scripts/report_schema.json961 B
- references/content-agents/scripts/run.pyScript9.6 KiB
- references/convert-to-usd/README.md10.1 KiB
- references/convert-to-usd/references/mujoco-usd-converter/README.md4.1 KiB
- references/convert-to-usd/references/mujoco-usd-converter/scripts/check_dependencies.pyScript1.5 KiB
- references/convert-to-usd/references/mujoco-usd-converter/scripts/report_schema.json405 B
- references/convert-to-usd/references/mujoco-usd-converter/scripts/run.pyScript9.3 KiB
- references/convert-to-usd/references/openusd-exchange-sdk-usdex/README.md4.7 KiB
- references/convert-to-usd/references/urdf-usd-converter/README.md3.8 KiB
- references/convert-to-usd/references/urdf-usd-converter/scripts/check_dependencies.pyScript1.5 KiB
- references/convert-to-usd/references/urdf-usd-converter/scripts/report_schema.json403 B
- references/convert-to-usd/references/urdf-usd-converter/scripts/run.pyScript9.4 KiB
- references/convert-to-usd/references/usd-convert-cad/README.md8.0 KiB
- references/convert-to-usd/references/usd-convert-cad/scripts/check_dependencies.pyScript3.6 KiB
- references/convert-to-usd/references/usd-convert-cad/scripts/report_schema.json476 B
- references/convert-to-usd/references/usd-convert-cad/scripts/run.pyScript22.8 KiB
- references/convert-to-usd/references/usd-convert-gsplat/README.md4.4 KiB
- references/convert-to-usd/references/usd-convert-gsplat/scripts/check_dependencies.pyScript2.1 KiB
- references/convert-to-usd/references/usd-convert-gsplat/scripts/report_schema.json413 B
- references/convert-to-usd/references/usd-convert-gsplat/scripts/run.pyScript13.6 KiB
- references/convert-to-usd/scripts/check_dependencies.pyScript1.7 KiB
- references/convert-to-usd/scripts/report_schema.json1.4 KiB
- references/convert-to-usd/scripts/run.pyScript22.6 KiB
- references/deploy-content-agents/README.md10.7 KiB
- references/deploy-content-agents/references/deploy-material-agent-docker.md423 B
- references/deploy-content-agents/references/deploy-ovrtx-docker.md405 B
- references/deploy-content-agents/references/deploy-physics-agent-docker.md421 B
- references/deploy-content-agents/references/deploy-texture-agent-docker.md421 B
- references/identify-asset-context/README.md4.7 KiB
- references/identify-asset-context/scripts/check_dependencies.pyScript1.5 KiB
- references/identify-asset-context/scripts/report_schema.json751 B
- references/identify-asset-context/scripts/run.pyScript11.1 KiB
- references/nv-core-package-sample-validation/README.md5.3 KiB
- references/nv-core-package-sample-validation/scripts/check_dependencies.pyScript419 B
- references/nv-core-package-sample-validation/scripts/report_schema.json702 B
- references/nv-core-package-sample-validation/scripts/run.pyScript400 B
- references/nv-core-package-sample/README.md6.3 KiB
- references/nv-core-package-sample/scripts/check_dependencies.pyScript419 B
- references/nv-core-package-sample/scripts/report_schema.json702 B
- references/nv-core-package-sample/scripts/run.pyScript400 B
- references/omni-asset-validate-geometry/README.md3.5 KiB
- references/omni-asset-validate-geometry/scripts/check_dependencies.pyScript1.9 KiB
- references/omni-asset-validate-geometry/scripts/report_schema.json363 B
- references/omni-asset-validate-geometry/scripts/run.pyScript2.0 KiB
- references/omni-asset-validate-physics/README.md3.4 KiB
- references/omni-asset-validate-physics/scripts/check_dependencies.pyScript1.9 KiB
- references/omni-asset-validate-physics/scripts/report_schema.json362 B
- references/omni-asset-validate-physics/scripts/run.pyScript2.0 KiB
- references/omni-asset-validate/README.md3.5 KiB
- references/omni-asset-validate/scripts/check_dependencies.pyScript2.4 KiB
- references/omni-asset-validate/scripts/report_schema.json359 B
- references/omni-asset-validate/scripts/run.pyScript13.8 KiB
- references/ovrtx-render-service/README.md14.5 KiB
- references/ovrtx-render-service/scripts/check_dependencies.pyScript3.4 KiB
- references/ovrtx-render-service/scripts/report_schema.json674 B
- references/ovrtx-render-service/scripts/run.pyScript24.3 KiB
- references/ovrtx-render-service/scripts/stage_prep.pyScript19.2 KiB
- references/ovrtx-render-service/scripts/turntable.pyScript10.8 KiB
- references/preflight/README.md15.5 KiB
- references/preflight/scripts/preflight.ps1Script460 B
- references/preflight/scripts/preflight.pyScript114.8 KiB
- references/preflight/scripts/preflight.shScript278 B
- references/publishing-layout.md1.5 KiB
- references/simready-conform-profile/README.md13.9 KiB
- references/simready-conform-profile/references/FET_000_CORE/README.md1.3 KiB
- references/simready-conform-profile/references/FET_000_CORE/scripts/check_dependencies.pyScript1.4 KiB
- references/simready-conform-profile/references/FET_000_CORE/scripts/report_schema.json418 B
- references/simready-conform-profile/references/FET_000_CORE/scripts/run.py11.6 KiB
- references/simready-conform-profile/references/FET_001_MINIMAL/README.md1.5 KiB
- references/simready-conform-profile/references/FET_001_MINIMAL/scripts/check_dependencies.py1.9 KiB
- references/simready-conform-profile/references/FET_001_MINIMAL/scripts/report_schema.json668 B
- references/simready-conform-profile/references/FET_001_MINIMAL/scripts/run.py16.3 KiB
- references/simready-conform-profile/references/FET_004_SIMULATE_MULTI_BODY_PHYSICS/README.md1.4 KiB
- references/simready-conform-profile/references/FET_004_SIMULATE_MULTI_BODY_PHYSICS/scripts/check_dependencies.py1.6 KiB
- references/simready-conform-profile/references/FET_004_SIMULATE_MULTI_BODY_PHYSICS/scripts/report_schema.json1.0 KiB
- references/simready-conform-profile/references/FET_004_SIMULATE_MULTI_BODY_PHYSICS/scripts/run.py13.3 KiB
- references/simready-conform-profile/references/FET_005_SIMULATE_GRASP_PHYSICS/README.md1.9 KiB
- references/simready-conform-profile/references/FET_005_SIMULATE_GRASP_PHYSICS/scripts/author_grasp_line.py11.2 KiB
- references/simready-conform-profile/scripts/check_dependencies.py2.3 KiB
- references/simready-conform-profile/scripts/report_schema.json466 B
- references/simready-conform-profile/scripts/run.py20.1 KiB
- references/simready-validate/README.md9.1 KiB
- references/simready-validate/scripts/check_dependencies.py4.2 KiB
- references/simready-validate/scripts/report_schema.json480 B
- references/simready-validate/scripts/run.py26.9 KiB
- references/troubleshooting.md5.0 KiB
- references/validate-usd-minimum/README.md2.5 KiB
- references/validate-usd-minimum/scripts/check_dependencies.py2.1 KiB
- references/validate-usd-minimum/scripts/report_schema.json1.3 KiB
- references/validate-usd-minimum/scripts/run.py11.9 KiB
- references/workflow.md17.2 KiB
- shared/preflight_manifest.py9.7 KiB
- shared/script_utils.py13.5 KiB
- shared/simready_package.py34.3 KiB
- shared/simready_package_check_dependencies.py2.1 KiB
- shared/simready_package_report_schema.json702 B
- shared/upstream_versions.py2.4 KiB
- skill-card.md4.7 KiB
- skill.oms.sig39.4 KiB
- upstream-versions.lock.json2.2 KiB
references/ovrtx-render-service/scripts/stage_prep.py
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
import base64
from dataclasses import dataclass, field
import io
import math
from pathlib import Path
import tempfile
from typing import Any
import zipfile
USD_EXTENSIONS = {".usd", ".usda", ".usdc", ".usdz"}
ZERO_COORD = 0.0
ONE_COORD = 1.0
NEG_ONE_COORD = -1.0
@dataclass
class PreparedStage:
data_uri: str
camera_path: str
stage_info: dict[str, Any]
warnings: list[str] = field(default_factory=list)
errors: list[str] = field(default_factory=list)
def can_prepare_with_openusd(asset_path: Path) -> tuple[bool, str | None]:
try:
from pxr import Usd, UsdGeom # noqa: F401
except Exception as exc:
return False, f"OpenUSD Python modules are unavailable: {exc}"
if asset_path.suffix.lower() not in USD_EXTENSIONS:
return False, "Asset must be .usd, .usda, .usdc, or .usdz"
return True, None
def raw_asset_data_uri(asset_path: Path) -> str:
return "data:application/octet-stream;base64," + base64.b64encode(asset_path.read_bytes()).decode("ascii")
def _vec3d(Gf: Any, x: float, y: float, z: float) -> Any:
return Gf.Vec3d(x, y, z)
def _zero3() -> list[float]:
return [ZERO_COORD, ZERO_COORD, ZERO_COORD]
def prepare_render_stage(
asset_path: Path,
*,
camera_path: str | None,
width: int,
height: int,
fit_margin: float,
focal_length: float = 50.0,
elevation: float = 0.34,
turntable_angle: float | None = None,
flatten: bool = False,
add_default_lights: bool = False,
bundle_local_assets: bool = True,
force_generate_camera: bool = False,
) -> PreparedStage:
from pxr import Gf, Sdf, Usd, UsdGeom, UsdLux, UsdShade
asset_path = asset_path.resolve()
warnings: list[str] = []
errors: list[str] = []
stage = Usd.Stage.Open(str(asset_path), Usd.Stage.LoadAll)
if stage is None:
return PreparedStage(
data_uri="",
camera_path=camera_path or "/Camera",
stage_info={},
errors=[f"Could not open USD stage: {asset_path}"],
)
source_root_layer = stage.GetRootLayer()
source_default_prim = stage.GetDefaultPrim()
source_default_path = str(source_default_prim.GetPath()) if source_default_prim and source_default_prim.IsValid() else ""
source_up_axis = UsdGeom.GetStageUpAxis(stage)
source_meters_per_unit = UsdGeom.GetStageMetersPerUnit(stage)
if flatten:
layer = stage.Flatten()
render_stage = Usd.Stage.Open(layer)
if render_stage is None:
return PreparedStage(
data_uri="",
camera_path=camera_path or "/Camera",
stage_info={},
errors=["Failed to reopen flattened USD stage"],
)
UsdGeom.SetStageUpAxis(render_stage, source_up_axis)
if source_meters_per_unit is not None:
UsdGeom.SetStageMetersPerUnit(render_stage, source_meters_per_unit)
if source_default_path:
flat_default = render_stage.GetPrimAtPath(source_default_path)
if flat_default and flat_default.IsValid():
render_stage.SetDefaultPrim(flat_default)
else:
render_stage = stage
target_prim = _find_target_prim(render_stage, UsdGeom)
bounds_info = _compute_bounds_info(render_stage, target_prim, Gf, Usd, UsdGeom)
if bounds_info["empty"]:
errors.append("Could not compute non-empty render bounds for the stage")
if turntable_angle is not None and not errors:
_apply_centered_rotation(target_prim, bounds_info["center_vec"], source_up_axis, turntable_angle, Gf, UsdGeom)
bounds_info = _compute_bounds_info(render_stage, target_prim, Gf, Usd, UsdGeom)
generated_camera = False
selected_camera_path = camera_path or "/Camera"
if not camera_path or force_generate_camera:
selected_camera_path = camera_path or "/Camera"
_define_fit_camera(
render_stage,
selected_camera_path,
bounds_info,
source_up_axis,
width=width,
height=height,
fit_margin=fit_margin,
focal_length=focal_length,
elevation=elevation,
Gf=Gf,
UsdGeom=UsdGeom,
)
generated_camera = True
elif not render_stage.GetPrimAtPath(camera_path):
errors.append(f"Camera prim does not exist in prepared stage: {camera_path}")
lights_added = False
if add_default_lights and not _stage_has_lights(render_stage, UsdLux):
_add_default_lights(render_stage, bounds_info, source_up_axis, Gf, Sdf, UsdLux)
lights_added = True
if errors:
return PreparedStage(
data_uri="",
camera_path=selected_camera_path,
stage_info={
"flattened": flatten,
"target_prim_path": str(target_prim.GetPath()) if target_prim and target_prim.IsValid() else "",
"bounds": _json_bounds(bounds_info),
},
warnings=warnings,
errors=errors,
)
with tempfile.TemporaryDirectory(prefix="ovrtx_stage_") as tmp:
tmp_dir = Path(tmp)
main_usda = tmp_dir / "main.usda"
if not render_stage.GetRootLayer().Export(str(main_usda)):
return PreparedStage(
data_uri="",
camera_path=selected_camera_path,
stage_info={},
warnings=warnings,
errors=["Failed to export prepared render stage"],
)
local_asset_count = 0
copied_files: list[str] = []
if bundle_local_assets:
local_asset_count, copied_files = _bundle_local_assets(main_usda, asset_path.parent, Sdf)
stripped_render_context_outputs = _strip_render_context_outputs_for_preview_fallback(
main_usda,
Usd,
UsdShade,
)
if stripped_render_context_outputs:
warnings.append(
"Stripped "
f"{stripped_render_context_outputs} render-context material output(s) "
"from the temporary OVRTX render payload where UsdPreviewSurface "
"fallbacks were available."
)
if copied_files:
archive = io.BytesIO()
with zipfile.ZipFile(archive, "w", compression=zipfile.ZIP_DEFLATED) as bundle:
for file_path in sorted(tmp_dir.rglob("*")):
if file_path.is_file():
bundle.write(file_path, file_path.relative_to(tmp_dir).as_posix())
payload = archive.getvalue()
package_format = "zip"
root_asset = "main.usda"
else:
payload = main_usda.read_bytes()
package_format = "usda"
root_asset = "main.usda"
stage_info = {
"flattened": flatten,
"package_format": package_format,
"root_asset": root_asset,
"source_root_layer": source_root_layer.identifier,
"source_default_prim": source_default_path,
"target_prim_path": str(target_prim.GetPath()),
"up_axis": str(source_up_axis),
"meters_per_unit": source_meters_per_unit,
"bounds": _json_bounds(bounds_info),
"camera": {
"path": selected_camera_path,
"generated": generated_camera,
**bounds_info.get("camera", {}),
},
"default_lights_added": lights_added,
"local_asset_count": local_asset_count,
"copied_local_assets": copied_files,
"render_context_outputs_stripped": stripped_render_context_outputs,
"turntable_angle": turntable_angle,
}
return PreparedStage(
data_uri="data:application/octet-stream;base64," + base64.b64encode(payload).decode("ascii"),
camera_path=selected_camera_path,
stage_info=stage_info,
warnings=warnings,
)
def _find_target_prim(stage: Any, UsdGeom: Any) -> Any:
default_prim = stage.GetDefaultPrim()
if default_prim and default_prim.IsValid():
return default_prim
for prim in stage.GetPseudoRoot().GetChildren():
if UsdGeom.Xformable(prim):
return prim
return stage.GetPseudoRoot()
def _compute_bounds_info(stage: Any, target_prim: Any, Gf: Any, Usd: Any, UsdGeom: Any) -> dict[str, Any]:
purposes = [UsdGeom.Tokens.default_, UsdGeom.Tokens.render]
cache = UsdGeom.BBoxCache(Usd.TimeCode.Default(), purposes, useExtentsHint=True)
bbox = cache.ComputeWorldBound(target_prim)
bounds = bbox.ComputeAlignedRange()
empty = bounds.IsEmpty()
if empty:
center = _vec3d(Gf, ZERO_COORD, ZERO_COORD, ZERO_COORD)
size = _vec3d(Gf, ONE_COORD, ONE_COORD, ONE_COORD)
radius = 1.0
else:
center = (bounds.GetMin() + bounds.GetMax()) / 2.0
size = bounds.GetMax() - bounds.GetMin()
bbox_min = bounds.GetMin()
bbox_max = bounds.GetMax()
corners = [
Gf.Vec3d(
bbox_max[0] if i & 1 else bbox_min[0],
bbox_max[1] if i & 2 else bbox_min[1],
bbox_max[2] if i & 4 else bbox_min[2],
)
for i in range(8)
]
radius = max((corner - Gf.Vec3d(center)).GetLength() for corner in corners)
radius = max(radius, 1e-6)
return {
"empty": empty,
"min": list(bounds.GetMin()) if not empty else _zero3(),
"max": list(bounds.GetMax()) if not empty else _zero3(),
"size": [float(size[0]), float(size[1]), float(size[2])],
"center": [float(center[0]), float(center[1]), float(center[2])],
"center_vec": center,
"radius": float(radius),
}
def _safe_unit(vec: Any, fallback: Any) -> Any:
if vec.GetLength() < 1e-12:
return fallback
return vec.GetNormalized()
def _camera_matrix(cam_pos: Any, look_at: Any, world_up: Any, fallback_up: Any, Gf: Any) -> Any:
forward = _safe_unit(look_at - cam_pos, _vec3d(Gf, NEG_ONE_COORD, ZERO_COORD, ZERO_COORD))
if abs(Gf.Dot(forward, world_up)) > 0.999:
world_up = fallback_up
right = _safe_unit(Gf.Cross(forward, world_up), _vec3d(Gf, ZERO_COORD, NEG_ONE_COORD, ZERO_COORD))
camera_up = _safe_unit(Gf.Cross(right, forward), world_up)
transform = Gf.Matrix4d(1.0)
transform.SetRow(0, Gf.Vec4d(right[0], right[1], right[2], 0.0))
transform.SetRow(1, Gf.Vec4d(camera_up[0], camera_up[1], camera_up[2], 0.0))
transform.SetRow(2, Gf.Vec4d(-forward[0], -forward[1], -forward[2], 0.0))
transform.SetRow(3, Gf.Vec4d(cam_pos[0], cam_pos[1], cam_pos[2], 1.0))
return transform
def _define_fit_camera(
stage: Any,
camera_path: str,
bounds_info: dict[str, Any],
up_axis: Any,
*,
width: int,
height: int,
fit_margin: float,
focal_length: float,
elevation: float,
Gf: Any,
UsdGeom: Any,
) -> None:
camera = UsdGeom.Camera.Define(stage, camera_path)
radius = max(float(bounds_info["radius"]), 1e-6)
aspect = width / max(height, 1)
aperture = 36.0
h_aperture = aperture if aspect >= 1.0 else aperture * aspect
v_aperture = aperture / aspect if aspect >= 1.0 else aperture
h_fov = 2.0 * math.atan(h_aperture / (2.0 * focal_length))
v_fov = 2.0 * math.atan(v_aperture / (2.0 * focal_length))
camera_distance = radius * max(float(fit_margin), 1.01) / math.tan(min(h_fov, v_fov) / 2.0)
center = _vec3d(Gf, *bounds_info["center"])
if up_axis == UsdGeom.Tokens.z:
view_dir = _safe_unit(
_vec3d(Gf, ONE_COORD, NEG_ONE_COORD, elevation),
_vec3d(Gf, ONE_COORD, NEG_ONE_COORD, ZERO_COORD),
)
world_up = _vec3d(Gf, ZERO_COORD, ZERO_COORD, ONE_COORD)
fallback_up = _vec3d(Gf, ZERO_COORD, ONE_COORD, ZERO_COORD)
else:
view_dir = _safe_unit(
_vec3d(Gf, ONE_COORD, elevation, NEG_ONE_COORD),
_vec3d(Gf, ONE_COORD, ZERO_COORD, NEG_ONE_COORD),
)
world_up = _vec3d(Gf, ZERO_COORD, ONE_COORD, ZERO_COORD)
fallback_up = _vec3d(Gf, ZERO_COORD, ZERO_COORD, ONE_COORD)
cam_pos = center + view_dir * camera_distance
transform = _camera_matrix(cam_pos, center, world_up, fallback_up, Gf)
UsdGeom.Xformable(camera).MakeMatrixXform().Set(transform)
camera.GetFocalLengthAttr().Set(float(focal_length))
camera.GetHorizontalApertureAttr().Set(float(h_aperture))
camera.GetVerticalApertureAttr().Set(float(v_aperture))
near = max(radius * 0.001, 1e-6)
far = max(camera_distance + radius * 4.0, near + radius * 10.0, near + 1e-3)
camera.GetClippingRangeAttr().Set(Gf.Vec2f(float(near), float(far)))
bounds_info["camera"] = {
"position": [float(cam_pos[0]), float(cam_pos[1]), float(cam_pos[2])],
"look_at": bounds_info["center"],
"distance": float(camera_distance),
"near": float(near),
"far": float(far),
"focal_length": float(focal_length),
"horizontal_aperture": float(h_aperture),
"vertical_aperture": float(v_aperture),
}
def _stage_has_lights(stage: Any, UsdLux: Any) -> bool:
return any(
prim.IsA(UsdLux.BoundableLightBase) or prim.IsA(UsdLux.NonboundableLightBase)
for prim in stage.Traverse()
)
def _add_default_lights(stage: Any, bounds_info: dict[str, Any], up_axis: Any, Gf: Any, Sdf: Any, UsdLux: Any) -> None:
dome = UsdLux.DomeLight.Define(stage, "/OvRTXDefaultLights/DomeLight")
dome.CreateIntensityAttr(650.0)
dome.GetPrim().CreateAttribute("inputs:texture:format", Sdf.ValueTypeNames.Token).Set("latlong")
key = UsdLux.SphereLight.Define(stage, "/OvRTXDefaultLights/KeyLight")
key.CreateIntensityAttr(5500.0)
key.CreateRadiusAttr(max(float(bounds_info["radius"]) * 0.25, 0.01))
center = _vec3d(Gf, *bounds_info["center"])
radius = max(float(bounds_info["radius"]), 1e-6)
if str(up_axis) == "Z":
position = center + Gf.Vec3d(radius * 2.5, -radius * 3.0, radius * 2.2)
else:
position = center + Gf.Vec3d(radius * 2.5, radius * 2.2, -radius * 3.0)
transform = Gf.Matrix4d(1.0)
transform.SetTranslate(position)
from pxr import UsdGeom
UsdGeom.Xformable(key.GetPrim()).MakeMatrixXform().Set(transform)
def _apply_centered_rotation(target_prim: Any, center: Any, up_axis: Any, angle: float, Gf: Any, UsdGeom: Any) -> None:
xform = UsdGeom.Xformable(target_prim)
old_ops = xform.GetOrderedXformOps()
turntable_op = xform.AddTransformOp(opSuffix="ovrtxTurntable")
xform.SetXformOpOrder([turntable_op, *old_ops])
axis = (
_vec3d(Gf, ZERO_COORD, ZERO_COORD, ONE_COORD)
if up_axis == UsdGeom.Tokens.z
else _vec3d(Gf, ZERO_COORD, ONE_COORD, ZERO_COORD)
)
to_origin = Gf.Matrix4d(1.0)
to_origin.SetTranslate(-Gf.Vec3d(center))
rotation = Gf.Matrix4d(1.0)
rotation.SetRotate(Gf.Rotation(axis, angle))
back = Gf.Matrix4d(1.0)
back.SetTranslate(Gf.Vec3d(center))
turntable_op.Set(to_origin * rotation * back)
def _bundle_local_assets(main_usda: Path, source_base_dir: Path, Sdf: Any) -> tuple[int, list[str]]:
layer = Sdf.Layer.FindOrOpen(str(main_usda))
if layer is None:
return 0, []
bundle_root = main_usda.parent
copied: dict[Path, str] = {}
copied_files: list[str] = []
def copy_asset(asset_path: str) -> str | None:
if not asset_path or asset_path.startswith(("http://", "https://", "omniverse://")):
return None
source = Path(asset_path)
if not source.is_absolute():
source = source_base_dir / source
if not source.exists() or not source.is_file():
return None
source = source.resolve()
if source in copied:
return copied[source]
if source.suffix.lower() == ".mdl":
target_dir = bundle_root / "assets" / "mdl" / source.parent.name
target_dir.mkdir(parents=True, exist_ok=True)
for mdl_file in sorted(source.parent.glob("*.mdl")):
target = target_dir / mdl_file.name
target.write_bytes(mdl_file.read_bytes())
rel = target.relative_to(bundle_root).as_posix()
copied_files.append(rel)
copied[mdl_file.resolve()] = rel
return copied.get(source)
target_dir = bundle_root / "assets" / "textures"
target_dir.mkdir(parents=True, exist_ok=True)
target = target_dir / source.name
counter = 1
while target.exists() and target.read_bytes() != source.read_bytes():
target = target_dir / f"{source.stem}_{counter}{source.suffix}"
counter += 1
target.write_bytes(source.read_bytes())
rel = target.relative_to(bundle_root).as_posix()
copied_files.append(rel)
copied[source] = rel
return rel
def process_prim_spec(prim_spec: Any) -> int:
updated = 0
for attr_name in list(prim_spec.attributes.keys()):
attr_spec = prim_spec.attributes[attr_name]
value = attr_spec.default
if value is None or not isinstance(value, Sdf.AssetPath):
continue
original = value.path if hasattr(value, "path") else str(value)
relative = copy_asset(original)
if relative:
attr_spec.default = Sdf.AssetPath(relative)
updated += 1
for child in prim_spec.nameChildren:
updated += process_prim_spec(child)
return updated
updated_count = 0
for root_prim in layer.rootPrims:
updated_count += process_prim_spec(root_prim)
if updated_count:
layer.Save()
return len(set(copied_files)), sorted(set(copied_files))
def _material_has_preview_surface_output(material: Any, UsdShade: Any) -> bool:
surface_output = material.GetSurfaceOutput()
try:
connected_sources, _ = surface_output.GetConnectedSources()
except Exception:
return False
for source_info in connected_sources:
try:
shader = UsdShade.Shader(source_info.source.GetPrim())
if shader.GetIdAttr().Get() == "UsdPreviewSurface":
return True
except Exception:
continue
return False
def _strip_render_context_outputs_for_preview_fallback(
stage_path: Path,
Usd: Any,
UsdShade: Any,
) -> int:
stage = Usd.Stage.Open(str(stage_path))
if stage is None:
return 0
removed = 0
for prim in stage.Traverse():
if not prim.IsA(UsdShade.Material):
continue
material = UsdShade.Material(prim)
if not _material_has_preview_surface_output(material, UsdShade):
continue
for prop in list(prim.GetProperties()):
prop_name = prop.GetName()
if prop_name.startswith(("outputs:mdl:", "outputs:mtlx:")):
prim.RemoveProperty(prop_name)
removed += 1
if removed:
stage.GetRootLayer().Save()
return removed
def _json_bounds(bounds_info: dict[str, Any]) -> dict[str, Any]:
return {
"empty": bool(bounds_info.get("empty")),
"min": [float(v) for v in bounds_info.get("min", [])],
"max": [float(v) for v in bounds_info.get("max", [])],
"size": [float(v) for v in bounds_info.get("size", [])],
"center": [float(v) for v in bounds_info.get("center", [])],
"radius": float(bounds_info.get("radius", 0.0)),
}
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs Python
The author says: Orchestrator skill. Managed Content Agents deployment requires a configured model provider key matching the selected backend, such as NVIDIA_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, or GEMINI_API_KEY, Docker + NVIDIA Container Toolkit + GPU, Python 3.12, and an upstream checkout of nvidia-omniverse/content-agents at the ref pinned in upstream-versions.lock.json. Reused/provided endpoints may instead use explicit endpoint and usage-token environment variables. Linux/macOS only.
Security
What our scanner noticed· Medium risk
- Large base64-encoded blobs
- Instructions that use the network
- Downloads piped into a shell
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Omniverse
- Publisher
- NVIDIA (Official)
- Distributed by
- NVIDIA
- Source
- NVIDIA/skills · skills/omniverse-cad-to-simready · commit fce3cca
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE-APACHE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Omniverse or NVIDIA.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download omniverse-cad-to-simready.zip