Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
BasedOnStyle: Mozilla
TabWidth: '4'
IndentWidth: '4'
AccessModifierOffset: -4
ColumnLimit: 100
AlignAfterOpenBracket: Align
AlignEscapedNewlines: Left
MaxEmptyLinesToKeep: 1
AllowShortBlocksOnASingleLine: Empty
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
AfterControlStatement: Never
AfterEnum: true
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: true
...
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ jobs:
FBX_OUTFILE_CORRECTED=$(echo "${{ env.FBX_OUTFILE }}" | sed 's/_mac.pkg/_macos.pkg/')
sudo installer -pkg $FBX_OUTFILE_CORRECTED -target / -verboseR
sudo mv "/Applications/Autodesk/FBX SDK/" "/Applications/Autodesk/FBXSDK"
sudo sed -i '.bak' 's/mLefttChild/mLeftChild/g' "/Applications/Autodesk/FBXSDK/2020.3.7/include/fbxsdk/core/base/fbxredblacktree.h"
else # Linux
FBX_INSTALL_DIR=${{ github.workspace }}/FBX_SDK_INSTALL
chmod +r ${{ env.FBX_OUTFILE }}.tar.gz
Expand All @@ -205,8 +206,7 @@ jobs:
"-DUSD_FILEFORMATS_ENABLE_FBX=$([[ "${{ matrix.config }}" == "ALL" || "${{ matrix.config }}" == "FBX" ]] && echo "ON" || echo "OFF")"
"-DFBXSDK_ROOT=${{ env.FBX_INSTALL_DIR }}"
"-DUSD_FILEFORMATS_BUILD_TESTS=ON"
"-DOpenImageIO_INCLUDE_DIR=${{ github.workspace }}/usd_build/include"
"-DOpenImageIO_INCLUDES=${{ github.workspace }}/usd_build/include"
"-DOpenImageIO_ROOT=${{ github.workspace }}/usd_build"
"-DPython3_LIBRARY="
"-DPython3_INCLUDE_DIR="
"-DPython3_VERSION=3.10.11"
Expand All @@ -218,12 +218,8 @@ jobs:
else
libFolder="lib"
fi
platformArgs=(
"-DOpenImageIO_DIR=${{ github.workspace }}/usd_build/${libFolder}/cmake/OpenImageIO"
"-DOpenImageIO_LIB_DIR=${{ github.workspace }}/usd_build/${libFolder}/cmake/OpenImageIO"
)

fullCmakeArgs="$baseArgs ${commonArgs[@]} ${platformArgs[@]}"
fullCmakeArgs="$baseArgs ${commonArgs[@]}"
cmake $fullCmakeArgs

- name: Build and Display Linker Command
Expand Down
29 changes: 18 additions & 11 deletions .github/workflows/create-usd-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
usd_version:
description: "USD Version to build"
required: true
default: "2411"
default: "2511"

jobs:
prepare-matrix:
Expand All @@ -19,9 +19,9 @@ jobs:
steps:
- id: set-matrix
run: |
OS_LIST="[\"windows-2022\",\"macOS-13\""
OS_LIST="[\"windows-2022\", \"windows-2025\""
if [[ "${{ github.event.inputs.usd_version }}" -gt 2400 ]]; then
OS_LIST="$OS_LIST,\"macOS-14\""
OS_LIST="$OS_LIST,\"macOS-14\", \"macOS-15\", \"macos-26\""
fi
OS_LIST="$OS_LIST,\"ubuntu-22.04\"]"
echo "matrix=$OS_LIST" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
$releaseExists = $false
"exists=false" | Out-File -FilePath $env:GITHUB_ENV -Append
Write-Output "Release not found: $releaseName -- Creating new one"
gh release create "$releaseName" --title "$releaseName" --notes "USD built with the following parameters: --build-shared --openimageio --tools --python --debug-python --usd-imaging --build-variant release --use-cxx11-abi=0 (linux)"
gh release create "$releaseName" --title "$releaseName" --notes "USD built with the following parameters: --build-shared --openimageio --tools --usd-imaging --build-variant release --use-cxx11-abi=0 (linux)"
} else {
$releaseExists = $true
}
Expand All @@ -82,6 +82,12 @@ jobs:
python-version: "3.10.11"
id: setup-python

