Community
Arnold for Maya Forum
Rendering with Arnold in Maya using the MtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Render a material to an AOV? Nothing fancy!

18 REPLIES 18
SOLVED
Reply
Message 1 of 19
aaronfross
1427 Views, 18 Replies

Render a material to an AOV? Nothing fancy!

Hi,

I cannot figure out how to simply output a particular material to its own AOV. I read the documentation, but it's all about how to replace one thing with another thing. I.e. how to create an AOV for object IDs, overriding the object material with a Utility shader. Well that is fine, but it does not help me understand how AOV Write nodes work in general. So I can't apply those general principles to my specific situation. The documentation just leads me down the garden path to a place I don't want to be.

What I need is to simply render out a particular material to its own AOV. I need to do this with emissive materials because they are not showing up in my light group AOVs.

The thing is, I thought I could just create an AOV Write RGBA and connect the output of an Arnold Standard Surface to both the passthrough and the AOV_input of the AOV Write RGBA. So the material will show up in the beauty pass as well as the AOV. But I cannot connect the output of Arnold Standard Surface to the AOV_Input slot. It accepts a map, but not a material? This is very strange.

Please tell me how I can output a particular material to its own AOV.

Thank you,

Aaron

Tags (3)
Labels (3)
18 REPLIES 18
Message 2 of 19
Stephen.Blair
in reply to: aaronfross

Standard Surface returns a closure, not a color, that's why you cannot connect to the AOV Input.

Can you use the Emission AOV? That should have all emissive materials.

If you need just one emissive material, and not the others, then perhaps you could use cryptomatte and a material ID pass to get the specific material.



// Stephen Blair
// Arnold Renderer Support
Message 3 of 19
aaronfross
in reply to: aaronfross

OK, thanks Stephen! I am very confused by the illustration on the docs page showing an Arnold Standard Surface material connected to the AOV Input of an AOV Write node.

https://docs.arnoldrenderer.com/display/A5AF3DSUG/AOV+Write

2625-image2016-9-14-11-0-23.png

Message 4 of 19
Stephen.Blair
in reply to: aaronfross

That looks like an old Arnold 4 screenshot, with the old Standard shader. I'll have that updated, thanks



// Stephen Blair
// Arnold Renderer Support
Message 5 of 19
aaronfross
in reply to: aaronfross

So we used to be able to do this in Arnold 4? Sounds like a feature regression to me. In this case I was barking up the wrong tree to solve my problem; AOV write wasn't the correct approach. But I can easily imagine situations in which it would be useful to output specific materials to their own AOVs.

Message 6 of 19
thebenp
in reply to: aaronfross

What was your solution, @Aaron Ross?

Message 7 of 19
aaronfross
in reply to: thebenp

@Ben Perkins

There wasn't a solution to the problem of rendering a material out to its own AOV. Apparently it is not possible anymore; that's progress.
My actual production challenge was to render the light coming from an emissive material as its own AOV. And that works fine with the built-in Emission AOV, as Stephen mentioned.

Message 8 of 19
aaronfross
in reply to: thebenp

But my emissive material was outside a window. The Emission AOV did not work through a transmissive object, i.e. window glazing. I guess I could have tried a Transmission AOV, but I don't think that would include the incident light from the emissive material onto the scene geometry. In the end, I gave up and just turned off all lights and rendered a beauty pass. So much for trying to do things the clever way.

Message 9 of 19
aaronfross
in reply to: thebenp

By the way, the 600-character limit on replies is lame sauce.

Message 10 of 19
jpolkVFNE7
in reply to: aaronfross

SolidAngle, are you listening? Not being able to do this is a huge issue.

Message 11 of 19
jpolkVFNE7
in reply to: jpolkVFNE7

However in our case we're just trying to generate a simple holdout matte AOV of a specific material. If no longer possible, then A5 just broke an important part of our pipeline.

Message 12 of 19
aaronfross
in reply to: aaronfross

Yeah, I still don't know how to output a material to its own AOV.

Message 13 of 19
Stephen.Blair
in reply to: jpolkVFNE7

@Jim Polk You can still plug a Standard Surface into the Beauty port of a Write Color node. The color for the holdout matte goes into the Input, and that is what is written to the AOV



// Stephen Blair
// Arnold Renderer Support
Message 14 of 19
jpolkVFNE7
in reply to: Stephen.Blair

Hmm, I don't see a 'beauty' param on the MtoaWriteColor node...but we're a few versions behind the curve..

arnold-5.1.0.1:-version option
node: MtoaWriteColor
type: shader
output: RGBA
parameters: 5
filename: /muse/prod/arnold-5.0.2.4/mtoa-maya20165-2.1.0.2/shaders/mtoa_shaders.so
version: 5.0.2.3

Type Name Default
------------ -------------------------------- --------------------------------
RGBA passthrough 0, 0, 0, 1
RGB aov_input 0, 0, 0
STRING aov_name
BOOL blend_opacity false
STRING name

Message 15 of 19
Stephen.Blair
in reply to: jpolkVFNE7

@Jim Polk

It's the passthrough
In the current MtoA, I use an aiWriteColor node, which comes out as:

aov_write_rgb
{
 name aiWriteColor1
 passthrough aiStandardSurface1
 aov_input 1 0 0
 aov_name "holdout_matte"
}




// Stephen Blair
// Arnold Renderer Support
Message 16 of 19
jpolkVFNE7
in reply to: Stephen.Blair

Thoughts?

00:00:00 249MB WARNING | unable to connect standard_surface() to MtoaWriteColor(passthrough) - types are not compatible (CLOSURE to RGBA)

Message 17 of 19
jpolkVFNE7
in reply to: jpolkVFNE7

Just a reminder, we only use Maya for modeling, we don't use it for rendering.

Thanks,

Message 18 of 19
Stephen.Blair
in reply to: jpolkVFNE7

You need to use aov_write_rgb, not MtoAWriteColor
aov_write_rgb is in Arnold 5.1.0.1
not sure if that older MtoA exposes it, I have to check

aov_write_rgb takes a CLOSURE for the passthrough, that's what is needed to connect Standard Surface



// Stephen Blair
// Arnold Renderer Support
Message 19 of 19
jpolkVFNE7
in reply to: jpolkVFNE7

Ahh, ic, my bad...that does indeed work <big sigh of relief>
Thank you very, very much,

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

Post to forums  

Autodesk Design & Make Report