Multiple outputs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I see that both Maya and Houdini for Arnold does not obey the Arnold spec around shader multiple outputs.
https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_user_guide_ac_release_notes_ac_rn_7000_html
Ie. let's say I have three outputs : color, distance and bump.
'color' being the default is indexed as -1 and should not be listed in node_parameters and so it should just appear in the output list in Maya or Houdini.. but it does not. I have to explicitely list it in node_parameters and also index it. Eventually I copy the same output also for -1 to support default.
This is not happening in C4DTOA (new editor) for example where the specification is followed correctly.
In code this should be something like this :
case SVoronoiOutput::COLOR: // -1 .. default output
sg->out.RGB() = AtRGB(Output.Color.x, Output.Color.y, Output.Color.z);
break;
case SVoronoiOutput::DISTANCE: // 0 .. first multiple output
sg->out.RGB() = AtRGB(Output.Distance);
break;
case SVoronoiOutput::BUMP: // 1 .. second multiple output
sg->out.FLT() = (Output.Position.x + Output.Position.y + Output.Position.z) /3.f;
break;
instead to be able to see 'color' output I have to ..
case -1: // -1 .. default output
sg->out.RGB() = AtRGB(Output.Color.x, Output.Color.y, Output.Color.z);
break;
case SVoronoiOutput::COLOR: // 0 .. color output
sg->out.RGB() = AtRGB(Output.Color.x, Output.Color.y, Output.Color.z);
break;
case SVoronoiOutput::DISTANCE: // 1 .. second multiple output
sg->out.RGB() = AtRGB(Output.Distance);
break;
case SVoronoiOutput::BUMP: // 2 .. third multiple output
sg->out.FLT() = (Output.Position.x + Output.Position.y + Output.Position.z) /3.f;
break;
}
It's not a problem at all because the last code block works cool also for C4DTOA. Maybe some minor cosmetic thing where DCC apz won't have the their usual default name for their default outputs. My main worries is if you plan to keep this thing consistent or not .. meaning if you're aware of this and won't change it later.
Potentially, the bug is : with multiple outputs we have to explicitely add and index a default output too or it won't be exposed in the UI while this is not part of the original multiple output specification.
Makes sense, what do you think ?
Btw, it looks super nice and useful.