Jump to content

packed primitives material assignment


Recommended Posts

  • 4 weeks later...

I agree, I only get two materials showing up in the viewport in your example.

I am not quite sure how the "pick" field is working either. There seems to be nothing entered in there for any of the four assignments in the packed edit SOP but somehow the materials are applied to the top and bottom groups.

When I try and click "pick" I don't get many options of what to pick...

 

Any thoughts?

Link to comment
Share on other sites

partially found in another thread : http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=30134&sid=5bc3852085c989c506218238701b0866

 

Create a primitive name attribute with `substr(prims("../"+opinput(".",0),$PR ,"shop_materialpath"),rindex(prims("../"+opinput(".",0),$PR ,"shop_materialpath"),'/')+1,50)`

you need to have assigned materials first. Then pack your geo with the name attribute checked.

Once you've copied it all you can pick the packed name on the packededit sop and re assign the material.

For me at least this is actually much slower than splitting each object based on material and creating a copy sop with "pack geometry before copying" checked and then merging it all back after assigning the material to the output.

I get much less memory usage this way and the viewport is much more responsive (with around 45 million packed polys).  I have submitted this as a bug and hopefully it'll be 'fixed' as I'm not sure if it's actually a bug.

 

Hope this helps.

  • Like 1
Link to comment
Share on other sites

What I thought was a bug was just me misunderstanding packed fragments/geometry.  Hopefully this should be useful for more people than just me:

The Pack SOP in tomorrow's build of Houdini (13.0.321) will have an option to specify if Packed Fragment or Packed Geometry primitives should be created when packing by name.

Link to comment
Share on other sites

  • 4 years later...
12 minutes ago, kiryha said:

That's works, danke!

Should I always use this option when using packed primitives? Why Mantra lose those materials in IFD if they are in the scene?

Yes you always have to use that option when using packed primitives. I'm not a 100% sure but I think for performance and efficiency reasons Houdini only saves those materials into the IFD where it knows (at time of IFD creation) that they are being used. Now if you pack away the geometry, Houdini doesn't see the material as used anymore (because it's only storing some reference to the packed geo).
 

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...