Material Assignment on Delayed Load Geometry Shader

   4889   5   1
User Avatar
Member
7 posts
Joined: April 2015
Offline
Hello Community,

I have a file that renders perfectly in my .hip file.

1.- I have an OBJ with different groups, and a material assigned to each primitive by shop_materialpath.

2.- When I render in normal conditions it renders fine.

3.- If I export it as a bgeo and do NOT use delayed render… it works fine.

4.- When I use the bgeo as geometry shader for delayed render, and even though the path to each of my materials in the bgeo shop_materialpath exists… the object does not render correctly.

I have read A LOT of topics on this… and most of them were from Houdini 8, or 9. Nobody was asking this in a new version of Houdini so maybe it's only happening to me.
How can I “pack” or write to IFD my material definitions? Should I still include them in my new hip file?? People were talking of “activating” Declare All SHOPs, but that was way back in 2002… so… I kind of need more updated info. I'm running Houdini Indie.

It seems to me that rendering objects from disk with material assignments should be a pretty trivial thing in Houdini… but it's been days since I got stuck in this. Any help would be really welcome.

Thanks a lot,
Francisco.
User Avatar
Member
7760 posts
Joined: July 2005
Offline
I think the “Declare All SHOPs” parameter got renamed to “Declare Materials” (look in the Render tab in the Mantra ROP). If it's not there, try adding it from the Rendering properties. Enabling this will ensure that all material definitions will get written out to the IFD.
User Avatar
Member
7 posts
Joined: April 2015
Offline
Thanks for the response!

Ok… I found “Declare Materials” in the /out mantra node that I added.
Inside Rendering, inside Render, at the very bottom.

My question is… isn't this rendering the picture? How do I configure this to save the bgeo with all the materials? I can't seem to understand this part. I thought the materials were going to be saved in the bgeo when I did something as save geometry.

I'm also getting a rendering error when I enable this, so I cannot even try what would be the output. But it feels strange that I'm not telling the system where to save the resulting geometry.

You would be a life saver if you can clarify this for me! Thanks!!!
Francisco.
User Avatar
Member
7760 posts
Joined: July 2005
Offline
Ah, no, the materials have to exist in whatever .hip file you're rendering the picture from. Materials do not get saved in .bgeo files at all, they have have references to which material and possibly what parameter values to use for them.
User Avatar
Member
7 posts
Joined: April 2015
Offline
I may have not been able to communicate well my questions.

I understand that in an attribute like shop_materialpath we get the path to the referenced material that still has to exists in a hip file. And that is fine. I get that, and it's not a problem.

What I meant is HOW or WHERE is Mantra renderer saving my bgeo file with “Include all SHOPs”?? I found the Include SHOPs button… I just don't know how to use it. It's kind of confusing for me.

The only way I know to save a bgeo is doing RMB and Save Geometry. And that is also fine, but when I use that bgeo as a geometry shader file for a delayed_load geometry shader, then even with the materials existing in my hip file… they just don't render.

I need my bgeo to take in the materials referenced in his attributes even when doing delayed_load.

Thanks!
Francisco.
User Avatar
Member
8622 posts
Joined: July 2007
Offline
just set it to Save All SHOPs

Declare Materials describes which materials will be written to ifd, or scene description which Mantra would use to render your image

- the default, Save Only Referenced Materials, will save all shaders which are referenced by nodes that are being exported to render
if you are using Packed Disk or Delayed Load, where there is no reference in your scene to the materials, it will not save them to ifd, therefore when mantra loads bgeo from disk it will not find required material defined by shop_materialpath parm

- Save All Material SHOPs or Save All SHOPs will save all material/shading nodes from your scene to ifd regardles of their usage, so if you have all the shaders that your objects require, your packed disk geo will find them

so yes, you need to have the shaders in the scene you are rendering
Tomas Slancik
FX Supervisor
Method Studios, NY
  • Quick Links