Importing Material Assignments from Older HDAs

   3126   7   2
User Avatar
Member
12 posts
Joined: 12月 2014
Offline
hello Solaris team --

I have a tricky issue I've been trying to solve for a few days - I've got several years of HDAs, things like tables and chairs, which all assign materials in SOPs. In general these don't use groups, but rather assign materials before a merge. for example, a chair with a slatted seat and back would have slatMat assigned and legMat assigned, and then the two streams are combined for output.

i've got the material library in LOPs no problem - is there a way to assign it using shop_materialpath?

thanks!
User Avatar
スタッフ
4525 posts
Joined: 7月 2005
Offline
Put your HDA inside a SOP Create LOP, and hit the Auto-fill Materials button. This is exactly what happens when you put down a Test Geometry Pig node in the LOP context, since that geometry has two separate materials, using shop_materialpath to specify which parts of the geometry are assigned which material.
User Avatar
Member
12 posts
Joined: 12月 2014
Offline
Nice! This technique works great with HDAs. It would be nice if it would work with Object Merge nodes as well, to get to sop_materialpath from sops.
User Avatar
スタッフ
4525 posts
Joined: 7月 2005
Offline
Why wouldn't it work with an Object Merge? The SOP Create LOP doesn't care how the SOP geometry is created, as long as it has a shop_materialpath attribute...
User Avatar
Member
8043 posts
Joined: 9月 2011
Offline
mtucker
Why wouldn't it work with an Object Merge? The SOP Create LOP doesn't care how the SOP geometry is created, as long as it has a shop_materialpath attribute...

Is there any chance of the scene import doing this automatically at some point? It has a checkbox for importing 'sop materials', but it's a bit disappointing because it doesn't import sop material assignments.
User Avatar
Member
12 posts
Joined: 12月 2014
Offline
I'm not sure why it doesn't work, but it doesn't seem to work...
User Avatar
スタッフ
4525 posts
Joined: 7月 2005
Offline
Open the attached file and hit Auto-fill Materials on the SOP Create LOP. For me it creates the red, green, and blue materials for the three merged objects. Is this not what you're describing? Or does this hip file not work for you?

Attachments:
objmerge_materials.hip (397.8 KB)

User Avatar
スタッフ
503 posts
Joined: 6月 2020
Offline
jsmack
Is there any chance of the scene import doing this automatically at some point?

Supporting shop_materialpathvia SceneImport requires enough modifications to the current behaviour that I'm concerned about trying to change it in 18.5 (or below).
Edited by robp_sidefx - 2021年4月15日 06:39:39
  • Quick Links