Lights connected to Renderable Cameras

Hey there :slight_smile:

I'm having some trouble with a project I'm working on at the moment and was hoping I could find some help here.

I have a character that is being rendered from 8 different cameras for use in an isometric game. The problem is that I want the light to change with the camera so that it always appears to be coming from the same direction. I've had a look around and it seems MEL is the way to go, but I haven't found a solution.

What would be ideal is a script to use as a Pre-Render MEL in Render Options, so it just applies these light changes to the setup I already have.

I know very little about MEL. Basically what I want the script to do is see which camera is rendering and then turn on the corresponding light.

Thanks in advance :slight_smile:

Ben

Well you probably don't really need this at all its a just a problem of the rigging/rendering strategy. If you organize the thing differently then you can have just one camera that just takes all the 8 shots and thus youll know from the rig which of the directions is active easily.

Also just having 8 render layers does the trick more easily.

Basically what I want the script to do is see which camera is rendering and then turn on the corresponding light.

This script is doable but its not elementary easy to make since this is not what mel does. Mel is about organizing nodes not a master programmatic controller. this si definitely not something you should attempt as a novice.

So no documentation, no guarantees that its going to work.