I'm a Python programmer and I want to import a USD model from Blender and convert its Principled materials to Redshift, most likely using a script.
I'm unsure what would be a solid strategy to tackle this challenge or how such things are usually done in Solaris since the imported materials are sort of locked out inside the stage. One idea that I had would be to export as USDA and use Python to replace bits of code responsible for the materials and construct new ones, and save it.
A much preferable workflow would be to keep it within Houdini without overwriting anything. Another idea that feels hacky would be to use Edit Material Network LOP to turn those stage materials into traversable houdini node trees. Lastly, my third idea would be to replace those materials purely within Python using something like the "UsdShade" I found in the pxr module (not sure if that's even possible).
Anyway, it's a niche problem and I don't expect much traffic here, but I'll appreciate any thoughts on the topic.
Automating material conversion to different engines
1081 3 1-
- alexmajewski
- Member
- 109 posts
- Joined: Aug. 2017
- Offline
-
- antc
- Member
- 354 posts
- Joined: Nov. 2013
- Offline
alexmajewski
or how such things are usually done in Solaris since the imported materials are sort of locked out inside the stage
Can you explain what you mean? The Blender materials should be available for to query. Assuming you’ve written python that’s able to create Redshift materials from a bunch of Blender materials you should be able to run that using a Python lop fairly easily.
-
- alexmajewski
- Member
- 109 posts
- Joined: Aug. 2017
- Offline
@antc I don't know how to properly traverse material properties in Solaris using Python. My current Blender materials are dead simple just Principled BSDF + Image Texture nodes.
Okay actually since writing that post I've made progress by dragging and dropping things from the Spreadsheet into the Python Shell, so I'm starting to learn how you could access those things. I'm slowly getting there.
Okay actually since writing that post I've made progress by dragging and dropping things from the Spreadsheet into the Python Shell, so I'm starting to learn how you could access those things. I'm slowly getting there.
-
- antc
- Member
- 354 posts
- Joined: Nov. 2013
- Offline
-
- Quick Links

