Creating data mapping documents: Worked Example — Data Exchange (NVIDIA-Certified Professional: OpenUSD Development)
Creating Data Mapping Documents: A Worked Example for OpenUSD Development In the NVIDIA-Certified Professional: OpenUSD Development certification...
Creating Data Mapping Documents: A Worked Example for OpenUSD Development
In the NVIDIA-Certified Professional: OpenUSD Development certification, data exchange is a critical topic, especially the creation of data mapping documents. These documents serve as blueprints that define how data from one format or pipeline maps to USD schemas and structures, enabling seamless interoperability in 3D content creation pipelines.
Scenario Overview
Imagine you are tasked with integrating a proprietary 3D asset format, Proprietary3D, into an OpenUSD-based pipeline. Your goal is to create a data mapping document that clearly defines how Proprietary3D attributes correspond to USD attributes, facilitating the development of custom importers and exporters.
Step 1: Analyze Source and Target Data Structures
Begin by thoroughly understanding the Proprietary3D format:
- List all relevant attributes (e.g., geometry, materials, transforms).
- Note data types and hierarchies.
Next, review the USD schemas that will represent these attributes, such as UsdGeomMesh for geometry and UsdShadeMaterial for materials.
Step 2: Define Mapping Objectives
Clarify what data must be preserved during import/export:
- Vertex positions → points attribute in UsdGeomMesh
- Normals → normals attribute
- Material assignments → UsdShadeMaterial bindings
- Transformations → xformOp:transform
Step 3: Create the Data Mapping Document Structure
Organize the document into sections:
- Source Attribute: Name and type in Proprietary3D
- Target USD Attribute: Corresponding USD schema and attribute
- Data Type Conversion: Any required conversions (e.g., float array to VtArray)
- Notes: Special handling or constraints
Step 4: Populate the Document with Mappings
Example entries:
| Source Attribute | Target USD Attribute | Data Type Conversion | Notes |
|---|---|---|---|
| vertex_positions (float3 array) | UsdGeomMesh.points | Direct mapping to VtVec3fArray | Ensure coordinate system alignment |
| vertex_normals (float3 array) | UsdGeomMesh.normals | Direct mapping | Normalize vectors if necessary |
| material_id (integer) | UsdShadeMaterial binding | Map ID to material path | Requires material lookup table |
| transform_matrix (4x4 float) | UsdGeomXformOp.transform | Convert to GfMatrix4d | Apply coordinate system transform |
Step 5: Review and Validate the Document
Check for completeness and clarity. Confirm that all source attributes have a corresponding USD target and that data type conversions are feasible within the USD API.
Step 6: Use the Document to Guide Scripting
This mapping document will guide the development of custom importers/exporters. For example, when scripting the importer, you will:
- Read Proprietary3D vertex positions and convert them to VtVec3fArray.
- Assign these to UsdGeomMesh.points.
- Bind materials using the mapped material paths.
Summary
Creating a data mapping document is a foundational step in OpenUSD data exchange workflows. This worked example demonstrates a structured approach to mapping proprietary format attributes to USD schemas, ensuring accurate and efficient data interchange.
For more detailed guidance on OpenUSD development and data exchange, refer to the official NVIDIA resources and documentation.
More in this topic
Ready to test your knowledge?
Put what you've learned into practice with a quick quiz and track your progress.
Test your knowledge →