Sunday, 28 October 2012

UH 3; Lesson 1: Lighting


The best way to adequately light a CG scene or piece of geometry (especially reflective materials) is to not use lights.
"Don't use lights, your talking crazy!"; I'm hearing you say.
But don't fret.
Yes, the first rule of lighting is to use lights. However the easiest way to light a scene is to not use lights. It's a technique that many people overlook- to use a Blinn (for more simple, lesser quality renders) or the Mia_Material_X_Passes shader I've been banging on about. (To easily access this, in Maya go to: Window-Node Editor. While in the Node Editor, press the 'tab' key on your keyboard  This will bring up a typing bar. Type the word 'Mia' and it should come up in the list of Mia shaders. Select Mia_Material_X_passes. Press enter. Not enter on your number pad because that doesn't work. Why? Because Maya is a bastard, is why.
This will create a new node.
Now this is in place, it will ultimately determine how light will react with the assigned object. The Mia shader allows light to behave in a way that literal light does. So if you have a mirror then it will bounce off of every angle, yet on skin, it will successively bounce around in the pores of the skin, illuminate your Sub-Surface_Scattering (SSS) shaders if your fancy enough to include these. (Seriously, it includes Node-Based processes but it's more than worth studying and applying SSS to your animal/humanoid models. Look at the 'Spirit Of The West' from the film 'Rango'- the guy has 5 layers worth of textures applied to his face, and it looks bang tidy!)
So you should now Create a polygon sphere. Make this big enough to encapsulate your entire scene, so its almost as if your entire scene has been placed in and is magically levitating, a goldfish bowl. Right mouse button-go down the menu to Paint-3D Paint- select. This will bring up the 3D Paint sidebar.
What this enables you to do, it to LITERALLY PAINT LIGHT.
Select your brush, width ect and literally paint onto the outside of the polygon sphere what your environment is. (i.e. If your doing a sunset scene, then paint the sunset onto the side of the sphere that the 'sun' will be coming from.) When you paint lighter colours, the Mia shader (or Blinn) will reflect the image you have painted, but it won't be 100% clear. You'll need to adjust the attributes ect for this to take full effects (play around with all of the settings you need to create your desired look.) Personally at this moment in time I'm not completely sure how to paint over paint layers already applied, but I'm sure there are many online tutorials on the 3D Paint tool in Maya. Also because it's currently 4.34am and I haven't changed my clocks back for winter yet... But The 3D Paint tool has been an option in Maya ever since the second edition of Maya. We are now on the 14th Edition, so it must be good, right?
If your render your scene and make sure you turn on Final Gather in your Render Settings window, then you 'should' be able to see the light reflected from your surface in the general pattern of your 3D Painting. (Note: Unless your boosting the reflectivity up to 10 in the materials attributes then your painting doesn't have to be high quality at all. Think about it: Unless your using a mirror (you foolish people, stay away from them!) then even glass doesn't reflect any image perfectly.)
(This only works with Final Gather. If your working with the Maya Software renderer then you really are a fool. If Maya Software MUST be used, then put your geometry and the painted sphere into a different render layer. Go to 'layers' in your channel box/layer editor and right click on your sphere layer. Go down to Pass Contribution Maps- Associate Existing Pass Contribution Map. But this is only in dire circumstances, so you should just ignore my waffle unless you start crying about it. Believe me, I've cried many a time already over the things that Hertfordshire have taught me. Vodka is my new girlfriend and she tastes bang tidy.
... So anyway... What this entire process does is enable less spot lights, area lights and directional lights to be used. Therefore the render time will be greatly reduced because Mental Ray does not have to compute this lighting data.
Remember- This method normally does not create practical light, such as light coming from a lightbulb, or light emitted from a tv set. You will have to include these manually. What this is is a discreet guide on how to achieve highlights to materials without actually using light. You can try painting with light instead. Hopefully this will be a benefit to anyone who struggles with long rendering times. It can be used on any scene, in any situation.
Also Remember- The lighter you paint, and the brighter your whites are, then the brighter your reflection light  will be. You may have a bit of swopping with Photoshop to do if/when you first try this but believe me its worth it in the end. This is the same technique that Pixar use in ALL of their films and also Industrial Light and Magic used it in the CG scenes in the Pirates Of The Caribbean films.
Have fun people. This is not just for your benefit. This is going on my Blog too- your not that special ;)

No comments:

Post a Comment