Skip to content

v23.11.25 | USD

Compare
Choose a tag to compare
@furby-tm furby-tm released this 17 Feb 23:52
· 235 commits to main since this release
ef7959a

What's New

🎧 swift on.
  • v23.11.25 Add, build, import into Swift, and bundle entirety of all libraries (and plugins) housed under pxr/usd, and begin work on pxr/imaging with the addition of CameraUtil, Hf, PxOsd, and Hd.

  • v23.11.24 Fixes a potential linker issue with OpenImageIO, since it was incorrectly hardcoded to only dynamically link, but we now correctly defer to SPM to automatically choose the linking strategy.

  • v23.11.23 Allows MaterialX, OpenVDB, OpenSubdiv, Ptex, OpenTimelineIO, OpenEXR, and Imath to be directly imported in Swift

    import MaterialX import OpenVDB import OpenSubdiv import Ptex import OpenTimelineIO import OpenEXR
  • v23.11.22 Allows both OpenColorIO & OpenImageIO to be directly imported in Swift

    import OpenColorIO import OpenImageIO
  • v23.11.21 Brings iOS Support

    • These tasks have been completed as apart of this release.
  • v23.11.20

    • Patch update to resolve errors such as these, due to a swift bug resolving type aliases to cxx namespaces:
      import PixarUSD
      
      Pixar.GfVec3f(1, 2, 3)
      > "GfVec3f" is inaccessible due to '@_spi' protection level.
  • v23.11.19 Linux Support

    • Things are now currently working on Linux exactly as they do on macOS. This has been tested on Ubuntu 23.04 (Lunar Lobster), however we believe this should also work on Red Hat Enterprise Linux, CentOS, Fedora, and Oracle Linux as well, given the support for yum in MetaverseKit.
    • We also made sure to include Linux support in the Pixar.Bundler, an optional convenience offered for all users to automatically
      install and register all plugins with PlugRegistry, simply make a call to Pixar.Bundler.shared.setup(.resources) as apart of your application's main startup routine.
  • Featuring the metaversal epoch of the declarative api:

    Screenshot 2024-01-09 at 2 13 40 AM
  • Addition of all Pixar.UsdLux schema prims, including the ability to define them from the declarative api.

  • Allow a (hopefully) seamless experience for users who run a app that depends on SwiftUSD as a dependency by auto installing all usd plugins and resources for users who call the bundler function: Pixar.Bundler.shared.setup(.resources), and run the swift run command - though, our preference is for users to properly bundle their apps by adding the SwiftBundler package to their package dependencies and running the following command:

    // Linux
    swift package --disable-sandbox plugin bundler run -p linux MyApp
    // macOS
    swift package --disable-sandbox plugin bundler run -p macOS MyApp
    // visionOS
    swift package --disable-sandbox plugin bundler run -p visionOS MyApp
    // visionOS Simulator
    swift package --disable-sandbox plugin bundler run -p visionOSSimulator MyApp
    // iOS
    swift package --disable-sandbox plugin bundler run -p iOS MyApp
    // iOS Simulator
    swift package --disable-sandbox plugin bundler run -p iOSSimulator MyApp
  • v23.11.15 incidentally broke app bundles with its auto installer of all usd resources which is never intended to be run for
    app bundles since they are always embedded with all their usd resources out of the box, the auto installer is only for the use
    case of swift run or when the app is "unbundled" AKA the absence of an .app directory with a Contents/Resources
    directory structure, this release of v23.11.16 ensures that both bundled and unbundled apps can happily find all their
    required usd plugin resources.

  • Resolved an additional pesky duplicate linker symbol due to swift's cxx interop seemingly ignoring hidden visibility attributes.

  • Cleanup of console & debug logging, along with various api cleanups and the ability to author schema types for declaratively defined prims.

  • Proof of Concept is officially in working order, you can now author scene description in swift without the crashing 😅.

  • Addition of a swifty Pixar.UsdShade API and the Pixar.UsdShader plugin for shaders such as UsdPreviewSurface.

  • Automatically generated swift code for (Camera, Capsule, Cone, Cube, Cylinder, Mesh, Plane, Sphere, and Xform) to implement the UsdGeomXformable API through the addition of a new swift macro @Xformable.

    • Each of these types now autogenerate the addXformOp(), addTranslateOp(), addScaleOp(), addRotateXOp(), addRotateYOp(), addRotateZOp() functions by simply declaring @Xformable before their extension declarations.
  • Removal of the inout requirement for all functions which take a stage argument to simplify the USD API and keep it consistent with Python and C++.

  • The initial swift implementation of BasisCurves, Camera, Capsule, Cone, Cube, Cylinder, Mesh, NurbsCurves, NurbsPatch, Plane, Points, Sphere, Subset, and Xform. Eventually, each prim type defined by a USD schema; such as all these types, will have their swift code autogenerated with SwiftSyntax tied into UsdGenSchema, and provided as a swift package plugin for users to easily add their own additional schema-defined named API as extensions of the Pixar (or custom user provided) namespace(s).

Important

Currently in stable alpha, with many things still not tested or even attempted yet. If you experience any bugs or other strange behavior, we ask that you please submit a new issue ticket so that any issues that arise can be addressed and tracked, the goal of this project is to be a complete and comprehensive native integration of Pixar's USD into the Swift programming language. We also highly encourage feature requests and overall design considerations by all members of the community as well as the industry.

SwiftUSD is an inclusive project built for everyone, as free and open source software that is owned by its contributors.

What Works


Pixar/Base

  • Pixar.Arch
  • Pixar.Tf
  • Pixar.Gf
  • Pixar.Js
  • Pixar.Trace
  • Pixar.Vt
  • Pixar.Work
  • Pixar.Plug

Pixar/Usd

  • Pixar.Ar
  • Pixar.Kind
  • Pixar.Sdf
  • Pixar.Pcp
  • Pixar.Usd
  • Pixar.Ndr
  • Pixar.Sdr
  • Pixar.SdrOsl
  • Pixar.UsdGeom
  • Pixar.UsdShade
  • Pixar.UsdLux
  • Pixar.UsdGeom
  • Pixar.UsdShade
  • Pixar.UsdLux
  • Pixar.UsdHydra
  • Pixar.UsdAbc
  • Pixar.UsdDraco
  • Pixar.UsdMedia
  • Pixar.UsdMtlx
  • Pixar.UsdPhysics
  • Pixar.UsdProc
  • Pixar.UsdRender
  • Pixar.UsdRi
  • Pixar.UsdSkel
  • Pixar.UsdUI
  • Pixar.UsdUtils
  • Pixar.UsdVol

Pixar/Imaging

  • Pixar.CameraUtil
  • Pixar.Hf
  • Pixar.PxOsd
  • Pixar.Hd

Pixar/UsdImaging

  • Pixar.UsdShaders


Usage

To use this release of Pixar's USD in your swift project, add the following to your Package.swift file:

dependencies: [
  .package(url: "https://github.com/wabiverse/SwiftUSD.git", from: "23.11.25"),
]

Note

Zero prerequisites, just run swift build in your own swift app, game, library, or plugin.

Screenshot 2024-01-11 at 1 20 52 AM

Note

The Wabi Foundation uses SwiftUSD to build the Kraken metaversal creation suite, you can always find an up to date configuration to use for your own Swift project here.

aliens-oooh