View Full Version : Camera renderability and light visibility

08-12-2011, 04:41 PM
Hey CGSociety. First post here.

I have ran into quite a dilema!

I have a render set up for a multi model, multi asset character animation scene that hast to be rendered in an isometric view at 8 - 16 angles. Originally what I had was 16 render layers, each with its respective camera and layer. This was working but down the road when I need to render off multiple assets and multiple characters, renaming each animation frame range and changing the numbers of the frame frange will become far too overwhelming.

I have since ditched the old method and now I have a render layer for each animation (i.e. the "Run" layer has a render override for frames 1 - 24, and it renders off each camera separately in mayas renderable cameras render attributes. The result is I can render off 10 separate animations, each with 8 - 16 cameras, all named (<Render Layer>_<camera>), with the press of one batch render. This greatly increases the efficiency.

The problem with this method is that I can only use a direct overhead light, or ambient light. The character's actual rotation doesn't change, only the cameras do, so I need to have a light associated with each camera like I had in the original render set up. This worked before because I could add (eg. Southeast Light) to the (Southeast) render layer and have the (southeast camera) to the renderable camera. But like I said before, this would become too tedious in the renaming of every animation.

Opening up the hyper-shade I see that the cameras themselves have a renderable attribute, that when hooked up to the render layer renderable camera attribute, are connected to its respective plug (Which only applies to cameras, as far as I can tell). I have tried connecting the lights render info, render layer info, visibility, etc, to the respective plug, but all without any success. What I get is all my angles, and all my correct naming conventions, all with 16 lights making a blown out image. The only thing I can think of to solve this is if the lights themselves had a 'renderable' attribute like the cameras do, so that I can drive their renderability with the camera renderability.

Can anyone here offer me any suggestions or support with this? I would greatly appreciate it!

08-13-2011, 01:37 PM
Welcome to cgtalk.

A light's renderability can be controlled by its visibility flag.
It sounds like you are launching the batch render from within maya. I think you would do better if you used command line where you will have more control. You can specify renderLayers and cameras using command line flags. You can turn lights on and off with a preRenderMel script. You can create a batch of command line renders using a simple text file, but most people end up using a renderManager application (and there are several free ones around).

However, for efficiency you could create a control node and hook a userAttribute through some condition nodes to the renderable flag of your cameras and the visibility of your lights (and anything else that you need). Your preRenderMel script would simply need to set the value of that attribute to configure your camera and light selection.


CGTalk Moderation
08-13-2011, 01:37 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.