Set Karma material based off PDG attribute

   2665   0   0
User Avatar
Member
8 posts
Joined: July 2018
Offline
I'm doing my first PDG workflow in order to create a number of unique variants of clouds. In PDG while creating wedges I'm using a number of attributes to then drive different settings of the clouds. For final renders I'm using a Karma ROP set to XPU as the final node in PDG to output the renders.




However, I'm having trouble with assigning materials and Karma XPU. Currently with Karma XPU if you assign a material using the Material SOP node, you get errors:

KarmaXPU: polymesh "" attribute shop_materialpath has unsupported type
KarmaXPU: polymesh "/geo_candidate/metal_stand/mesh_0" attribute shop_materialpath has unsupported type



The only way around this issue I've managed to find on my own is instead of applying the material inside the geometry SOP, I instead create a new geometry for each material I want, then do an object merge to merge the output of the object, and finally apply the material inside the render tab of that geo.

Is there a way to apply the materials using code instead of the material node that won't produce these errors?

I've also tried working with this in Solaris and then tried applying the material using a VEXpression, but I don't know how to point to the attributes created from PDG inside Solaris.

Basically, I want to make it so that depending the the base_rarity attribute, which can range from 0-8, I can apply a different material for each value.

Attachments:
PDG-attributes.jpg (188.6 KB)
pdg-network-view.jpg (409.8 KB)
pdg-render-error.jpg (471.1 KB)

  • Quick Links