Skip to content
Open
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ build-meta

# Python
/.venv*
/venv*

# ide folder
.vscode/*
Expand All @@ -55,5 +56,5 @@ test/assets/obj/*/*.usd
test/assets/ply/*.usd
test/assets/stl/*.usd

# Other
# .DS_Store
.DS_Store
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ The following dependencies are needed:
* Install python and the following pip components: `pyside6`, `pyopengl`.
* Build and install USD entering in a terminal (in windows a x64 Native Tools Command prompt):
```
python <USD_SOURCE_PATH>/build_scripts/build_usd.py <USD_INSTALL_PATH> --draco --openimageio --build-variant release
python <USD_SOURCE_PATH>/build_scripts/build_usd.py <USD_INSTALL_PATH> --onetbb --no-examples --draco --openimageio --build-variant release
```

`--no-examples` is needed to omit the example plugin usdObj that ships with USD from the install, as it will conflict with our usdObj plugin.

Add `--build-target universal` for universal binaries in macos.

If adding `--openimageio` you may need these fixes:
Expand Down Expand Up @@ -269,4 +271,4 @@ To generate the documentation go to the project root folder and enter:
```
doxygen
```
The resulting documentation will be placed at the `docs` folder.
The resulting documentation will be placed at the `docs` folder.
55 changes: 54 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
v1.1.2 October 22nd, 2025
fbx:
- fix mesh import when fbx mesh is a root node
- do not require `gtest` if tests are disabled
- bind meshes that have materials but no elementmaterials
- add 'triangulatemeshes' import option to allow control of whether triangulation should be performed
- add generator metadata to USD
- support bitangents/tangents during import/emport
- fix material property mapping for non lambert/phong shader models
gltf:
- fix material index lookup when material is missing
- support khr_materials_volume_scatter extension
- improved support for gltf scattering extension
- add support for textures with brackets in their file names
- support EXT_materials_specular_edge_color & EXT_materials_clearcoat_color
- add generator metadata to USD
- fix various crashes
- support bitangents/tangents during import/export
- fix inverted normal maps
obj:
- replace backslash with slash in texture filepath
- fix crash on loading a file > 2gb
- allow single value for ke material setting
ply:
- fix reading gsplat sh coefficients
- fix export issues when not all meshes have uvs or normals
- remove clipping to SH0 for Gsplat
- fix GSplat import and export and add support to SH4
spz:
- remove clipping to SH0 for Gsplat
- fix GSplat import and export and add support to SH4
sbsar:
- expose uv texture repeat controls
- panorama support
- refactor of sbsar for MaterialX support
- allow for unlimited cache
- switching the default normal format to sbsar
stl:
- reverse normals on export
- support empty normals on import
- calculate geometric normals on import
utility:
- increase MaterialX OpenPBR support
- improve shared file format args
- refactor input struct & material processing
- fix for crash in smooth normals computation
- update test baseline images for 24.11 renderer changes
cmake:
- switch from cmake FetchContent to CPM
- updating openimageio cmake
usd:
- adding support for usd 25.05.01

v1.1.1 March 10th, 2025
fbx:
- added null and index checks
Expand Down Expand Up @@ -262,4 +315,4 @@ utility:
- asset resolver fix

v0.9.0 November 10, 2023
- Initial release of fbx, gltf, obj, ply and stl USD fileformat plugins.
- Initial release of fbx, gltf, obj, ply and stl USD fileformat plugins.
16 changes: 5 additions & 11 deletions cmake/FindFastFloat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,14 @@ endif()

if(USD_FILEFORMATS_FORCE_FETCHCONTENT OR USD_FILEFORMATS_FETCH_FASTFLOAT)
message(STATUS "Fetching FastFloat")
include(FetchContent)
FetchContent_Declare(
FastFloat
include(CPM)
CPMAddPackage(
NAME FastFloat
GIT_REPOSITORY "https://github.com/lemire/fast_float.git"
GIT_TAG "v1.1.2" # 8159e8bcf63c1b92f5a51fb550f966e56624b209
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(FastFloat)
if (fastfloat_POPULATED)
set(FastFloat_FOUND TRUE)
add_library(FastFloat::fast_float ALIAS fast_float)
elseif(${FastFloat_FIND_REQUIRED})
message(FATAL_ERROR "Could not fetch FastFloat")
endif()
set(FastFloat_FOUND TRUE)
add_library(FastFloat::fast_float ALIAS fast_float)
else()
if(${FastFloat_FIND_REQUIRED})
find_package(FastFloat CONFIG REQUIRED)
Expand Down
21 changes: 8 additions & 13 deletions cmake/FindGTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,19 @@ endif()

if(USD_FILEFORMATS_FORCE_FETCHCONTENT OR USD_FILEFORMATS_FETCH_GTEST)
message(STATUS "Fetching GTest")
include(FetchContent)
FetchContent_Declare(
googletest # using GTest here triggers errors
GIT_REPOSITORY "https://github.com/google/googletest.git"
GIT_TAG "release-1.11.0"
OVERRIDE_FIND_PACKAGE
)
include(CPM)
set(BUILD_SHARED_LIBS OFF)
set(gtest_force_shared_crt ON)
set(BUILD_GMOCK OFF)
set(BUILD_GTEST ON)
FetchContent_MakeAvailable(googletest)
CPMAddPackage(
NAME googletest # using GTest here triggers errors
GIT_REPOSITORY "https://github.com/google/googletest.git"
GIT_TAG "release-1.11.0"
)
set(BUILD_SHARED_LIBS ON)
if(googletest_POPULATED)
set(GTest_FOUND TRUE)
elseif(${GTest_FIND_REQUIRED})
message(FATAL_ERROR "Could not fetch GTest")
endif()

set(GTest_FOUND TRUE)
else()
if(${GTest_FIND_REQUIRED})
find_package(GTest CONFIG REQUIRED)
Expand Down
18 changes: 6 additions & 12 deletions cmake/FindHapply.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,15 @@ endif()

if(USD_FILEFORMATS_FORCE_FETCHCONTENT OR USD_FILEFORMATS_FETCH_HAPPLY)
message(STATUS "Fetching Happly")
include(FetchContent)
FetchContent_Declare(
Happly
include(CPM)
CPMAddPackage(
NAME happly
GIT_REPOSITORY "https://github.com/nmwsharp/happly.git"
GIT_TAG "cfa2611550bc7da65855a78af0574b65deb81766"
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(Happly)
if (happly_POPULATED)
set(Happly_FOUND TRUE)
add_library(happly::happly INTERFACE IMPORTED)
target_include_directories(happly::happly INTERFACE ${happly_SOURCE_DIR})
elseif(${Happly_FIND_REQUIRED})
message(FATAL_ERROR "Could not fetch Happly")
endif()
set(Happly_FOUND TRUE)
add_library(happly::happly INTERFACE IMPORTED)
target_include_directories(happly::happly INTERFACE ${happly_SOURCE_DIR})
else()
include(FindPackageHandleStandardArgs)

Expand Down
20 changes: 7 additions & 13 deletions cmake/FindLibXml2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,19 @@ endif()

if(USD_FILEFORMATS_FORCE_FETCHCONTENT OR USD_FILEFORMATS_FETCH_LIBXML2)
message(STATUS "Fetching libxml2")
include(FetchContent)
FetchContent_Declare(
LibXml2
GIT_REPOSITORY "https://github.com/GNOME/libxml2.git"
GIT_TAG "ae383bdb74523ddaf831d7db0690173c25e483b3" # Release v2.10.0
OVERRIDE_FIND_PACKAGE
)
include(CPM)
set(BUILD_SHARED_LIBS OFF) # otherwise fails
set(LIBXML2_WITH_ICONV OFF)
set(LIBXML2_WITH_LZMA OFF)
set(LIBXML2_WITH_PYTHON OFF)
set(LIBXML2_WITH_ZLIB ON)
set(LIBXML2_WITH_TESTS OFF)
FetchContent_MakeAvailable(LibXml2)
if(libxml2_POPULATED)
set(LibXml2_FOUND TRUE)
elseif(${LibXml2_FIND_REQUIRED})
message(FATAL_ERROR "Could not fetch LibXml2")
endif()
CPMAddPackage(
NAME LibXml2
GIT_REPOSITORY "https://github.com/GNOME/libxml2.git"
GIT_TAG "ae383bdb74523ddaf831d7db0690173c25e483b3" # Release v2.10.0
)
set(LibXml2_FOUND TRUE)
else()
message(STATUS "Find LibXml2 ${LibXml2_ROOT}")
if(${LibXml2_FIND_REQUIRED})
Expand Down
29 changes: 25 additions & 4 deletions cmake/FindOpenImageIO.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Finds the OpenImageIO library.
This find module will simply redirect to a find_package(CONFIG) hinted to look
into the pxr_DIR.
into the pxr_ROOT.


Imported Targets
Expand All @@ -25,12 +25,33 @@ This will define the following variables:


#]=======================================================================]
if (TARGET OpenImageIO::OpenImageIO)
if (TARGET OpenImageIO::OpenImageIO AND TARGET OpenImageIO::OpenImageIO_Util)
return()
endif()

if(${OpenImageIO_FIND_REQUIRED})
find_package(OpenImageIO PATHS ${pxr_DIR} ${pxr_DIR}/lib64 REQUIRED)
find_package(OpenImageIO PATHS ${pxr_ROOT} ${pxr_ROOT}/lib64 REQUIRED)
else()
find_package(OpenImageIO PATHS ${pxr_DIR} ${pxr_DIR}/lib64)
find_package(OpenImageIO PATHS ${pxr_ROOT} ${pxr_ROOT}/lib64)
endif()

# Ensure both OpenImageIO and OpenImageIO_Util targets are available
if(NOT TARGET OpenImageIO::OpenImageIO_Util AND TARGET OpenImageIO::OpenImageIO)
# Sometimes the Util library is named differently, try to find it
get_target_property(OIIO_LOCATION OpenImageIO::OpenImageIO LOCATION)
get_filename_component(OIIO_DIR ${OIIO_LOCATION} DIRECTORY)

# Look for the util library in the same directory
find_library(OIIO_UTIL_LIB
NAMES OpenImageIO_Util libOpenImageIO_Util
PATHS ${OIIO_DIR}
NO_DEFAULT_PATH
)

if(OIIO_UTIL_LIB)
add_library(OpenImageIO::OpenImageIO_Util UNKNOWN IMPORTED)
set_target_properties(OpenImageIO::OpenImageIO_Util PROPERTIES
IMPORTED_LOCATION ${OIIO_UTIL_LIB}
)
endif()
endif()
39 changes: 18 additions & 21 deletions cmake/FindSphericalHarmonics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,28 @@ endif()

if(USD_FILEFORMATS_FORCE_FETCHCONTENT OR USD_FILEFORMATS_FETCH_SPHERICAL_HARMONICS)
message(STATUS "Fetching SphericalHarmonics")
include(FetchContent)
FetchContent_Declare(
spherical_harmonics_git
include(CPM)
CPMAddPackage(
NAME spherical_harmonics_git
GIT_REPOSITORY "https://github.com/google/spherical-harmonics.git"
GIT_TAG "ccb6c7fec875a1cd5ce5eb1315a9fa7603e0919a"
)
FetchContent_MakeAvailable(spherical_harmonics_git)

if(spherical_harmonics_git_POPULATED)
set(SphericalHarmonics_FOUND TRUE)
set(SH_SRC_FILES
${spherical_harmonics_git_SOURCE_DIR}/sh/spherical_harmonics.cc
${spherical_harmonics_git_SOURCE_DIR}/sh/spherical_harmonics.h
${spherical_harmonics_git_SOURCE_DIR}/sh/image.h
)
add_library(SphericalHarmonics STATIC)
target_sources(SphericalHarmonics PRIVATE ${SH_SRC_FILES})
set(SH_INCLUDE_DIR "${spherical_harmonics_git_SOURCE_DIR}")
target_include_directories(SphericalHarmonics PUBLIC ${SH_INCLUDE_DIR})
target_link_libraries(SphericalHarmonics PUBLIC Eigen3::Eigen)
set_property(TARGET SphericalHarmonics PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET SphericalHarmonics PROPERTY CXX_STANDARD 17)
target_compile_definitions(SphericalHarmonics PRIVATE "_USE_MATH_DEFINES")
add_library(SphericalHarmonics::SphericalHarmonics ALIAS SphericalHarmonics)
endif()
set(SphericalHarmonics_FOUND TRUE)
set(SH_SRC_FILES
${spherical_harmonics_git_SOURCE_DIR}/sh/spherical_harmonics.cc
${spherical_harmonics_git_SOURCE_DIR}/sh/spherical_harmonics.h
${spherical_harmonics_git_SOURCE_DIR}/sh/image.h
)
add_library(SphericalHarmonics STATIC)
target_sources(SphericalHarmonics PRIVATE ${SH_SRC_FILES})
set(SH_INCLUDE_DIR "${spherical_harmonics_git_SOURCE_DIR}")
target_include_directories(SphericalHarmonics PUBLIC ${SH_INCLUDE_DIR})
target_link_libraries(SphericalHarmonics PUBLIC Eigen3::Eigen)
set_property(TARGET SphericalHarmonics PROPERTY POSITION_INDEPENDENT_CODE ON)
set_property(TARGET SphericalHarmonics PROPERTY CXX_STANDARD 17)
target_compile_definitions(SphericalHarmonics PRIVATE "_USE_MATH_DEFINES")
add_library(SphericalHarmonics::SphericalHarmonics ALIAS SphericalHarmonics)
else()
include(FindPackageHandleStandardArgs)

Expand Down
22 changes: 8 additions & 14 deletions cmake/FindTinyGLTF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,17 @@ endif()

if(USD_FILEFORMATS_FORCE_FETCHCONTENT OR USD_FILEFORMATS_FETCH_TINYGLTF)
message(STATUS "Fetching TinyGLTF")
include(FetchContent)
FetchContent_Declare(
TinyGLTF
GIT_REPOSITORY "https://github.com/syoyo/tinygltf.git"
GIT_TAG "v2.8.21" # 4bfc1fc1807e2e2cf3d3111f67d6ebd957514c80
OVERRIDE_FIND_PACKAGE
)
include(CPM)
set(TINYGLTF_BUILD_LOADER_EXAMPLE OFF)
set(TINYGLTF_INSTALL OFF)
set(TINYGLTF_HEADER_ONLY ON)
FetchContent_MakeAvailable(TinyGLTF)
if(tinygltf_POPULATED)
set(TinyGLTF_FOUND TRUE)
add_library(tinygltf::tinygltf ALIAS tinygltf)
elseif(${TinyGLTF_FIND_REQUIRED})
message(FATAL_ERROR "Could not fetch TinyGLTF")
endif()
CPMAddPackage(
NAME TinyGLTF
GIT_REPOSITORY "https://github.com/syoyo/tinygltf.git"
GIT_TAG "v2.8.21" # 4bfc1fc1807e2e2cf3d3111f67d6ebd957514c80
)
set(TinyGLTF_FOUND TRUE)
add_library(tinygltf::tinygltf ALIAS tinygltf)
else()
if (${TinyGLTF_FIND_REQUIRED})
find_package(TinyGLTF CONFIG REQUIRED)
Expand Down
Loading
Loading