-
Notifications
You must be signed in to change notification settings - Fork 39
Description
Hi all. I'm trying to get the sbsar plugin to work on our renderer. Though I got it to build, it's currently not generating the appropriate textures. I'm testing with Cardboard.sbsar and natural_lambskin_leather.sbsar from this repo. They both get this appearance:
I know that there is texture being generated because without the sbsar plugin, the asset just looks like this:
Checking the output log, it appears the USD data was created from the .sbsar files, but I'm not sure what could be causing the problem. I attached the output log below:
I'm suspecting these UsdUvTexture parameters:
- baseColorTexture
- metallicTexture
- normalTexture
- ambientOcclusionTexture
- roughnessTexture
These are processed as a file parameter as per the specifications for UsdUvTexture. Although in the output log their parameter type is string for the asset path.
Input name: baseColorTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard/images?usage=baseColor#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.48452919721603394,0.48452919721603394,0.48452919721603394\],"tearing":0.4000000059604645}.sbsarimage]" | path: /World/MatBall0/Material.inputs:baseColorTexture
Input name: metallicTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard/images?usage=metallic#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.48452919721603394,0.48452919721603394,0.48452919721603394\],"tearing":0.4000000059604645}.sbsarimage]" | path: /World/MatBall0/Material.inputs:metallicTexture
Input name: normalTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard/images?usage=normal#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.48452919721603394,0.48452919721603394,0.48452919721603394\],"tearing":0.4000000059604645}.sbsarimage]" | path: /World/MatBall0/Material.inputs:normalTexture
Input name: ambientOcclusionTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard/images?usage=ambientOcclusion#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.48452919721603394,0.48452919721603394,0.48452919721603394\],"tearing":0.4000000059604645}.sbsarimage]" | path: /World/MatBall0/Material.inputs:ambientOcclusionTexture
Input name: roughnessTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard/images?usage=roughness#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.48452919721603394,0.48452919721603394,0.48452919721603394\],"tearing":0.4000000059604645}.sbsarimage]" | path: /World/MatBall0/Material.inputs:roughnessTexture
Input name: baseColorTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard_1/images?usage=baseColor#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.8543058037757874,0.5838314890861511,0.3491901755332947\],"scale":80,"tearing":0.800000011920929}.sbsarimage]" | path: /World/MatBall1/Material.inputs:baseColorTexture
Input name: metallicTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard_1/images?usage=metallic#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.8543058037757874,0.5838314890861511,0.3491901755332947\],"scale":80,"tearing":0.800000011920929}.sbsarimage]" | path: /World/MatBall1/Material.inputs:metallicTexture
Input name: normalTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard_1/images?usage=normal#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.8543058037757874,0.5838314890861511,0.3491901755332947\],"scale":80,"tearing":0.800000011920929}.sbsarimage]" | path: /World/MatBall1/Material.inputs:normalTexture
Input name: ambientOcclusionTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard_1/images?usage=ambientOcclusion#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.8543058037757874,0.5838314890861511,0.3491901755332947\],"scale":80,"tearing":0.800000011920929}.sbsarimage]" | path: /World/MatBall1/Material.inputs:ambientOcclusionTexture
Input name: roughnessTexture | type: String | value: "/mnt/share/USD-Fileformat-plugins/sbsar/data/sbsar/DoubleCardBoard.sbsar[graphs/CardBoard_1/images?usage=roughness#packageHash=525fd058a1b3b486#params={"$outputsize":\[10,10\],"$randomseed":0,"cardboard_color":\[0.8543058037757874,0.5838314890861511,0.3491901755332947\],"scale":80,"tearing":0.800000011920929}.sbsarimage]" | path: /World/MatBall1/Material.inputs:roughnessTexture
I'd appreciate insight on why I have a problem with the generated texture. Were the texture parameters of UsdUvTexture processed properly? Is there a problem with the plugin or how the renderer supports the parameters?
Below is how I built the plugin:
System Info on Docker
- Ubuntu 24.04.3 LTS
- Python 3.12.3
- cmake version 3.28.3
- Ubuntu clang version 18.1.3 (1ubuntu1), Target: x86_64-pc-linux-gnu, Thread model: posix, InstalledDir: /usr/bin
- gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
- OpenUSD v25.11 (built on Nov 7 2025)
- Docker dev.env file:
Docker dev.env file:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/v25.05/bin:/home/sdromero01/share/USD-Fileformat-plugins/bin/bin:/mnt/share/USD-Fileformat-plugins/bin/plugin/usd
LD_LIBRARY_PATH=/mnt/share/USD-Fileformat-plugins/bin/lib:/usr/local/lib
PYTHONPATH=/usr/local/lib/python
PXR_PLUGINPATH_NAME=/mnt/share/USD-Fileformat-plugins/bin/plugin/usd
Steps to Reproduce:
- Download the SDK from Adobe Developer Console: substance-ubuntu22-v9.3.1-fb5c0b3b
- Move the SDK to ~/share then run tar -xf substance-ubuntu22-v9.3.1-fb5c0b3b.tar.bz2
git clone [git@github.com](mailto:git@github.com):adobe/USD-Fileformat-plugins.gitdocker run --env-file dev.env --rm -it -v /path/to/renderer:/renderer -e "DISPLAY=$DISPLAY" -v ./share:/mnt/share -v /tmp/.X11-unix:/tmp/.X11-unix renderer_depends:0.1apt updateapt install libgl1-mesa-dev mesa-common-dev- Change
#include <pxr/usd/usd/usdaFileFormat.h>to#include <pxr/usd/sdf/usdaFileFormat.h>andUsdUsdaFileFormatTokenstoSdfUsdaFileFormatTokensinsrc/sbsarfileformat.cpp cmake -S . -B build -DCMAKE_INSTALL_PREFIX=bin -DCMAKE_BUILD_TYPE=Release -Dpxr_ROOT=/usr/local -Dsubstance_DIR=/mnt/share/substance-ubuntu22-v9.3.1-fb5c0b3b -DUSD_FILEFORMATS_ENABLE_SBSAR=ON -DUSD_FILEFORMATS_ENABLE_FBX=OFF -DUSD_FILEFORMATS_ENABLE_GLTF=OFF -DUSD_FILEFORMATS_ENABLE_OBJ=OFF -DUSD_FILEFORMATS_ENABLE_PLY=OFF -DUSD_FILEFORMATS_ENABLE_SPZ=OFF -DUSD_FILEFORMATS_ENABLE_STL=OFF -DUSD_FILEFORMATS_FETCH_GTEST=OFF -DUSD_FILEFORMATS_FETCH_TINYGLTF=OFF -DUSD_FILEFORMATS_FETCH_HAPPLY=OFF -DUSD_FILEFORMATS_FETCH_FMT=OFF -DUSD_FILEFORMATS_FETCH_FASTFLOAT=OFF -DUSD_FILEFORMATS_BUILD_TESTS=OFFcmake --build build --config releasecmake --install build --config release
USD Build
The docker image contains the USD build, this is how it was built in the Dockerfile on November 7, 2025 (OpenUSD v25.08):
if cd OpenUSD; then git pull; cd ..
else git clone https://github.com/PixarAnimationStudios/OpenUSD
fi
python3 -m venv py_venv
source py_venv/bin/activate
pip install PySide6 PyOpenGL
sudo env "PATH=$PATH" py_venv/bin/python3 OpenUSD/build_scripts/build_usd.py $PREFIX \
--no-examples --no-tutorials --usdview --jobs ${BUILD_PARALLEL}
deactivate