Build Moonray 1.5.0.0 for Houdini with Docker #2
Replies: 5 comments 17 replies
|
Nice guide, thanks for sharing! |
|
Nice work. Did you consider using Docker via Distrobox (https://github.com/89luca89/distrobox)? It should theoretically overcome many of the issues, especially those related to GPU. |
|
I compiled Moonray against Houdini 20 as instructed in description above (with some changes, like increased version of Embree, and building in Centos 7 container, not Rocky Linux). After all operations Houdini has Moonray viewport in Solaris - and it is working. However, when I want to use hd_render/hd_usd2rdl in terminal, I have error: Could not find platform independent libraries Current thread 0x00007f626ef2c9c0 (most recent call first): What could be reason for that? |
|
Am I the only one waiting on the new release to make this a bit more user friendly. |
|
Hello, Great guide. This is the furthest I have gotten in building Moonray for Houdini. While building, I ran into an issue with the Boost library. I manually created that file but kept it empty, and that seemed to make it pass that build step. However, I was wondering if you have that file and what the contents of the file are? The build then fails again with: Also, a Boost-related error: Not sure what I have done wrong? Thanks again. |

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello there! I'll show the steps I made for successfully build
Moonray for Houdiniusing Docker.Building Moonray for Houdini requires using Houdini's libraries, for that we'll build an environment similar to the VFX Platform CY2023 Specification (as mentioned here)
0. Current Issues
Report your issues in the comments so we can get constancy. Thanks!
1. Prepare
Create an empty directory and copy the following:
- Houdini Dir: /opt/hfs20.0
- Optix SDK 7.6: We can download it from here.
- CMake Houdini Configs: https://docs.openmoonray.org/assets/build_extras/moonray_houdini_pxr_config.tar
- Moonray Source Code:
git clone --recurse-submodules https://github.com/dreamworksanimation/openmoonray.git2. Patching
We'll need to apply some patches to make Moonray buildable for Houdini 20.0:
- pxr-houdini: This patch sets USD version to 23.08, support for python 3.10 and repaths some libraries.
Patch file
- Moonray: This one fixes building for USD <23 (see here) and a fix for exr 3.0 (see here)
Patch file
- CMakeLists: Custom version of CMakeList to build the dependency versions I tested.
CMakeLists.txt
HDAs not working
I encountered an error while trying to use Moonray VOPs, seems like this commit broke the HDAs. So we would need to revert the files only on the
moonray/moonray_dcc_plugins/houdini/otlsfolderYou can use v1.0.0.0: https://github.com/dreamworksanimation/moonray_dcc_plugins/tree/v1.0.0.0
2. Building
Create an empty file in the directory named Dockerfile with this content:
You may want to change the cuda version to be in pair as your local machine.
https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/
Congrats! you can start building moonray with this command:
WARNING! This command may take a while to complete since it will download and build large packages.
3. Installing
Once the previous command finishes correctly we should have a new docker image in our local machine, run it using:
Open a new terminal and run:
Find the "CONTAINER ID" of your docker image, in my case the ID is "5973ae7005cf":
Using the Container ID, extract the moonray directory to your local machine:
Go to the extracted Moonray directory. In my case I cleaned up the folder a little:
Delete
cmake-3.27.2-linux-x86_64, moveopenmoonraycontents to the parent directory and movelib64files tolib.Copy the python3.9libs directory to python 3.10libs since that is the python version that Houdini uses:
Run this command once:
4. Setup Environment
For Moonray to work, you'll need to add some environment variables to your system and houdini.env.
Add this line in your houdini.env:
And add those environment variables in your system (in a terminal before launching houdini or creating a sh file):
5. Inside Houdini
You can now find Moonray inside Solaris! As of now, there some things that you should now.

Moonray Shaders inside Solaris (H20.0)
As of Houdini 20.0, VOP nodes inside Solaris have been splitted into different subnetworks. To use Moonray VOPs you need to add
moonrayto the Tab Menu Mask in any of those Builders.Geometry Settings
We can use the LOP Wrangle Node to add our desired geometry settings as the documentation says:
However we can also create them using the
Edit Propertiesnode.I hope that this guide helped you build Moonray, can't wait to use it in my personal projects soon.
Feel free to comment some feedback for this guide if you can, as I don't have any experience on Docker and learnt on the fly.
Happy creating!
All reactions