Motion Graphics by Jeremy Clark

Working Studies / Creative Process

More Indirect Lighting In Maya – Caustics

Within my Film Noir Inspired Lounge scene I also set about learning how to render “Caustics” in Maya and Mental Ray.

“Caustic lighting” generally refers to the patterns of light that are formed when rays of light pass through a transparent material, and are refracted  in a way that patterns appear projected onto surrounding objects. Think of shining a light through a glass of water, and seeing the patterns of light that are produced on the table.

Within Maya, “Caustics” are considered a form of Indirect lighting, as they rely on the use of Global Illumination Photons. For this reason, the workflow for including Caustics in a scene is similar to that of enabling Global Illumination within a render.

Though somewhat straighforward to enable, caustics can be tricky to fine tune, and there are a number of variables that dictate their appearance and quality in a render. Here’s how I implimented them within my scene:

1.) Just like when setting up my Global Illumination lighting, I wanted to keep my Caustic Photon emmitting lights separate from my scene lights. For each light that I wished to appear as if casting the Caustics, I duplicated the light, dropped the cloned light’s “Intensity” to zero, and enabled “Emit Photons” under the new lights “Mental Ray –> Global Illumination and Caustics” attribute editor tab.

2.) Next I jumped into Maya’s “Render Sttings” tab and under the “Indirect Light” tab, I opened the”Caustics” tab and clicked to enable them.

3.) Now came the hard part – fine tuning them to achive a decent enough look. Key settings I tweaked included:

