question

Matt Mlodzienski avatar image
Matt Mlodzienski asked ·

Is it possible to lock/bake/cache ambient occlusion shaders?

I'd like to be able to use ambient occlusion nodes for procedural shaders - in this example, a road that has dirt built up along the curb. However, once I bring the environment into my animation scene, the cars also generate dirt underneath their wheels. Is there a way to 'freeze' an ambient occlusion shader to stop it from re-evaluating?

shadersshadermaterialnodes
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.

Lee Griggs avatar image
Lee Griggs answered ·

It may not be what you want. The cache shader only speeds up things under very specific conditions. So you will see no difference in look, just a speedup. 1) you need a slow shading tree 2) within that shading tree you need to find the sub-tree that is A) slow and B) feeds into multiple shader nodes. That pattern means that the slow subtree will be evaluated multiple times for every shader node it feeds into. In between those nodes and the slow subtree you insert a cache shader it should speed things up.

Maybe you want to use render the selection to texture instead?

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.

Matt Mlodzienski avatar image
Matt Mlodzienski answered ·

@Lee Griggs that did not seem to work. I've never used the cache shader before, and haven't found much documentation for it. The page there mentions diamond connections in Hypershade, which I definitely have seen before in shaders that I cannot find right now. Googling 'Maya hypershade diamond connector' doesn't bring anything up.

That page also does not have anything about how to use the cache shader. I inserted it in my network ahead of the ambient occlusion shader, ran a quick IPR, then moved a vehicle, ran the IPR again - the dirt moved with it. I tried this with 'caching' enabled, 'freeze' enabled, and both enabled - no luck. What am I missing?

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.

Lee Griggs avatar image
Lee Griggs answered ·

Have you tried the Cache shader?

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.