- name: Upgrade pip + setuptools
if: contains(matrix.os, 'macos-26-intel')
run: |
python -m pip install --upgrade pip setuptools
python -c "import ssl; print('SSL OK:', ssl.OPENSSL_VERSION)"

- name: Install Ninja (Unix)
if: env.exists == 'false' && matrix.os != 'windows-2022'
run: |
Expand All @@ -102,13 +108,14 @@ jobs:
brew cleanup

- name: Install Additional Dependencies (Ubuntu)
if: env.exists == 'false' && matrix.os == 'ubuntu-22.04'
if: env.exists == 'false' && contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y build-essential libgl1-mesa-dev libglew-dev libxi-dev libxrandr-dev
sudo apt-get install -y libx11-dev libxinerama-dev libxcursor-dev libxi-dev

- name: Install Additional Dependencies (Windows)
if: env.exists == 'false' && matrix.os == 'windows-2022'
if: env.exists == 'false' && contains(matrix.os, 'windows')
run: |
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'

Expand Down Expand Up @@ -179,18 +186,18 @@ jobs:
if ("${{runner.os}}" -eq "Linux") {
$abi_arg = "--use-cxx11-abi 0"
}
$python_cmd = "python $file `${{ github.workspace }}/usd_build` --build-shared --openimageio --tools --python --debug-python --usd-imaging --build-variant release $abi_arg $generator"
$python_cmd = "python $file `${{ github.workspace }}/usd_build` --onetbb --no-examples --draco --openimageio --no-materialx --tools --build-variant release $abi_arg $generator"
Invoke-Expression $python_cmd

- name: Remove Specific Folders Unix
if: env.exists == 'false' && matrix.os != 'windows-2022'
if: env.exists == 'false' && contains(matrix.os, 'windows') == 'false'
run: |
rm -rf ${{ github.workspace }}/usd_build/build
rm -rf ${{ github.workspace }}/usd_build/share
rm -rf ${{ github.workspace }}/usd_build/src

- name: Remove Specific Folders Windows
if: env.exists == 'false' && matrix.os == 'windows-2022'
if: env.exists == 'false' && contains(matrix.os, 'windows')
run: |
powershell -Command "& {
Remove-Item -Path ${{ github.workspace }}\usd_build\build -Recurse -Force
Expand Down Expand Up @@ -222,13 +229,13 @@ jobs:
}

- name: Package Build Artifacts Unix
if: env.exists == 'false' && matrix.os != 'windows-2022'
if: env.exists == 'false' && contains(matrix.os, 'windows') == 'false'
run: |
cd ${{ github.workspace }}/usd_build
zip -r ../usd-${{ github.event.inputs.usd_version }}-${{ matrix.os }}.zip *

- name: Package Build Artifacts Windows
if: env.exists == 'false' && matrix.os == 'windows-2022'
if: env.exists == 'false' && contains(matrix.os, 'windows')
run: |
powershell -Command "& {
Set-Location ${{ github.workspace }}\usd_build
Expand Down
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
*.out
*.app

# Build artifacts
*build*/
build-meta

Expand All @@ -44,17 +45,22 @@ build-meta
.vscode/*
.idea

# All python cache directories and bytecode files
**/__pycache__

