I've seen in the renderman doc's that you can add object group names to geometry and then use these in LPE's to render only specific pieces of geo. I can't find any documentation on how to do this in arnold. Is it possible?
Thanks,
Aaron.
Solved! Go to Solution.
Solved by Stephen.Blair. Go to Solution.
there is a workaround.
If you write a shader and tag it's closures, you can isolate the tagged closures with the LPEs.
In OSL it would be like this:
closure color diffuse = diffuse(N, "label","MyTag")
then the LPE:
C<RD'MyTag'>.*
writing a good shader it's hard but if you are into it it should work.
You can find some docs here:
https://support.solidangle.com/display/A5ARP/Light+Path+Expression+AOVs
and here:
https://github.com/imageworks/OpenShadingLanguage/wiki/OSL-Light-Path-Expressions
Hello,
I'm digging this thread up because I'm trying to reproduce these workflow: A Custom OSl shader to get per object aov with tag, but without success.
Here my osl code
shader diffuse(
color DiffuseColor = color(0.8, 0.8, 0.8),
output closure color CL = diffuse(N,"label","MyTag"))
{
CL = diffuse(DiffuseColor);
}
and my custom AOV with LPE:
C<RD'MyTag'>.*
C<RD['MyTag']>.*
(i tried both).
The end goal is to isolate emission contribution from differente emissive object. So i tried also without succes:
shader emit(
color EmitColor = color(1, 1, 1),
float Intensity = 1,
output closure color CL=emission("label","MyTag")
)
{
CL = emission() * EmitColor * Intensity;
}
C<O.'MyTag'>
Ok I make it work eventually.
OSL shader
shader emit(
color EmitColor = color(1, 1, 1),
float Intensity = 1,
output closure color CL=emission("label","mytag")
)
{
CL = emission("label","mytag") * EmitColor * Intensity;
}
LPE
C<R><O.'mytag'>
Which give me only the emission for the object with the osl shader.
To be honest i tried random combination for the regex LPE until it work, so it's may not be the correct way to do that.