This project derives from mrAiVexShader to render Houdini Ocean spectra directly in Arnold, without exporting displacement maps or similar.
- An installation of Houdini
- The right compiler version matching your Houdini. You can find this in
Help > About Houdini > Show Details > Build platform
.
For Linux, this would be GCC 6.3 in the case of Houdini 18.5 (though Clang/LLVM also appears to work fine), for Windows, you'll need to install Visual Studio (include theWindows SDK
as well as theWindows 10 C++ SDK
), for OS X you'll need Xcode. For details, see the Houdini HDK documentation.
- Get the Arnold SDK for your system and Arnold version from SolidAngle and put it in
deps
. - Adjust the path to match your Arnold SDK and Houdini versions in
compile.sh
/compile.bat
(depending on your system, you just need to modify the .bat (Windows) or .sh (Linux/OS X)). - Windows only: you might also have to modify the
MSVCDir
line incompile.bat
to point to where you installed it
(by default, the system variable is used and if that is not defined, we assume Visual Studio Community Edition). - Run the script for your OS from the command line
- Copy
ai_ocean_samplelayers.dll/.so/.dylib
from thebuild
to thedso
directory in your Arnold installation (or wherever your Arnold looks for shaders).
Do the Same with the.mtd
file from thesrc
folder (this provides the shader UI). It's easiest to put both somewhere in yourARNOLD_PLUGIN_PATH
(and potentially add[ARNOLD_PLUGIN_PATH]
to the Procedural Path in the System section of your Arnold settings). - Start Houdini with Arnold and have some fun. (It's theoretically even possible to use this without Houdini, e.g in Maya or C4D, but you will probably use that to author the ocean spectra anyway.)
- Cache your ocean spectra to disk with the regular Houdini workflow for this.
- In you
Arnold Shader Network
orArnold Material Builder
, create a newAi Ocean Samplelayers
node. - Connect its output to the
input
slot of aVector Map
node withTangent Space
disabled, and connect that to thedisplacement
slot on yourMaterial Output
node. - The
a
output ofAi Ocean Samplelayers
corresponds to thecusp
output of Houdini'sOcean Sample Layers
node and can be used for shading
See the blog post
- At the moment, the Arnold render still starts significantly slower than the Houdini version, probably due to differences in renderer architecture/displacement performance.
- No possibility to export
velocity
orcuspdir
. This is due to Arnold shaders always having only one output. - the Anti-Alias Blur parameter is not supported. To achieve a similar result, just reduce the maximum subdivision iterations.
-
possibly provide better support for cusp by creating a separate shading node which outputs the value (and gets it from the main shader via message passing
-
create an auxiliary shader to output bump/normal maps for reducing the amount of subdivisions needed