USD Render ROP can not load opdef: texture

   2371   13   1
User Avatar
Member
75 posts
Joined: Dec. 2017
Offline

I make a hda and try to embbled texture into it(a texture on the light), it rendering fine with the viewport, but USD Render ROP can not read it correctly.
Houdini Version 19.5.368

file link: https://mega.nz/file/uoBjED6T#DOYqMDF-C1gWvfJ3WXdwua8PTmIdmhCLB3g0RwTBc4c [mega.nz]

Attachments:
missing_tx_from_hda.jpg (209.3 KB)

User Avatar
Staff
451 posts
Joined: June 2020
Offline
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.

Attachments:
opdef.png (1.2 MB)

User Avatar
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?
User Avatar
Staff
451 posts
Joined: June 2020
Offline
ysysimon
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?

Yes, that should work. I just tested locally with HOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdiniand I got the textures in the render.

Can you verify in Houdini's Python pane what hou.houdiniPath('HOUDINI_OTLSCAN_PATH')prints out?
User Avatar
Member
75 posts
Joined: Dec. 2017
Offline
robp_sidefx
ysysimon
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?

Yes, that should work. I just tested locally with HOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdiniand I got the textures in the render.

Can you verify in Houdini's Python pane what hou.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
User Avatar
Staff
451 posts
Joined: June 2020
Offline
ysysimon
robp_sidefx
ysysimon
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?

Yes, that should work. I just tested locally with HOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdiniand I got the textures in the render.

Can you verify in Houdini's Python pane what hou.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)? hythonshould be using HOUDINI_OTLSCAN_PATH.
Edited by robp_sidefx - Sept. 15, 2022 10:58:11
User Avatar
Member
75 posts
Joined: Dec. 2017
Offline
robp_sidefx
ysysimon
robp_sidefx
ysysimon
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?

Yes, that should work. I just tested locally with HOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdiniand I got the textures in the render.

Can you verify in Houdini's Python pane what hou.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)? hythonshould be using HOUDINI_OTLSCAN_PATH.



I made a typo, it should be fine.I used the correct one.
Edited by ysysimon - Sept. 15, 2022 11:06:23

Attachments:
QQ截图20220915230432.jpg (12.2 KB)

User Avatar
Member
75 posts
Joined: Dec. 2017
Offline
robp_sidefx
ysysimon
robp_sidefx
ysysimon
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?

Yes, that should work. I just tested locally with HOUDINI_OTLSCAN_PATH="/home/robp/Downloads/render_from_outside_husk_can_not_read_opdf:&" houdiniand I got the textures in the render.

Can you verify in Houdini's Python pane what hou.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)? hythonshould be using HOUDINI_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?

Attachments:
otl_problem2.jpg (5.7 KB)
otl_problem1.jpg (111.6 KB)

User Avatar
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.

Attachments:
render_from_python.jpg (80.6 KB)

User Avatar
Staff
4435 posts
Joined: July 2005
Offline
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?
User Avatar
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?
I run python and then import hou. I guess that's the problem? I will test it now!
User Avatar
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?
User Avatar
Staff
4435 posts
Joined: July 2005
Offline
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...
User Avatar
Member
75 posts
Joined: Dec. 2017
Offline
mtucker
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...
thank you for your reply
  • Quick Links