sourcing material from another houdini file ?

   1630   6   2
User Avatar
Member
42 posts
Joined: Oct. 2018
Offline
Hey peeps,
I am thinking on re writing a bit of my actual pipeline and I would like to be able to source my shaders from a master shader file instead of manually importing them each time. Is it possible ?
Thank you
User Avatar
Member
8837 posts
Joined: July 2007
Offline
You can potentially store them in .hda

Or in case of Solaris you an have your library as .usd
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
42 posts
Joined: Oct. 2018
Offline
Thank you for the input ! I am not sure ai want to go the USD route for just one guy … but the hda why not !
I was thinking maybe python would allow me to import a file and rename the mats on the fly. Well lots of possibility probably , need to dig in looks like no straight forward solution
User Avatar
Member
42 posts
Joined: Oct. 2018
Offline
Maybe that would be a way to get there:
https://www.sidefx.com/docs/houdini/hom/hou/fileReferences.html [www.sidefx.com]
User Avatar
Member
72 posts
Joined: Oct. 2018
Offline
tanguybc
Maybe that would be a way to get there:
https://www.sidefx.com/docs/houdini/hom/hou/fileReferences.html [www.sidefx.com]

Hi tanguybc !

Sorry !! Not really...

This will tell you only where your current HIP file has its external references.
hou.fileReferences()
((None, '$HIP/houdini19.0/otls/vop_vec2tohvec1.hdanc'),
(<hou.Parm taskgraphfile in /tasks/topnet1>, '$HIP/$HIPNAME.taskgraph.$F.py'),
(<hou.Parm pdg_workingdir in /tasks/topnet1/localscheduler>, '$HIP'))
(<hou.Parm baseNormal_texture in /obj/alarm_clock_01_1k_fbx/materials/alarm_clock_01>, '/home/BIG/3DStuff/Assets/alarm_clock_01_1ktextures/alarm_clock_01_nor_gl_1k.exr')
(<hou.Parm rough_texture in /obj/alarm_clock_01_1k_fbx/materials/alarm_clock_01>, 'Y:\\Poly Haven\\admin.polyhaven.com\\tmp\\Staging\\Models\\alarm_clock_01\\_upload\\fbx\\1k\\alarm_clock_01\\textures\\alarm_clock_01_rough_1k.jpg')
(<hou.Parm baseNormal_texture in /obj/alarm_clock_01_1k_fbx/materials/alarm_clock_01_glass>, '/home/BIG/3DStuff/Assets/alarm_clock_01_1k/textures/alarm_clock_01_nor_gl_1k.exr')
(<hou.Parm rough_texture in /obj/alarm_clock_01_1k_fbx/materials/alarm_clock_01_glass>, 'Y:\\Poly Haven\\admin.polyhaven.com\\tmp\\Staging\\Models\\alarm_clock_01\\_upload\\fbx\\1k\\alarm_clock_01\\textures\\alarm_clock_01_rough_1k.jpg')
[/code]
As in this case. It shows me really fast, why I don't get the render I want. The source of the FBX has set wrong paths for rough_texture.


What you could do is try this : Entagma short on "new" default scene [entagma.com]

entagma
In this tut we create a 123.py file which contains the command to merge a scene file into your new scene when Houdini launches: hou.hipFile.merge(“C:/Users/Your_User/Documents/houdini19.5/ mydefault.hip”)
Edited by GOgraphR - May 14, 2023 21:55:55
User Avatar
Member
42 posts
Joined: Oct. 2018
Offline
GOgraphR
tanguybc
Maybe that would be a way to get there:
https://www.sidefx.com/docs/houdini/hom/hou/fileReferences.html [www.sidefx.com]

Hi tanguybc !

Sorry !! Not really...

This will tell you only where your current HIP file has its external references.
hou.fileReferences()
((None, '$HIP/houdini19.0/otls/vop_vec2tohvec1.hdanc'),
(<hou.Parm taskgraphfile in /tasks/topnet1>, '$HIP/$HIPNAME.taskgraph.$F.py'),
(<hou.Parm pdg_workingdir in /tasks/topnet1/localscheduler>, '$HIP'))
(<hou.Parm baseNormal_texture in /obj/alarm_clock_01_1k_fbx/materials/alarm_clock_01>, '/home/BIG/3DStuff/Assets/alarm_clock_01_1ktextures/alarm_clock_01_nor_gl_1k.exr')
(<hou.Parm rough_texture in /obj/alarm_clock_01_1k_fbx/materials/alarm_clock_01>, 'Y:\\Poly Haven\\admin.polyhaven.com\\tmp\\Staging\\Models\\alarm_clock_01\\_upload\\fbx\\1k\\alarm_clock_01\\textures\\alarm_clock_01_rough_1k.jpg')
(<hou.Parm baseNormal_texture in /obj/alarm_clock_01_1k_fbx/materials/alarm_clock_01_glass>, '/home/BIG/3DStuff/Assets/alarm_clock_01_1k/textures/alarm_clock_01_nor_gl_1k.exr')
(<hou.Parm rough_texture in /obj/alarm_clock_01_1k_fbx/materials/alarm_clock_01_glass>, 'Y:\\Poly Haven\\admin.polyhaven.com\\tmp\\Staging\\Models\\alarm_clock_01\\_upload\\fbx\\1k\\alarm_clock_01\\textures\\alarm_clock_01_rough_1k.jpg')
[/code]
As in this case. It shows me really fast, why I don't get the render I want. The source of the FBX has set wrong paths for rough_texture.


What you could do is try this : Entagma short on "new" default scene [entagma.com]

entagma
In this tut we create a 123.py file which contains the command to merge a scene file into your new scene when Houdini launches: hou.hipFile.merge(“C:/Users/Your_User/Documents/houdini19.5/ mydefault.hip”)
Ah nice ! Exactly what I want to do

Thank you for tip GographR !
User Avatar
Member
72 posts
Joined: Oct. 2018
Offline
You're welcome !!
I had helping hands too as I needed them...
  • Quick Links