Render @Ce

   1010   3   1
User Avatar
Member
99 posts
Joined: Sept. 2021
Offline
Hello,

I have @Cd for diffuse and @Ce for emission on the prims.
Now I can choose "Use point color" in the principledshader for diffuse as well as for emission. But it takes @Cd for both diffuse and emission.

I also tried an MtlX Geometry Property Value with a karma shader. That only worked in GL view, not in the rendering. So I'd prefer to solve this with a Principled Shader.

Do you know how to import another attribute to emit light independent from @Cd?
=================
Intel core i7 6700K
64 GB DDR4 RAM
Nvidia GeForce RTX 3060
User Avatar
Member
8173 posts
Joined: Sept. 2011
Offline
If you're rendering with Mantra, then you can't use MaterialX shaders. You can render with Karma in solaris or with a Karma ROP.

For Mantra, the name 'Ce' is already taken, so you'll have to change the name of your emission color to work with Mantra. Assuming you change the name to something like "emitcolor" or "myCe", then use a bind node in a Mantra VOP Material Builder and bind the name used for the attribute. The connect this bind to the Emission color input of the Principled shader. To also use Cd for diffuse color, create another bind with Cd as the name and connect to the Base Color input. This is because once an external connection exists, internal binds are lost.

For Karma, you have the right idea. Use a MtlX Geometry Property Value with the property name matching the geometry attribute name, unless the name is Cd, then use a geometry color node instead and connect the property value to the corresponding inputs of the standard surface shader in a karma or mtlx builder.
User Avatar
Member
99 posts
Joined: Sept. 2021
Offline
Thank you. Most times I will render with Karma now, cause I think it's the future. Yet I'm not always entirely comfortable with Mtlx, so I use principledshaders sometimes.

Confusing I can use Cd without additional nodes but not Ce. Your explanations are very helpful for that.

I noticed when in a ususal VEX Builder context like a matnet or materiallibrary, then some nodes like bind or MtlX Geometry Property Value are not there to create in the TAB menu. Then I have to find a proper subnetwork to create them there and copy them to the right place or make them available in the TAB menu history. Do you know a more efficient way to create these nodes straight in the place I need them?
=================
Intel core i7 6700K
64 GB DDR4 RAM
Nvidia GeForce RTX 3060
User Avatar
Member
8173 posts
Joined: Sept. 2011
Offline
freewind
I noticed when in a ususal VEX Builder context like a matnet or materiallibrary, then some nodes like bind or MtlX Geometry Property Value are not there to create in the TAB menu. Then I have to find a proper subnetwork to create them there and copy them to the right place or make them available in the TAB menu history. Do you know a more efficient way to create these nodes straight in the place I need them?

Only appropriate nodes are available in a given context based on the filters. A material library has a filter for only material nodes, no building block nodes. Matnet doesn't have any filter so you should be able to create any node there--although the global Render Engine filter still applies. The answer isn't to create the nodes in a more permissive context and copy back, it's to create the correct subnet/builder node to begin with. For karma create a Karma Material Builder or a USD Mtlx Builder node. For the principled shader, it wants you to create that inside a VEX Material Builder, but that's not without its caveats. If you really want unrestricted node creation in a material library, change the tab menu filter on the library to "*".
  • Quick Links