ospray / hdospray

Rendering plugin for Pixar's USD Hydra
Apache License 2.0
119 stars 15 forks source link

Houdini + usdview and hdospray plugin #8

Closed nyue closed 11 months ago

nyue commented 3 years ago

I have build the render delegate

$ ls /home/nyue/projects/OSPray/hdospray/superbuild/install/plugin/usd/
hdOSPRay  hdOSPRay.so

I have not been able to use the plugin as the render delegate

What is the correct way to tell usdview about this new OSPRay render delegate ?

I tried the following but it does not register with usdview

env  PXR_PLUGINPATH_NAME=/home/nyue/projects/OSPray/hdospray/superbuild/install/plugin/usd usdview /home/nyue/Downloads/USD/Kitchen_set/Kitchen_set.usd

Cheers

nyue commented 3 years ago

Figured it out. The plugin path needs to point to the resources directory

env  PXR_PLUGINPATH_NAME=~/projects/OSPray/hdospray/superbuild/install/plugin/usd/hdOSPRay/resources
carsonbrownlee commented 3 years ago

thank you for this comment, sounds like we will need to issue a hot fix.

carsonbrownlee commented 3 years ago

@nyue just to make sure here, it seems you were not using the superbuild, is that correct? From the cmakelists.txt file located here https://github.com/ospray/hdospray/blob/master/scripts/superbuild/CMakeLists.txt, it sets the PXR_PLUGINPATH_NAME to the correct folder already. Perhaps I should put a guide in the build instructions for those that want to build houdini support without using the superbuild.

nyue commented 3 years ago

FYI am using superbuild.

Adding information about PXR_PLUGINPATH_NAME is useful information, I think it should be done independent of whether the user use superbuild or manual build.

carsonbrownlee commented 3 years ago

I see, can you post the generated setup_hdospray.sh script please? I completely agree about build information outside of the superbuild, that was an oversight.

nyue commented 3 years ago

Didn't know about that file, I may have miss the information in the README.md

Yes, the setup looks correct, it has a path set to the resources directory.

nyue@head0:~/projects/OSPray/hdospray/superbuild$ cat install/setup_hdospray.sh 
export HDOSPRAY_ROOT=/home/nyue/projects/OSPray/hdospray/superbuild/install
export LD_LIBRARY_PATH=${HDOSPRAY_ROOT}/lib:${LD_LIBRARY_PATH}
cd /opt/sesi/hfs-py3-18.5.547/toolkit/toolkit/cmake/../../
source houdini_setup_bash
cd -
export PXR_PLUGINPATH_NAME=${HDOSPRAY_ROOT}/plugin/usd/hdOSPRay/resources:${PXR_PLUGINPATHNAME}
carsonbrownlee commented 3 years ago

thank you, we'll add a section on running with houdini outside of the setup script in the next release.