question

Max Tarpini avatar image
Max Tarpini asked

Custom AOVs ain't obeying camera exposure

I mean I can understand that you think it''s better do it in post.. but then why standard material does it for its AOVs ? :) How am I supposed to do it manually.. is the exposure parameter exposed (no pun intended) somewhere and accessble from a custom shader ?

customaov-noexposure.png


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.

Stephen Blair avatar image
Stephen Blair answered

What kind of custom AOV?

I set up a simple scene in Maya, and I see camera exposure applied to a custom AOV
(I have a standard_surface writing to the custom AOV with an aiWriteColor)

1 comment
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.

Sorry I meant from code..

AiAOVSetRGB(..) does not consider camera exposure before writing the rgb data. However a 'camera' iirc does not have a base class where we have an exposure method to implement so not sure what to do when a custom camera is present for example, I was just looking for hints or something.

0 Likes 0 ·
Thiago Ize avatar image
Thiago Ize answered

I'm not entirely sure about this, but I think the camera exposure is automatically factored into the shading done through the bsdf system (look at ai_shader_bsdf.h). If your AOV comes from a LPE, I think it should have the exposure automatically applied. If it's more manual, then arnold might not know that exposure makes sense. For instance, exposure won't be applied to a normals AOV (that'd be weird, right?) but it will to a diffuse indirect AOV...

I believe the exposure is factored into the AtRay::weight field, so you could try multiplying that into your AOV if it's missing the exposure. Note that this will contain other things that weight the ray, like the camera's filter map if it has one, which may be a good or bad thing depending on what you want.

5 comments
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.

I'm writing AOVs in shader_evaluate() via AiAOVSetRGB() because AtBSDFLobeInfo() does nothing in regard to AOVs. How should I use it (because it's undocumented actually) to have it working properly ?

static const AtBSDFLobeInfo lobe_info[1] = {
                   {AI_RAY_DIFFUSE_REFLECT, 0, AtString("diffuse")}};

Then let's say I have ie. a simple diffuse BRDF.. that works just fine with AiBSDFIntegrate() but nothing is written to the 'diffuse' AOV. And how would the diffuse_direct, diffuse_indirect and diffuse_albedo worked out ?

0 Likes 0 ·

Hi Max. The ray type of the AtBSDFLobeInfo being AI_RAY_DIFFUSE_REFLECT should be enough for this BSDF to capture in diffuse reflection paths of LPEs. There's no need to provide anything but an empty AtString() unless you want to have a custom name to capture in the LPE.

0 Likes 0 ·

I see thanks. It also takes care of the camera exposure as Thiago mentioned. However it looks it works only with closures and not AiBSDFIntegrate, how can I supoprt LPEs with just AiBSDFIntegrate ?


0 Likes 0 ·
Show more comments
Alan King avatar image
Alan King answered

Unfortunately custom BSSRDFs are not currently supported through the closure API. You can however combine the result of your custom BSDF and one of arnold built-in SSS closures by combining them in an AtClosureList. Something like this:


shader_eval
{
   AtClosureList closures;

   closures.add(AiOrenNayarBSDF(sg, AI_RGB_WHITE, sg->N));

   closures.add(AiClosureRandomWalkV2BSSRDF(sg, AI_RGB_WHITE, AI_V3_ONE, AI_RGB_WHITE));

   sg->out.CLOSURE() = closures;
}
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.