Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom filter per channel inverse density

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
alan-LFL
144 Views, 2 Replies

Custom filter per channel inverse density

Hi all,

During camera ray creation, we give a per channel weight to each sample. However, during a filter node, inverse density returns a float.

Is there some way I could access either a per channel inverse density or the per channel weight created in the sample?

I am limiting some samples to particular channels, so it is not guaranteed that all channels are sampled equally, which can lead to color bias in the results. If it isn't currently possible to access this per channel weighting in a filter, could that be put in as a feature request?

Cheers,

Alan.

Tags (1)
Labels (1)
2 REPLIES 2
Message 2 of 3
Stephen.Blair
in reply to: alan-LFL

You could create a custom AOV that stores the custom weights.
Then you can recover the weight the set at camera ray creation on the shading side with ray->weight if sg->Rt == AI_CAMERA_RAY or something along those lines, and store it in a custom AOV.
You can set this custom shader in options.aov_shaders. At filtering time, you just need to request this AOV as an additional auxiliary AOV.


// Stephen Blair
// Arnold Renderer Support
Message 3 of 3
alan-LFL
in reply to: Stephen.Blair

Hi Stephen, Thanks very much. Reading through the AOV API, I'm not 100% sure whether I need to register an AOV beforehand, or if I can just call AiAOVSetRGB with the name I want, and then call AiAOVGetRGB within my filter. Though I see the mention of AOVs being ignored if output drivers don't depend upon them ("AOVs are only enabled if there is an output driver which depends on a specific AOV for its input.") If I added the name and type of my custom AOV into my filter initialize, would that be adequate? It's not an output driver, so I wasn't sure.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report