I have a custom node that reads external files. When I copy a node, I hope that the node being copied can be converted to ginstance,e.g:
procedural { name aiStandInShape visibility 255 matrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 override_nodes off filename "D:/Test/ref_box.ass" }
procedural { name aiStandIn1Shape visibility 255 matrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 3.37979937 1 override_nodes off filename "D:/Test/ref_box.ass" }
procedural { name aiStandIn2Shape visibility 255 matrix 1 0 0 0 0 1 0 0 0 0 1 0 0 0 6.04571629 1 override_nodes off filename "D:/Test/ref_box.ass" }
they are all procedural create from maya standin ,But they will not repeat reading, shared memory, and not read ass file multiple times,like ginstance , How can I achieve this effect on my custom procedural when some conditions are corrects.
thanks a lots
Arnold knows when you're loading the exact same ass file over and over, so Arnold can cache that.
But Arnold cannot know exactly what your procedural is doing, so we cannot cache that result.
Arnold has it's own procedural cache, and takes care of caching ass files that are loaded by standins. You can't access that cache yourself. Arnold takes care of it.