Archive for the ‘Tech Notes’ Category
Normal Maps in Maya
March 1st, 2006 Posted 8:19 pm
This post is not exclusively about normal map generation in Maya, but I didn’t want to make the title too long. It’s about several issues that came up while I was generating normal map for my Aquadon model.
Here’s what happened: I imported high poly mesh into Maya and it didn’t exactly line up with my low resolution geometry, so I moved it to fit. When I generated normal map, it was out of place. The detail from upper arm transferred to lower arm, and I checked UVs couple of times – they were fine. I tried this again with broken up mesh – since Maya couldn’t quite handle 2+ million poly mesh, I broke it up to lower arm and upper arm, which is OK, since there is a texture seam in there anyways – but the same displaced normal map was generated again. Finally, I figured I should freeze the transformation of the high poly arm that was moved to fit – and voila! Conclusion: if you move your high or low poly meshes before generating normal map, remember to freeze transformations, because they matter to normal map calculation, and the map won’t be in the right if one of the meshes was moved.
Other thing that came up was this weird lighting artifacts happening on the low resolution arm. I first thought I might have baked vertex colors, because I tested some baking previously, but even when I flooded vertex color to middle grey, the messed up lighting effect was still happening. I figured it started happening after I have extracted upper arm faces and made it separate object. Both upper and lower arm had the same artifact. Smoothing edges didn’t do the trick. I knew it was something to do with vertices, and when I displayed their normals, I realized that the vertices that appear black have their normals reversed, or at least not visible from the outside. To fix this, I went to Edit Polygons > Normals > Set to Face – which creates the faceted look, as if all the edges were hard. Each vertex now has bunch of normals, each facing in the direction of normal of neighboring faces. To bring back the smooth look again, I selected all the vertices and went to Edit Polygons > Normals > Average Normals. Now all the vertex normals were snapped together and they create the smooth look.
A dumb, but useful reminder – normal maps won’t show in the viewport if the textures are not on (hotkey is 6), even when high quality rendering is on.
That’s all folks! Now off to finish high poly head of Aquadon.
Posted in Tech Notes
FBIK in referenced files
February 18th, 2006 Posted 4:29 pm
I thought I’ll make a little post about the fix that happened in I Love You production, because it made animator’s life so much easier. So, what’s the catch? Full Body IK is great, but it has its own little quirks that you either need to get used to, or try to fix them or get rid of them somehow. One of the things that felt really weird was the fact that after you set the keys on the effectors, and move the time slider a bit, the effectors would go out of place, although this wouldn’t affect animation, nor skeleton pose for that matter – it’s just that you would think the rig got messed up, when all you had to do is move one of the effector a tiny bit, and the out-of-place effectors would snap back to where they are supposed to be. This is normal FBIK behavior, as confirmed in Maya help documents. I would say that the FBIK solver doesn’t try to solve for the inbetween frames unless you play animation or move the effector, in which case it will solve and give the proper feedback – e.g. the effectors would be where they should.
Another issue we had was a more troubling one. Mainly, there is a neat key combination for Key All FBIK, and it is by default ctrl+f. This would work perfectly with FBIK, unless the file containing it is referenced into another file. In that case, the error will appear, and no keys would be set. The error goes something like this:
// Error: The attribute 'sampleFBIK:SpineEff.translateX' was locked in a referenced file, and cannot be unlocked. //
Unfortunately, the script stops there at the first error, and does nothing. I tried unlocking the spine effector translation values in original file, saving the file, referencing it, and always got the same error, even when I did it with the example rig that comes with Maya – that is to say, there was nothing wrong with my rig per se, the same behavior is present with Maya’s rig as well. And, before going to forums or mailing list and asking people about this problem, I did some search, and thankfully, in HighEnd3D Maya mailing list I found out that one person had the exact same problem with locked Spine effector in referenced (but not the original) file, after trying to key all FBIK effectors. And the question was answered!
The Solution:
There is a MEL script file that is locking the spine and hips effector translate channels when the Key All FBIK command is called. These three effectors are, of course, intentionally being locked by the script, because they are not supposed to be translated, only rotated. The script file in question is called loadFullBodyIKFunctions.mel and it contains the procedure setEffectorLockedState(). All I had to do was to comment out both calls for this procedure. This fixes the issue of spine effector being locked, and the Key All FBIK command now works smoothly in referenced file as well! Joice even said that body parts aren’t snapping around anymore, and thus I hope I will have more stuff to show related to Mary and Howard, now that we had contours and FBIK issues mostly out of the way.
Posted in Tech Notes
Test Render and the New Website
January 21st, 2006 Posted 10:16 am
I Love You project has some recent developments, mainly, it has its own production journal at iloveu.studioharumi.com, and that will be the place to read about the new problems we have with production, how we solved them, as well as to see new media, such as test renders, playblasts, inspirational material and such. And since I’ll be posting project related stuff over there, I decided to just occasionally update my production journal (this thing here, FogLog – of course!) with the new stuff from the production.
The latest update on my part was a tiny test render – 100 frames of the setup from the first shot animatic. Only camera moves, aside from PaintFX shrub and bricks that have some animated deformers. I’ve added yellow background, and some animated noise in After Effects, with Luma Key previously added to the comp, so that the noise only shows on the black areas and simulates the paper texture.
I’m not very happy with how Maya’s Toon Outlines came out. The most annoying aspect of it is flickering. Another thing that is quite troubling is the artifact of thicker outlines from the background get drawn a bit on the top of foreground object, which is very visible on Howard. The only solution I can think of is to render in passes and let Howard be on a new render layer, composited on top of the background in post. I was doing some tests the other day with mental ray contours (I wanted to do a quick animation in the style of the game Rez), and I’ve also got the result in which the background object’s contour gets drawn a tiny bit on the top of the foreground object’s contour. If anyone knows any setting that can prevent this from happening, please let me know! On the other hand, new Maya 7 render layers are pretty easy to set up, I don’t even have to make any overrides to render settings, just render foreground objects separately from the background.
And just so to keep FogLog up-to-date, here are some other issues that we’ve been having. Mainly, we realized that Howard’s hands are a bit short and tried extending them by scaling up the arm bones in X, but alas! That messes up the rig, and the geometry scales up all weird. Obviously, FBIK is not meant to be used for squashy and stretchy characters, or perhaps I’m missing some juicy bit of info that would help me make this work. At first I believed FBIK is the greatest automatic rig there is, since it comes from the acclaimed Motion Builder, and I must admit it was quite easy to set up and to move around. However, when Joice started creating animatic, there were quite many issues that came up, such as effector’s getting out of place (which doesn’t affect the skeleton, just looks really weird), until one of them is moved a tiny bit – then they snap back into the position. Maya documentation states that it is a normal FBIK behavior, so we had to get used to it. I also tried animating Howard to see if there’s something with FBIK that I could fix on my end, and here is the result – nothing much, just fairly random animation of Howard and his master transform circle, the parent of all the rig controls. Then there were some other issues, mainly related to referenced characters with FBIK. I updated Maya to 7.0.1, and in the release document, there are many items that refer to file referencing issues that have been fixed in this update, so I hope that will take care of some of the problems we had with referenced files.
That’s about it for this update; I’ll post again when there’s a significant progress to show.
Posted in Tech Notes, Works
Order of deformations for skinned geometry
September 9th, 2005 Posted 4:08 pm
While working on character’s head, I ran into this problem again when skin cluster won’t work after adding blend shapes. I checked in my notes to see what’s the proper order of deformations, and here is the list:
- skin cluster;
- sculpt, clusters, wire etc;
- blend shape;
- tweak node.
The nodes on top of the list are calculated last, while the ones on the bottom are calculated first. If the geometry appears not to be moving with skeleton, as happened in my case, that is because blend shapes are being calculated last, and should be moved to the bottom of the list. Tweak node will remain even after deleting nondeformer history and should be best left at the bottom of the list, thus being calculated first.
To reorganize the input node list, click on inputs icon in main toolbar, and choose all inputs. Then the window shows up, listing all the inputs of the selected geometry. Middle-mouse drag the listed items to change their order. It should look something like this:

I have two clusters for each eye, blend shape and skin cluster. This geometry, which is a low-resolution version of the head, also has a wrap deformer output, because it deforms hi-res version of the head. Luckily, I remembered to check the input order list instead of panicking and wondering why my deformers stopped working.
Tags: how to, Maya, tech note, tips
Posted in Tech Notes
Maya 7.0 – Wow!
August 11th, 2005 Posted 11:05 pm
I must say that after reading about Maya 7’s new features and watching the demo videos at Alias website, I got really excited about all the additions implemented in this, as some folks already noticed, probably the greatest release of Maya so far. Thanks, Alias!
Here are some highlights of the new features that I found particularly interesting and useful.
Full Body Inverse Kinematic Solver (FBIK), from MotionBuilder Last year Alias has acquired the leading character animation software package from Kaydara – MotionBuilder. I played around with MotionBuilder a few times, and its full body IK solver was really amazing, aside from having a real-time animation playback. I loved FBIK’s ease of use and intuitive approach to character animation that was made possible with this solver. And now, it can be created within Maya, that’s just so great.
However, to successfully apply FBIK to a skeleton, the character needs to be modeled in T stance, meaning that his arms should be straight and horizontal, his palms facing down, and his legs also need to be straight down, and not spread out. Unfortunately, the latest character I modeled is not in this pose, so I guess it will be my last attempt at making my own skeleton rig, but all the subsequent character that I make will be optimized for FBIK.
Maya Paint Effects Based Toon Outlines
This is my favorite new feature and it is just plain awesome. One of the best aspects of Toon Outlines, is that they allow for a very nice preview in the viewport, and render extremely fast, as most Paint Effects do, using Maya renderer. Neat addition to the render window is that it now displays time it took to render the scene after the render is complete. There is a whole new Toon menu in the rendering menu set, and one of the items – perhaps the most interesting one – is the command to apply a paint effect stroke to the toon outline. This means that any PFX brush can be applied as a stroke to an object as an outline! Simply amazing, now just think about the possibilities here! Alright, here’s a simple example:

Here I applied a PFX modifier cube, which made the lines in the central part of the chair thicker. Note how the lines look painterly, with a nice width variation. Well, I should read the complete documentation on Toon Outlines first, but I was just so eager to play around and experiment. Anyhow, the more sophisticated use of these effects will be posted at a later date. The Toon menu also offers a shortcut for creating several presets of ramp shader, which is great, because the default ramp shader usually doesn’t suit my needs and there are many things that I want to turn off, such as specularity and reflectivity. I’ll be working on substituting mental ray contours with Maya’s new Toon Outlines for my project, and perhaps I will write another tutorial on how to create toon shaders and outlines in GTA cover art style, but this time using Maya 7 and its great Toon Outlines. Very exciting, indeed!
Polygon Modeling Tools Improvements Alias certainly tries to please the game content creators, by implementing the poly modeling tools in its every release. However, this latest release really pushed Maya forward, I believe, and is making it a preferred tool for many game companies. First of all, there are new edge selection tools. These tools let you select edge rings, edge loops and border edges. Previously only the command to select contiguous edges was available. The edge ring and loop selection tools are particularly useful when reducing the polycount, as the whole rings of edges can be selected with one click and collapsed. In addition, adding more detail to polygon models is now much easier with duplicating edge loop tool and split edge ring tool. Split edge ring is just the great addition to split polygon tool, because it now lets you split the whole loop of edges with one click.
Shift + right click now displays a marking menu with common polygon modeling tools. If shift-right clicked while polygon geometry is selected, the marking menu will feature menu poly editing options and tools, and while shift-right clicking without anything selected, the marking menu will show a list of polygon creation tools, including create polygon tool, and poly primitives, with the addition of all new poly primitives: pyramid, pipe and helix. I’m pretty sure these marking menus weren’t available in previous versions of Maya, but if they were, then I certainly wasted a lot of time for not using them. They are very handy.
Polygon UVs Instead of accessing poly UV editing tools through Edit Polygons > Texture, Maya now has a new Polygon UV menu with some cool new tools, such as Unfold UVs, Grid UVs and Warp Image. I didn’t get to play with those too much yet, but have a feeling that they are very useful as well. And, wow, just to think that 3ds Max in it’s v5 still didn’t have a UV snapshot option, unless an additional plugin was installed. I’m not sure about the subsequent versions, but I still believe that 3ds is history. Go, Maya!
Skinning – Substitute Geometry The possibility to skin a geometry to a skeleton and at a later time substitute it with a new geometry with different topology and level of detail, without losing weighting information – that is truly life saver! The option to substitute skinned geometry with similar one that has been further tweaked, allows animators to start animating at the earlier stage, when the modelers still haven’t completed the model, and eliminates the need to paint weight maps all over again when the new geometry has been skinned to the model. There are also several other implementations for smooth skinning, such as the ability to have influence color feedback (like XSI has – each joint is colored differently and the vertices affected by the joint inherit its color. Neat, but for me the weighing process worked well with only the grey-scale representation of influence on geometry). Also, Maya 7 allows you to rotate joints easily while painting weights, without having to switch to rotate tool, and, finally, multiple influence objects can now be added at once.
Deformers – Delete Non-Deformer History The ability to delete non-deformer history is great when working with complex models that had to receive some tweaking or UV manipulation after they have been skinned. I hope this will improve the performance, since it will let us get rid of the history without destroying the effect of the deformers and skinning. And if it ever happens that I forget to delete history before skinning, it will not be the end of the world and I will not have to redo anything.
Transformation Tools There is a new tool in Maya’s toolset of transformation tools: Universal Manipulator. It has its button at the main toolbox, and a shortcut Ctrl + t. It combines the functions of Move, Rotate and Scale tools. Additionally, it allows user to enter precise scale, move or rotate values in a text boxes in the viewort. The Move Tool has been significantly improved as well, because it offers the option to align the move axis to edge or face, to orient axis toward point, or to move along object’s axis. I wish the same functionality existed for Rotate and especially Scale Tools, because it makes component transformations much easier.
Render Layers There are great improvements in terms of render layers usability. They now allow the use of different renderers for each layer, and per layer overrides of object’s materials, which means that I can now have one object assigned to different render layers and for each layer the object can have different shader. I find this very useful with toon style rendering, because I will be able to have different Ramp Shaders applied on single object, as opposed to animating the Ramp Shader’s colors when, for instance, the lighting conditions change. The render layers will let me use mental ray for contours and Maya’s renderer for Toon outlines, all in one scene. But the most amazing thing about render layers is that the rendered image sequences can now be output as layered PSD files, with render layers or render passes (for shadows, diffuse, ambient, specular, outlines etc.) corresponding to Photoshop layers. Those layers could be set to different blending modes, if needed, or manipulated in After Effects separately.
These are not the only new features. Basically, every aspect, from modeling to animation and dynamics has been implemented significantly. I am already trying to devise a new workflow for my current projects that will take advantage of all the new stuff available in Maya 7. So it’s time to go back to work.
Oh, didn’t I mention that you can now convert Paint Effects strokes to NURBS?! Awesome. Maya rulez!!!
Posted in Tech Notes
