Hey guys,
Recently i've managed to set up my own lighting system, and i think it'd be nice if it would move with the camera, so the lighting on your object changes along with the camera. (just like the default 1 light, only with 3 lights). Is this possible?
and is it possible to press a hotkey and drag the mouse button to turn the lights? (like in xnormal). that would really help me
.
hmm maybe we should make a .maxstart thread
.
Replies
Err... read 'turn the lights' as 'turn off the lights' instead of 'move the lights'.
It is a bit of a pain, not as simple as you'd think, since Max doesn't treat the viewports as cameras- instead of doing a constraint or script or expression, you need to create a redraw views callback.
Here is the latest version. Currently animations don't work (not a problem with the script, I just need to find a way around it, if you do it by hand the same thing would happen), but you can rotate the lights to change them.
http://tech-artists.org/hg/robgalanakis/rob_galanakis_scripts/raw-file/3dd26417d368/rg_constrainLightsToView.ms
If you're using spotlights, make sure you use a LookAt constraint (z axis) so they will point at your object if the camera pans away from it.
I wasn't sure if this was for working or rendering... if you want to use this while you model, for example (like a customized Default Lighting), there is no other way to do it, AFAIK. You can't control a camera like a viewport and you can't apply a controller to be affected by the viewport (they only update when objects or time changes). But yeah, if you want to use it while rendering to a certain camera it is real simple.
Actually I doubt my script would even work with rendering, since it is dependent upon Redraw Views, which I don't think happens during rendering.
There might be a way to constrain the camera to look at the selection when a key is pressed giving you a faux orbit rotate?
and Rob, that was exactly what i was talking about, having good lighting for modeling that changes along with the viewport.
I tried using your script, but how does it work? I created a simple scene with 3 lights, added some primitives to see how it'd work, then selected the lights and ran your script. (which i saved to ../scripts/startup, but i'm not sure that's necessary).
thanks again!
Tell me if you have any questions after reading that.
but here's the next problem .
before i hit the L2V button
after i hit the L2V button
edit: i could move them into the correct positions while in L2V mode, but, when i uncheck it and then turn it back on i'm screwed all over.
If you are sure you want to use Omni's, I can look into modifying the script.
EDIT: I should add in support to convert target lights to free lights, though.