# Generated documentation
docs
Testing
bin
test/__pycache__
test/output
test/assets/fbx/*.usd
test/assets/gltf/*.usd
test/assets/obj/*/*.usd
test/assets/ply/*.usd
test/assets/stl/*.usd

# .DS_Store
# macOS system files
.DS_Store

# local cache
*.cache
39 changes: 30 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
cmake_minimum_required(VERSION 3.16.0)
cmake_minimum_required(VERSION 3.19.0)

project(usdFileFormats)

file(READ "version" VERSION)
file(READ "version.json" VERSION_JSON)
string(JSON VERSION GET "${VERSION_JSON}" version)
string(REGEX MATCH "([0-9]*).([0-9]*).([0-9]*)" _ ${VERSION})
set(CPACK_PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1})
set(CPACK_PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2})
Expand Down Expand Up @@ -65,6 +67,7 @@ endif ()
if (USD_FILEFORMATS_ENABLE_ASM)
message("Building with ASM")
add_definitions(-DUSD_FILEFORMATS_ENABLE_ASM)
set(USD_FILEFORMATS_DEFAULT_WRITE_ASM, TRUE)
else(USD_FILEFORMATS_ENABLE_ASM)
message("Building without ASM")
endif(USD_FILEFORMATS_ENABLE_ASM)
Expand Down Expand Up @@ -97,26 +100,44 @@ endif ()

add_subdirectory(utils)

# Add a new file format to the build. This macro will add the relevant subdirectory and set the
# installation destination needed by that plugin's CMakeLists.txt so it installs into
# usd-fileformats-plugins/bin/plugin/usd
#
# New variables:
# - USD${FILEFORMAT}_DESTINATION: Where the fileformat libraries will be installed. This will
# typically be "plugin/usd"
# Example: USDFBX_DESTINATION
#
# @param SUBDIRECTORY_NAME The name of the subdirectory to add. This should be the same name as
# directory of the plugin, and will typically be all lowercase
macro(add_usd_fileformat SUBDIRECTORY_NAME)
string(TOUPPER ${SUBDIRECTORY_NAME} FILEFORMAT)

set(USD${FILEFORMAT}_DESTINATION "plugin/usd")
add_subdirectory(${SUBDIRECTORY_NAME})
endmacro()

if (USD_FILEFORMATS_ENABLE_FBX)
add_subdirectory(fbx)
add_usd_fileformat(fbx)
endif()
if (USD_FILEFORMATS_ENABLE_GLTF)
add_subdirectory(gltf)
add_usd_fileformat(gltf)
endif()
if (USD_FILEFORMATS_ENABLE_OBJ)
add_subdirectory(obj)
add_usd_fileformat(obj)
endif()
if (USD_FILEFORMATS_ENABLE_PLY)
add_subdirectory(ply)
add_usd_fileformat(ply)
endif()
if (USD_FILEFORMATS_ENABLE_SBSAR)
add_subdirectory(sbsar)
add_usd_fileformat(sbsar)
endif()
if (USD_FILEFORMATS_ENABLE_SPZ)
add_subdirectory(spz)
add_usd_fileformat(spz)
endif()
if (USD_FILEFORMATS_ENABLE_STL)
add_subdirectory(stl)
add_usd_fileformat(stl)
endif()

if (UNIX AND NOT APPLE)
Expand Down
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
[![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/windows-2022-2411-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/windows-2022-2408-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/windows-2022-2311-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/windows-2022-2308-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml)

[![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/macOS-14-2411-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/macOS-14-2408-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/macOS-14-2405-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml)

[![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/macOS-13-2411-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/macOS-13-2408-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml)[![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/macOS-13-2405-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/macOS-13-2311-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/macOS-13-2308-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml)

[![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/ubuntu-22.04-2411-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/ubuntu-22.04-2408-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/ubuntu-22.04-2405-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/ubuntu-22.04-2311-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml) [![](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/kwblackstone/264643f3d2acacc5369a0ba70854dfb6/raw/ubuntu-22.04-2308-ALL.json)](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml)

![FBX SDK](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/fbx-sdk.yml/badge.svg?branch=main)
![Continuous Integration](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/ci.yml/badge.svg?branch=main)
![USD Package](https://github.com/adobe/USD-Fileformat-plugins/actions/workflows/create-usd-release.yml/badge.svg)

# USD File Format Plugins
These [USD file-format-plugins](https://graphics.pixar.com/usd/release/plugins.html) allow the interchange between [Pixar's USD](https://graphics.pixar.com/usd/release/index.html) (`.usd`, `.usda`, `.usdz`) and the following file formats, with cross platform support (`windows`, `macos`, and `linux`):
Expand Down Expand Up @@ -42,7 +38,7 @@ The following tools are needed:
The following dependencies are needed:
|Dependency|Version|Affects|Optional|
|--|--|--|--|
| [Pixar USD](https://github.com/PixarAnimationStudios/USD) | 23.08 | all | no |
| [Pixar USD](https://github.com/PixarAnimationStudios/USD) | 23.08-25.11 | all | no |
| [GTest](https://github.com/google/googletest.git) | 1.11.0 | all tests | yes |
| [Eigen](https://gitlab.com/libeigen/eigen) | 3.4.0 | usdply, usdspz | no |
| [FBX SDK](https://aps.autodesk.com/developer/overview/fbx-sdk) | 2020.3.7 | usdfbx | no |
Expand All @@ -57,6 +53,13 @@ The following dependencies are needed:
| [Spz](https://github.com/nianticlabs/spz) | fd4e2a5 | usdspz | no |
| [Substance](https://developer.adobe.com/substance3d-sdk/) | 9.1.2 | usdsbsar | no |


## Coding Standards
Linting standards are defined within ./.clang-format. All changes within pull requests are expected to now follow these standards. To ensure this, it is advised setup IDEs with format on save features. Alternatively, formatting can be run on all cpp and header files by running the following bash command:
```
find . -iname '*.h' -o -iname '*.cpp' | xargs clang-format -i
```

## Build

### 1. Setup dependencies
Expand All @@ -83,6 +86,8 @@ The following dependencies are needed:
* `<USD_INSTALL_PATH>/lib64` to `LD_LIBRARY_PATH` in linux
* `<USD_INSTALL_PATH>/lib/python` to `PYTHONPATH`

If USD was built with Python (default behavior with the build script), ensure the environment has access to the Python it was built with. In particular, on Windows, ensure that PATH includes the location of the Python dll used. (Alternatively, the Python dll can also be copied into `<USD_INSTALL_PATH>/bin`).

In linux you may need these other dependencies:
```
sudo apt update
Expand Down Expand Up @@ -224,7 +229,7 @@ Our GitHub Actions setup includes two main workflows to support continuous integ

### 1. CI Build Workflow
This workflow is triggered by any push or pull request to the main branch and ensures compatibility with Universal Scene Description (USD) versions:
- **Versions Tested:** Builds against the oldest (23.08) and newest (24.05) supported USD versions regularly.
- **Versions Tested:** Builds against the oldest (23.08) and newest (25.11) supported USD versions regularly.
- **Weekly Builds:** The workflow builds against all supported USD versions to confirm ongoing compatibility.
- **Post-Build Testing:** Following the build, each plugin undergoes sanity testing, including loading a cube to check basic functionality.
- **Supported Plugins:** Currently supports FBXm GLTF, OBJ, PLY, and STL. Note: SBSAR plugin is not supported due to SDK constraints.
Expand Down
Empty file removed _config.yml
Empty file.
55 changes: 55 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
v2026.3 March 6th, 2026

General Changes:
- Fixed compatibility with USD 25.x
- Our version numbering is changing format to YYYY.0M (Year/Month) with an added patch if applicable
- Our clang-format configuration is now updated and formatting is now a requirement
- Include/header files have been cleaned up

Features
gltf
- add support for KHR_materials_coat extension
- Skip invalid IOR values < 1.0
sbsar
- relative image path resolution

Fixes
fbx
- fix FBX standard material import
- skeleton index validation / avoid default indexes / out of bounds checks
- fix skeletal animation for joints that only have curves on individual channels
- Handle color spaces correctly according to declared parameters
- Armature scale is applied only once through the USD hierarchy
gltf
- add input validation to prevent memory corruption vulnerabilities
- update readme to fix param name
obj
- adding computeNormals to SDF_FORMAT_ARG
- cpp 20 compilation fix
- Adjust FMT library dependency in the OBJ plugin to solve linker issues
sbsar
- specifying substance engine/framework for arm64
- folder/subfolder support when parsing SBSAR files
- filter SBSAR by graph type
- increase default cache size to 2GB for smooth 4K texture handling
- tests fix double free error on Linux by removing getRenderThreadState() in destructor
- tag texture attributes with color space information for MaterialX/OpenPBR
- Fix conversion of sbsar displacement to OpenPBR
- Revamp heuristic fallbacks for procedural input image path resolution
- Add inverted uv scale for use with openpbr
- Correct normal scale / bias in directx style sbsar files for OpenPBR
utils
- add asset path to input:file property of UsdPreviewSurface and ASM shaders
- switch to `ND_UsdUVTexture_23` for texture reads in OpenPBR/MaterialX networks
- add type checking to `setAttributeDefaultValue()` to catch invalid data
- check for empty values when setting the default value and forgo the type check
- readLayer to correctly processes instancing setups
- OpenPBR oriented material reading
- add general `preserveExtraMaterialInfo` file format argument
- improvements on ASM to OpenPBR conversion
- updating third-party dependencies

Build System
utils
- updated the baselines images for the fbx plugins to match colorspace changes

v1.2.0 October 22nd, 2025
fbx:
- fix mesh import when fbx mesh is a root node
Expand Down
Loading
Loading