how to set up n materials for n render engines?

   796   1   0
User Avatar
Member
1 posts
Joined: Nov. 2022
Offline
Hi all,
I am trying to start using the component builder in h19 to author usd assets for my asset library. This seems like a super cool way to do things, but I am bumping into a few issues I currently cannot figure out.

So, inside the material library creating one material x for karma, one rs material for redshift, use a collect node and then, in the viewport, switch between the renderers works.
Now comes my issue: I have an object consisting of multiple seperate meshes. These meshes has primitive groups with names according to what they are. Now I want to set up multiple materials, say 1 rubber mtl, 1 plastic mtl, 1 metal mtl, and assign them to the various meshes of this object as needed. In the component material node I can hook up primitives to materials using geometry subsets derived from my group, in the multiparm, to add as many materials as I need. That works as long as I am only using my material x for karma.
However...
How do I now set up the same amount of materials for redshift in such a way that when I switch my renderer in the viewport I switch to the redshift materials that are supposed to use the same "groups"/subsets?? Because by setting up the material assignments manually they seem to override everything.
Is there a way to solve this issue INSIDE the material library such that everything can be wired to a collect node and work as when you have only to switch between two materials that are assigned to the whole object? In other words can I get access to my groups/subsets inside the material library? Or is there another way to do this?
Also, can one chain together several collect nodes? As in when one has to use a collect node to pipe in displacement but need more collects to grab the materials from other render delegates?
User Avatar
Staff
1450 posts
Joined: July 2005
Offline
Your material primitive should contain both Redshif shader and Karma shader, so there should be no difference which renderer you use in the viewport. The render delegate will pick the shader it supports: Redshift will use redshift shader and Karma will use MaterialX (or VEX) shader primitive.

You can wire both Redshif shader and Karma shader into the same Collect VOP node. You cannot chain together several collect nodes, however; you should be able to connect all shaders to the single collect node.

In USD, you can bind only one material prim to geometry; but that material can contain shaders for many render delegates (eg, Redshift and Karma) and different shader types for the same delegate (eg, Karma surface shader and Karma displacement shader).
  • Quick Links