OpenUSD Importer for Godot built using tinyusdz. Currently this just supports basic godot scene import from blender exported USD files.
Tests are done inside gdscript using gdUnit4. See project/test directory.
| Schema Name | Header File |
|---|---|
| UsdGeom | usd_geom.h |
| UsdShade (UsdPreviewSurfaces through tydra) | usd_shade.h |
| UsdSkel (Conversion WIP) | usd_skel.h |
This plugin implements a EditorSceneFormatImporter for .usda files. So you once enabled you can import .usda files as godot scenes.
Since my main goal actually wasn't an importer, but rather getting richer scene data like topology from blender to godot this also exposes all APIs to gdscript.
A minimal example is:
var stage := UsdStage.new()
stage.load("res://usdstage.usda")
#you can use the usdview utility from openusd to copy prim paths
var prim = stage.get_prim_at_path(UsdPath.from_string("/some/path"))
#for getting root prims
var root_prims = stage.get_root_prims()
#getting the value of a xform prim. The value is just another wrapper around the prim to get typing. It converts values at call time
assert(prim.get_type() == UsdPrimType.USD_PRIM_TYPE_XFORM)
var prim_value: UsdGeomXform = prim.get_value()This project is licensed under the Apache 2.0 License LICENSE. Thirdparty notice is in THIRDPARTY as well as THIRDPARTY-tinyusdz for a list of thirdparty libraries used by tinyusdz.