Recently had a chat with one of the developers at Autodesk, and he mentioned the Arnold-USD Hydra Delegate to me. I’ve started working on integrating it into blender but Im (once again), stuck with how to use Blender’s HydraRenderEngine.
I’ve got the ArnoldSDK working, and Arnold-USD built correctly. However, when I try linking it into Blender I’m getting this error.
Coding Error: in _Load at line 260 of /src/build_linux/deps/build/usd/src/external_usd/pxr/base/plug/plugin.cpp -- Failed to load plugin 'hdArnold': libai.so: cannot open shared object file: No such file or directory in '/home/hoske/.btoa/arnold-usd/plugin/hdArnold.so'
Coding Error: in CreateRenderDelegate at line 100 of /src/build_linux/deps/build/usd/src/external_usd/pxr/imaging/hd/rendererPluginRegistry.cpp -- Couldn't find plugin for id HdArnoldRendererPlugin
I’ve got the parent directory to libai.so in LD_LIBRARY_PATH, (as well as some other ones when I was testing). But Blender is not recognizing the library at all.
@classmethod
def register(cls):
import pxr.Plug
btoa = os.path.join(os.path.expanduser("~"), ".btoa")
arnoldsdk = os.path.join(btoa, "arnoldsdk", "Arnold-7.3.4.1-linux")
arnoldusd = os.path.join(btoa, "arnold-usd")
os.environ["ARNOLD_PLUGIN_PATH"] = os.path.join(arnoldusd, "procedural")
os.environ["PYTHONPATH"] = os.environ.get("PYTHONPATH", "") + ":" + os.path.join(arnoldsdk, "python")
os.environ["PXR_PLUGINPATH_NAME"] = os.environ.get("PXR_PLUGINPATH_NAME", "") + ":" + os.path.join(arnoldusd, "plugin") + ":" + os.path.join(arnoldsdk, "plugins", "usd")
os.environ["LD_LIBRARY_PATH"] = os.environ.get("LD_LIBRARY_PATH", "") + ":" + os.path.join(arnoldsdk, "bin")
print(os.environ.get("PXR_PLUGINPATH_NAME"))
print(os.environ.get("LD_LIBRARY_PATH"))
pxr.Plug.Registry().RegisterPlugins([os.path.join(arnoldusd, "plugin")])