– From the Caustic Light’s shape node Attributes Editor  –> “Mental Ray” –> “Caustic and Global Illumination” dropdown: Photon Intensity (A lower than default value worked well here), “Caustic Photons” (I increaded the number of Photons by 10x the default here), and “Exponent” (I decreased the value from 2.0 to 1.5 here to increase the brightnes of my Caustics patterning.

– Under the “Render Settings” –>”Indirect Lighting” –> “Caustics” tab I set to lower the accuracy from 100 (Default) down to 40. Apparently decreasing the value here is better.

The following depicts two renders of the same lamp, one without , and one with Caustics enabled. Note the patterns formed by the light on the wall behind the glass of the lamp.

This shows a render of one of the lamps in my scene without Caustics enabled.

.. And this is the same lamp, rendered again but with Caustics eneabled.

Though in this scene the effects of Caustics appear somewhat minimal, I still wished to learn about how to use them for a greater understanding of how Indirect lighting works in Maya.

Global Illumination In Maya

My Introduction to Indirect Lighting

Continuing with my Survival-Horror inspired scene in Maya, I’ve started experimenting with different lighting techniques. Having up until this point only utilized simple direct lighting setups to light my scenes, I’ve now moved on to learn more about how to use “Indirect Lighting” to improve the look of my renders.

“Indirect Lighting” occurs when light that is emitted from a direct source (A “Light” in Maya, for example) bounces off of surfaces in the scene. It is from this behavior that this kind of light can also be referred to as “Secondary Light”.

When the light contacts a surface it can take colour from this surface along with it. This newly coloured “secondary” light then lights other objects in our scene.

Global Illumination

The first type of Indirect Lighting that I’ve started to play with in Maya is known as “Global Illumination”. Here light sources are created, and set to “Emit Photons”. These “Photons” travel from the light source and bounce around our scene just like light does in the real world.

It seems that Global Illumination works best if you separate the Direct and Indirect light sources within a scence. Leave the “Direct” lights to provide basic light on objects and cast the scene’s shadows,  and create seperate lights that will emit the Photons required for our Global Illumination.

Therefore we select our “Secondary Light” sources, set their standard “Intensity” to zero (So they do not cast any direct light), but enable “Emit Photons” instead.

Here are two renders of the same scene – one with Global Illumination enabled and one without.

Render withough Global Illumination - Relying only on direct scene lighting.

Render with Global Illumination enabled

Interior Scene – First Render

This is the first moving render of my crime novel inspired Interior. Maya Ncloth was used to animate the curtains and standard particle effects were used for the rain outside the window. Both Polygon and Nurbs modelling techniques were used to construct the elements within the scene.

I plan to add some objects to the exterior and further animate the lighting to enhance atmosphere. This project was my first constructed to scale within Maya, and in truth my first proper interior setting.

The Value of Reference Material

When modelling anything, the importance of visual reference material cannot be understated.

Just like when drawing, there is a temptation to rely soley on our memory to tell us what something should look like. However, if we have an exmple of what we are replicating to work from, our model (or drawing) will be much more accurate.

Proportion, Shape, Colour, Scale and many more attributes greatly benifit from the use of reference imagery. Though it may feel like an interruption to our creative process to do so, it’s great to start any project by amassing a nice stock of real world reference for all the assets in your scene. (A simple Google Images search will usually suffice). This is in fact a really exciting part of the process, as you’re effectively defining the “look” your scene is going to have.

My most recent project called for some antique style furniture. I was surprised by how little I could recall of what defines the appearance of older furniture, though after some quick image searches, I was away laughing.

Here you can see my reference image for a lamp, beside the final model.

...And my table reference alongside the resulting model.

The process of modeling something from reference reminds me allot of drawing from life, in that you are looking, reading, and then reproducing form. Though it may take a little longer, the results are incredibly rewarding.

Upsize my boat, please.

Along with my experimenting with the Ocean itself, I also set about constructing an oceangoing vessel that would form the main setting for my animation. I started off with modelling what I imagined to be your regular ‘party boat’. This however appeared somewhat lacking in the decadent “International waters party” feeling I was aiming for. I set about turning what was a meagre speedboat into a hedonistic-party worthy mega yacht.

Worth noting is that these renders were taken after basic modelling was completed. Both boats are without texture mapping in each example.

Searching for the Perfect Ocean.

For my current Animation project, I’ve been playing around utilizing Maya’s Ocean Shader system. Whilst realizing this project, several decisions have had to be made with regards to both technical aspects: how I was going to render the ocean in my project, and aesthetic aspects: how I was going to set up the ocean’s attributes to achieve the look I wanted for my scene.

The following refers to the “Ocean Test” video posted below, and maps out a voyage of discovery over many different oceans in Maya. (Please excuse all following Ocean puns.)

This slideshow requires JavaScript.

Ocean Test 01

At first, I believed the only way to successfully render the ocean in my scene was via Maya’s Software renderer. Of course if I was still to include the Physical Sun and Sky setup, which is native to Maya’s Mental Ray renderer, I would have to split the ocean and sky across separate render layers, and composite them back together later.

Ocean Test 02

For my next attempt, I  switched the renderer exclusively to Mental Ray, rendering both the sky and ocean on the same render layer. Notice how reflections and specular highlights appear much more fluid. This is a result of Mental Ray’s far superior light tracing abilities. However, the flip side being that the colour of the ocean appears washed out, and in need of gamma correction. (This seems to be a recurring issue with rendering using Mental ray’s Physical Sun and Sky Setup.

Ocean test 03

Note in my previous render using Maya’s Mental Ray renderer, the colour of the ocean appeared somewhat washed out. . A workaround for this usually involves setting up some sort of gamma correction for the colour of the rendered nobjects surface material.The tricky part here though, was that the Maya Ocean Shader node includes no specific surface colour node.

Ocean test 04

Despite achieving some nice reflections and surface lighting by Rendering my ocean in Mental Ray, I noticed that allot of detail was absent from the surface of my ocean. I gathered this was probably as a result of my lowering the gamma settings of my ocean’s colour channel.

The decision was made to sacrafice the lovely Mental Ray surface reflections and return to an ocean rendered in Maya’s Software Renderer instead. I began playing with different ocean attributes in this test. After a while I began getting results that were looking more and more like an actual ocean. The two Ocean Attributes that I was centering my attention on were the “Wavelenth Min” and “Wavelenth Max” settings.

Ocean Test 05

Finally, having toned back the values on the two wavelenth settings, I arrived at a more mellow ocean. With several further tweaks to attributes such as Specularity, Foam Emission and Offset, I arrived at an ocean I was happy to include in my project.

Check out all of the above examples in motion, in the video:

Conquering my fear of Character Rigging

My 2010 project was the first time I’d attempted any character rigging / animation. The leraning curve was steep, and to meet dealines I felt I was only able to “half learn” what was really required to succesully animate a character. As a result I left the experience with an lingering sence of bewilderment, and felt rather apprehensive about tackling the task again. Now, within my current Ocean project, it has finally come time to insert a lead character. It was time to conquer my character rigging demons!

In order to overcome my fear of rigging, I decided I was basically going to re-learn how to build a control rig and bind it to a character mesh, mindfull of all the pitfalls that my first rigging experience presented. Tune in, sit back, and let me explain how to build a character rig the right way!

Stage 1: Modelling my Character

I set about modelling my character using polygons and subdividing to smooth the surface of his skin. Basic primitives were used (A sphere for the head, cylenders for the limbs etc) with edge loops being added to areas that either required detail or that would be deforming once the character was rigged.

The number of edges around the outside of a limb was kept consistent with the number of edges that ran around the “hole” that it was to be attached to. This way, limbs could be lined up and tidily sewn onto the torso, etc.

One technique that I will remember from this stage is that for when modelling a deforming joint, add 3 edgeloops. One for where the joint will pivot, and one edgeloop either side of it to hold the geometry.

Stage 2 – Beginning to Rig

It was finally time. I had to start rigging this dude.I started by locking off my character mesh and blocking out a basic skeleton shape over the top.

I started with one of the legs, which consisted of four bones: One each for the Toe, Ball of the Foot, Heel, Knee and Hip. Then it was on to the spine, which was made up of six bones: Hip, Back, Chest, Neck, Head, and Top of the Head. A new hip rigging technique was applied, which would attach the leg to the spine, and alow for appreopriate hip deformation. The arms were created using two bones each, and then the hands were made by constucting five fingers with four joints each, then parenting these all to each of the arm’s wrist bones.

Stage 3 – Grappling With Ik vs. Fk

Ahhh Forward Kinematics vs. Inverse Kinematics. I suspect this is where I went wrong with my project last year, for I was attempting to animate my character using only Forward Kinematics. Now I can see the importance of using both.

‘Forward Kinematics’ rely on transormations UP the joint heirarchy. For e.g, to make a hand move using FK, you would have to first have to rotate the shoulder joint. then the elbow and wrist joints – hoping the the hand ended up in the position you wanted it to.

‘Inverse Kinematics’ however, let you grab the hand and place it exactly where you want it to be. All of the joints between will then be rotated and positioned automatically. Sooo much quicker than rotating individual joints and hoping for the best.

With this knowledge under my belt, I went about applying some IK controls to my characters limbs. For the legs I ran one IK controller from the thigh to the ankle. For the arms I ran IK controllers from the shoulders down to the wrists.

Stage 4 – Reverse Foot Rig?

An entirely new approach to rigging a character’s feet presented itself to me via a video tutorial. This technique was termed the ‘Reverse Foot Control Rig’ and is used to achieve more effective control over the roll of the feet and how they stick to the ground.

Basically this consisted of a seperate foot rig that was then snapped ontop of the existing one, then using various constraints is locked to the existing foot rig/IK handle. Custom attributes and ‘Set Driven Keys’ are also used to link the two foot rigs’ animation together.

Stage 5 – Constraints and Controls

Another new concept that presented itself was with regards with how to control my character rig. Instead of animating transformations on the actual skeleton joints themselves, this time I would build curves that would sit outside the mesh and function as ‘Controls’ to the various joints throughout my character’s skeleton. The control shapes would have the skeleton joints constrained to them, so manipulating the position/rotation of the control shape would cause the paticular skeleton joints to follow.

Constraints eh?

I’d heard this term allot, though never fully grasped the concept of what it related to. A ‘Constraint’ is an action in Maya that links the behaviour of one object to another. It can be grouped with Set Driven Keys, Direct Connections (Via Maya’s Connection Editor), and Expressions as a means of creating “Reactive Animation”.

Basically, you have a Target Object, and a Constrained Object. The Constrained Object is locked to the Target Object via whichever type of Constraint you select.

1.) Select target object    2.) Select constraned object.    3.) Select type of Constraint via the Animation–>Constraints menu

