question

Rida Simmou avatar image
Rida Simmou asked ·

KTOA : how to write custom AOVS from a shader

Hello,

How do you write custom AOVS.the input is multiple alsurface with custom massk and look, and i want to output that as an multiple aovs ?*

i tried multiple things without success

aovs
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mike Farnsworth avatar image
Mike Farnsworth answered ·

I assume this is KtoA 1.1.x? There is a built-in set of shaders: aov_write_float, aov_write_int, aov_write_rgb. Create one of those, and take the output of your other shaders (alSurface or whichever you want the output from) and plug it into the "passthrough" parameter. Then, you take the actual value you want to write to the AOV and plug it into the "input" parameter.

On the aov write shader make sure to set the name of the AOV you want.

To actually capture the AOV, you will also need to create an ArnoldOutputChannelDefine node that specifies the AOV as the channel. Set a name there as well, and then create a RenderOutputDefine node that uses that named channel.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Jonathan Rodegher avatar image
Jonathan Rodegher answered ·

Actually, scratch that. The error was a duplicated name that made the whole thing crash. It's working perfectly fine now.

Cheers.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Jonathan Rodegher avatar image
Jonathan Rodegher answered ·

Hi Mike, is there a way to use several aov_writes for the same shader? What I need is a set of masks that output only from one shader (characters eyes in this case), but it seems that if I input a aov_write to the passthrough of another aov_write, it doesn't work (I lose all connection to the shader btw).

So, let's say, I want to output RGB masks for iris/pupil/sclera, plus an AO pass, plus a sampler info, how should I go about that?

Thanks in advance for any insight you might offer.

Cheers.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Rida Simmou avatar image
Rida Simmou answered ·

Thank you Mike, this is working as magic.

Thank you

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.