Arcon
03-18-2006, 10:03 PM
i'm setting up a render script that will assign an ambient occlusion shader to all my geometry (shaders with textured transparency will keep their texture but be white mattes). my render pass mel is pretty basic but can switch back and forth between the color pass and ao pass .... but the only way i know how to do it is for every shader i need a duplicate shader, which will be ao or white matte depending on the effect i'm after. the switch selects each shader and assigns its duplicate.
PROBLEM: in my scenes i average around 100 shaders - which would all need ao or matte duplicates. is there a better way to script this where all shaders can somehow reference a single ao shader...? i also need the ability to switch back to the original shaders which is what makes that tricky - there are many shaders with transparency and i would've thought they all need their own seperate matte shader for each unique transparency connection. or maybe there's something really simple i'm missing? calling shaders with mel like i'm doing is prefereable to calling objects (usually there are at least 5,000 scene objects).
btw i'm using 6.5. any pointers would be great - or just tell me if this can't be done :)
PROBLEM: in my scenes i average around 100 shaders - which would all need ao or matte duplicates. is there a better way to script this where all shaders can somehow reference a single ao shader...? i also need the ability to switch back to the original shaders which is what makes that tricky - there are many shaders with transparency and i would've thought they all need their own seperate matte shader for each unique transparency connection. or maybe there's something really simple i'm missing? calling shaders with mel like i'm doing is prefereable to calling objects (usually there are at least 5,000 scene objects).
btw i'm using 6.5. any pointers would be great - or just tell me if this can't be done :)