Once the basic concept was grasped, there was nothing to it really. I’d select the control curve next to a joint, (this would be the target object) then the joint itself (this would be the constrained object) and place a constraint on it.

Once a control was set in place and constrained to a joint, I’d rename it, zero it’s transformations, delete it’s construction history and hide/lock unwanted channels in it’s channel editor controls.

Stage 6: Time to start binding the skin!

Maya 2011 has a new “Interactive Skinning” binding tool, which certainly removed allot of the hassle from binding my character mesh to my rig/skelton. This new system operated by placing capsules around areas of the character mesh that can be scaled in order to select how much influence each joint has on an area of the mesh.

Joint influence is shown using a colour scale running from Blue –>Green –> Yellow –>Red, where Blue represents no influence (0), and red absolute influence (1).

This tool works amazingly for blocking in rough skin weights. Fine tuning weights can be then performed in a number of different ways:

1.) Use the Component Editor – Select an object and enter Component Selection Mode. Select the vertices on the mesh that are to be weighted, and enter the Componenet Editor. In this window select the “Smooth Skin” tab, select the particular joint along the top row, then select the vertices down the columb. Enter a numerical weight value and press enter to set the weight on these vertices. Note: This method seems to work best we adding or removing complete influence from vertices. Try to stick to 0 or 1 in this mode.

2.) Good ol’ Paint Weights Tool – This is what I primarily used last year for weighting my entire model, though now I can see that it’s much better suited to tidying up weighting. One workflow that I adopted this time that worked wonders was this: Paint in absolute weight for joint ‘A’ (Paint value 1). Now paint in an absolute weight for joint ‘B’ (Also paint value 1). Return to joint ‘A’ and set your paint value to 0. This will act to remove influence. Now remove any of joint ‘A’s weight from the area that needs to be effected by joint ‘B’


And that’s it. Thanks to my taking a bit more time to grasp some fundamental key concepts (Constraints, Ik/Fk, Custom Attributes, Set Driven Keys etc), my fears of character rigging were succesfully conquered. though it did take some time, I now feel allot more confident in the process of setting up a character rig for animation. Check out my dude!