How to import SOP-level materials into Solaris?

   4670   7   1
User Avatar
Member
444 posts
Joined: Aug. 2019
Online
We have Material SOP [www.sidefx.com] to assign materials to primitives in SOP context. We also have Assign Material LOP [www.sidefx.com] to assign materials to geometry subsets in LOP context.

But how to automatically import the former as the later? In other words, if I already have an object, which has materials assigned to its primitives in SOP context, how can I import it to LOP context?

SOP Import only imports /obj level material assignments, but not SOP level assignments.
Edited by raincole - Nov. 28, 2021 16:00:43
User Avatar
Staff
451 posts
Joined: June 2020
Offline
While each has its pros & cons, there are (at least) three ways to achieve this:

1 - Scene Import will handle SOP-level material assignment

2 - SOP Create wraps SOP Import and has a Materials tab with an "Auto-fill Materials" button (note it's a one-off, not a live-updating thing)

3 - The "Auto-fill Materials" button mentioned above is a Python scrips inside the SOP Create HDA which you could try extracting and running in a Python LOP
User Avatar
Member
444 posts
Joined: Aug. 2019
Online
@robp_sidefx Thank for your reply, but:

robp_sidefx
1 - Scene Import will handle SOP-level material assignment

I started this thread exactly because it doesn't work for me:





Green material in /obj and SOP level. No material in /stage. A bug?

I attached the .hip file too.

By the way, I copy-n'-paste the whole SOP network into a SOP Create and this:

robp_sidefx
2 - SOP Create wraps SOP Import and has a Materials tab with an "Auto-fill Materials" button (note it's a one-off, not a live-updating thing)

works for me, but SOP Scene Import doesn't work for the same SOPs. This leads me to believe it's indeed a bug.
Edited by raincole - Nov. 29, 2021 10:10:23

Attachments:
Screenshot 2021-11-29 225552.png (995.8 KB)
Screenshot 2021-11-29 225611.png (897.5 KB)
03.hipnc (1.1 MB)

User Avatar
Staff
451 posts
Joined: June 2020
Offline
Thanks for the test scene! Yes, unfortunately there's a bug right now where material assignment for packed prims isn't handled properly. It's on my radar (there are a few other similar cases), so hopefully addressed soon. Apologies for leading you down this dead-end!
User Avatar
Member
44 posts
Joined:
Offline
robp_sidefx
3 - The "Auto-fill Materials" button mentioned above is a Python scrips inside the SOP Create HDA which you could try extracting and running in a Python LOP


I chose number 3 because I would like to batch process large number of assets in TOP. Manually clicking through and pressing buttons to autofill materials and save to disk is all good but I can't get it to work in TOPS.

Attachments:
Screenshot from 2022-07-25 06-23-58.png (59.0 KB)

User Avatar
Member
85 posts
Joined: April 2017
Offline
raincole
@robp_sidefx Thank for your reply, but:

robp_sidefx
1 - Scene Import will handle SOP-level material assignment

I started this thread exactly because it doesn't work for me:

Image Not Found


Image Not Found


Green material in /obj and SOP level. No material in /stage. A bug?

I attached the .hip file too.

By the way, I copy-n'-paste the whole SOP network into a SOP Create and this:

robp_sidefx
2 - SOP Create wraps SOP Import and has a Materials tab with an "Auto-fill Materials" button (note it's a one-off, not a live-updating thing)

works for me, but SOP Scene Import doesn't work for the same SOPs. This leads me to believe it's indeed a bug.


Even the "Scene Import" is not importing the material for me.
User Avatar
Staff
451 posts
Joined: June 2020
Offline
jomaro
Even the "Scene Import" is not importing the material for me.

Can you provide a test scene for me to look at?
User Avatar
Member
85 posts
Joined: April 2017
Offline
robp_sidefx
jomaro
Even the "Scene Import" is not importing the material for me.

Can you provide a test scene for me to look at?

Thank you.
I did a lot of tests but it look like because the material from Vray imported via Cosmos Vray library (they use come custom nodes to connect the textures) Solaris can not recognize the Material Network.

Attachments:
vray_cosmos.hiplc (330.7 KB)

  • Quick Links