USD Render ROP can not load opdef: texture
2371 13 1- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
- robp_sidefx
- Staff
- 451 posts
- Joined: June 2020
- Offline
- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
robp_sidefx
I believe the issue you're seeing here is that the HDA is installed into the HIP file but isn't picked up generically by Houdini/husk. If you copy the HDA to somewhere in the paths where it'll get picked up all the time, you'll get the texture showing up.
I set HOUDINI_OTSCAN_PATH , won't this work with husk?
- robp_sidefx
- Staff
- 451 posts
- Joined: June 2020
- Offline
ysysimonrobp_sidefx
I believe the issue you're seeing here is that the HDA is installed into the HIP file but isn't picked up generically by Houdini/husk. If you copy the HDA to somewhere in the paths where it'll get picked up all the time, you'll get the texture showing up.
I set HOUDINI_OTSCAN_PATH , won't this work with husk?
Yes, that should work. I just tested locally with
HOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdini
and I got the textures in the render.Can you verify in Houdini's Python pane what
hou.houdiniPath('HOUDINI_OTLSCAN_PATH')
prints out?
- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
robp_sidefxysysimonrobp_sidefx
I believe the issue you're seeing here is that the HDA is installed into the HIP file but isn't picked up generically by Houdini/husk. If you copy the HDA to somewhere in the paths where it'll get picked up all the time, you'll get the texture showing up.
I set HOUDINI_OTSCAN_PATH , won't this work with husk?
Yes, that should work. I just tested locally withHOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdini
and I got the textures in the render.
Can you verify in Houdini's Python pane whathou.houdiniPath('HOUDINI_OTLSCAN_PATH')
prints out?
I seem to find the problem, I start rendering from hython, but the houdini session started by hython doesn't read the HOUDINI_OTSCAN_PATH , so that's causing the problem, what can I do? Maybe I should look into the python api documentation
- robp_sidefx
- Staff
- 451 posts
- Joined: June 2020
- Offline
ysysimonrobp_sidefxysysimonrobp_sidefx
I believe the issue you're seeing here is that the HDA is installed into the HIP file but isn't picked up generically by Houdini/husk. If you copy the HDA to somewhere in the paths where it'll get picked up all the time, you'll get the texture showing up.
I set HOUDINI_OTSCAN_PATH , won't this work with husk?
Yes, that should work. I just tested locally withHOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdini
and I got the textures in the render.
Can you verify in Houdini's Python pane whathou.houdiniPath('HOUDINI_OTLSCAN_PATH')
prints out?
I seem to find the problem, I start rendering from hython, but the houdini session started by hython doesn't read the HOUDINI_OTSCAN_PATH , so that's causing the problem, what can I do? Maybe I should look into the python api documentation
Sorry, just to be sure, are you using
HOUDINI_OTLSCAN_PATH
(good) or HOUDINI_OTSCAN_PATH
(bad)? hython
should be using HOUDINI_OTLSCAN_PATH
.
Edited by robp_sidefx - Sept. 15, 2022 10:58:11
- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
robp_sidefxysysimonrobp_sidefxysysimonrobp_sidefx
I believe the issue you're seeing here is that the HDA is installed into the HIP file but isn't picked up generically by Houdini/husk. If you copy the HDA to somewhere in the paths where it'll get picked up all the time, you'll get the texture showing up.
I set HOUDINI_OTSCAN_PATH , won't this work with husk?
Yes, that should work. I just tested locally withHOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdini
and I got the textures in the render.
Can you verify in Houdini's Python pane whathou.houdiniPath('HOUDINI_OTLSCAN_PATH')
prints out?
I seem to find the problem, I start rendering from hython, but the houdini session started by hython doesn't read the HOUDINI_OTSCAN_PATH , so that's causing the problem, what can I do? Maybe I should look into the python api documentation
Sorry, just to be sure, are you usingHOUDINI_OTLSCAN_PATH
(good) orHOUDINI_OTSCAN_PATH
(bad)?hython
should be usingHOUDINI_OTLSCAN_PATH
.
I made a typo, it should be fine.I used the correct one.
Edited by ysysimon - Sept. 15, 2022 11:06:23
- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
robp_sidefxysysimonrobp_sidefxysysimonrobp_sidefx
I believe the issue you're seeing here is that the HDA is installed into the HIP file but isn't picked up generically by Houdini/husk. If you copy the HDA to somewhere in the paths where it'll get picked up all the time, you'll get the texture showing up.
I set HOUDINI_OTSCAN_PATH , won't this work with husk?
Yes, that should work. I just tested locally withHOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdini
and I got the textures in the render.
Can you verify in Houdini's Python pane whathou.houdiniPath('HOUDINI_OTLSCAN_PATH')
prints out?
I seem to find the problem, I start rendering from hython, but the houdini session started by hython doesn't read the HOUDINI_OTSCAN_PATH , so that's causing the problem, what can I do? Maybe I should look into the python api documentation
Sorry, just to be sure, are you usingHOUDINI_OTLSCAN_PATH
(good) orHOUDINI_OTSCAN_PATH
(bad)?hython
should be usingHOUDINI_OTLSCAN_PATH
.
I printed hou.houdiniPath('HOUDINI_OTSCAN_PATH') and hou.hda.loadedFiles().
It seems that hda is in hou.hda.loadedFiles, but hou.houdiniPath('HOUDINI_OTSCAN_PATH') does not point to the path of this hda, is this the reason?
- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
I found that this is a hython problem, not husk's, when the rendering is started inside houdini, there is no problem, but using hython to read the hip file and then start the rendering, the file inside hda will not be correctly read.
Also, I didn't find any way to make hython read hda, neither hou.hda.reloadAllFiles() nor hda.installFile work.
Also, I didn't find any way to make hython read hda, neither hou.hda.reloadAllFiles() nor hda.installFile work.
- mtucker
- Staff
- 4435 posts
- Joined: July 2005
- Offline
- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
mtuckerI run python and then import hou. I guess that's the problem? I will test it now!
That python script looks like you are running python and importing the hou module, which is not the same as running hython (which does a bunch of useful environment variable initialization and such)... Just wanted to check if you're actually running that script with hython or python?
- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
mtucker
That python script looks like you are running python and importing the hou module, which is not the same as running hython (which does a bunch of useful environment variable initialization and such)... Just wanted to check if you're actually running that script with hython or python?
You're right, running directly with python and importing hou doesn't set the environment variable! No problem when using hython, thanks a lot for your help, but still wanted to ask, is there a way to set environment variables using python?
- mtucker
- Staff
- 4435 posts
- Joined: July 2005
- Offline
- ysysimon
- Member
- 75 posts
- Joined: Dec. 2017
- Offline
mtuckerthank you for your reply
You should be able to manipulate the `os.environ` dictionary in python before doing `import hou`, and Houdini should see all the environment modifications you've made. I'm not sure if we have a list of exactly what hython does to the environment in the docs anywhere...
-
- Quick Links