Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AOV for Arnold Sky object?

15 REPLIES 15
Reply
Message 1 of 16
shawn
769 Views, 15 Replies

AOV for Arnold Sky object?

Is there a quick way to assign an AOV to an Arnold Sky object so I get a matte for that upon render?

I have a scene of a port with a ton of objects. I'd like to have a matte for the Arnold Sky object for possible compositing effects, but assigning an Object Mask to that Sky object does not generate a matte for me. Activating the background AOV doesn't work, either.

The only way I'm seeing to isolate that sky would be to add Object Masks to the scores of other objects in the scene. This doesn't strike me as a very efficient workflow.

Any thoughts? Thanks!

Shawn Marshall

Tags (2)
Labels (2)
15 REPLIES 15
Message 2 of 16
Eden_Soto2
in reply to: shawn

Have you looked into Custom AOVs?

Message 3 of 16
diego6S3FN
in reply to: shawn

I've always had the same problem and I haven't found any other solution than to put an Object Mask on the rest of the objects.

It would be nice to find a simpler solution,

Thanks,
Diego

Message 4 of 16
shawn
in reply to: shawn

Thanks for the replies. A Custom AOV doesn't appear to work with an Arnold Sky object. No matte is produced, just a black frame.

I guess you either apply Object Masks to every object in the scene or make the sky invisible to the camera and composite it in later using Trapcode Mir or something like that.

Cheers.

Shawn

Message 5 of 16
peter.horvath6V6K3
in reply to: shawn

Object mask tag works only on surface type objects, not on the sky unfortunately. The sky is available in the emission AOV by default or in the background AOV if you turn on the Indirect AOV flag on the sky.

I'm not sure if there's an easy way to get a mask, but I know a techy one. There's a variable which tells you the shading context, 2 means background. You can read this via the state_int shader and write it to a custom AOV, like this:

6223-sky-mask.png

Add this material to the AOV shaders in the render settings (Main > Advanced).

I'll take a look if it could be made user-friendly somehow.

Message 6 of 16
shawn
in reply to: peter.horvath6V6K3

Yes, a more user-friendly approach would be appreciated. I would think many users would appreciated such functionality.

Thanks!

Message 7 of 16
diego6S3FN
in reply to: shawn

Hello Peter, I've tried the AOV setup you proposed and I only get a black window in the IPR and final render.

I have put the material in AOV shaders in the render settings (Main > Advanced). and then I added the custom AOV but I only get black frame.


I'm on Mac v 2.5.1 can it be that the version is too old for this?


Thanks


Message 8 of 16

I've tested with 2.5.1 on mac and seems to work fine. Attached is a very basic scene.

sky_mask_test.zip

Maybe your use case is more complex and this solution does not work there?

Message 9 of 16
diego6S3FN
in reply to: shawn

Hello Peter, Thank you very much for the attached file.

Your example is exactly the same as what I had done from your instructions but since I tested it directly on a project I am working on and it doesn't work. Then after a lot of activating and deactivating things I have seen that if are using the fog for some reason I don't know this way doesn't work.

I'm sure there's an explanation for why it doesn't work if you use fog or atmospherics

I also wanted to ask if there is any way to get this mask but with fine antialias.

Thanks

Diego

Message 10 of 16

Right, that's a limitation of this technique, I'm afraid. Fog and atmosphere changes the shading context from background to volume. I can not think of any workaround for that.

Antialias depends on the filter. Select the AOV object and change the filter mode to custom to override the filter for this AOV specifically.

Message 11 of 16

Thanks for the explanation, also in the AOV filters.

Maybe later on will find a way to create a mask of the sky object, no doubt it will be something very practical.

Kind regards

Diego

Message 12 of 16

I'm planning to add this solution to the next release with the current limitations. Hopefully we can solve them later.

Message 13 of 16
shawn
in reply to: peter.horvath6V6K3

Thanks again for looking into this.

Can you suggest a workflow to add aerial perspective (haze that increases with distance) in a compositing app like After Effects? I can anticipate situations where I don't want to be rendering fog within Arnold but add it in compositing so I can dial it in later. Using the z-depth AOV in some manner?

Message 14 of 16
lee_griggs
in reply to: shawn

Can you render the fog (Y-axis) separately and composite that?

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 15 of 16
peter.horvath6V6K3
in reply to: shawn

You can add the object mask tag to an Arnold Sky or Background in C4DtoA 3.0.3. Note that there are some limitations, the background mask does not work if fog or atmosphere volume is used in the scene or with transmission.

Message 16 of 16
shawn
in reply to: peter.horvath6V6K3

Sweet, thanks!

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

Post to forums  

Autodesk Design & Make Report