Maya and Mental Ray
Maya Ascii
I posted about this topic earlier, but I felt a real world example would be beneficial to everyone. In an earlier post, I had said that if you saved an .ma and your project crashed or you couldn’t open it for some reason, you could go through that file in a text editor and find the problem. I just lived through this hellish problem. I had been working on my shoe and saving and iterating as normal and then I tried to merge vertex and it fatal errored. When I tried opening the last file I had saved, I found out that it had been corrupted and could not open. Since it was an .mb I was out of luck and my last iteration saved was 2 hours prior, which really isn’t too bad. Fortunately Maya successfully saved an .ma in temp when it crashed.
This .ma was almost 400 megs and it was too big to open for notepad, but astonishingly wordpad was able to open it (doh!). This file was over 500,000 lines long, so long that wordpad had to open it in sections and ended up taking about 20 minutes to fully open. Generally an .ma is structured in this way:
Basic File Info (name, date etc…)
Camera nodes and tranformations
Other node information (creation, transformation)
Lights
Layers
Histories of objects
Animation Histories
ConnectAttrb of lights/shaders/materials
Now granted this information could be off and should taken with a grain of salt, but GENERALLY this is the order.
Since I knew what killed it (MergeVertex), and where it was located, I scrolled down near to the bottom and searched for “MergeVertex”. I found it and deleted it then saved but it still didn’t open. So I figured it had to be linked to its history so I deleted the entire history of the object and all of its connections (basically the entire last bit of the .ma). Be very careful when you do this and make sure the structure stays in tact and semi colons and such remain in the right places.
After this I was then able to open it up. Everything was in Chaos-all my display layers were deleted, things were misnamed-utter chaos and of course no materials existed on the objects. But this was fine, since I had prior working scenes and I just needed to export and import the object that I had been in the middle of working on when Maya died.
So in Conclusion, make sure you save an .ma at least once per work session and if you do need to root through one, especially if it was as big and scary as mine, do it smartly. Know what you are looking for and where it is located. If you are not sure what caused it, it usually is one of the last things you tried to do.
Also, a lot of times fatal errors can be caused by conflicting preferences so move your preferences and try and opening the file first and see if it does it, if not move your preferences back and start rooting away!
Light Setup
I have finally gotten the time to create a new lighting scene for Adidas. Finally, I can get them working linearly! Quite simple, and still in its early stages. My test subject is a scene off of http://www.mymentalray.com/. I am using 3 portal lights, along with 3 softboxes in front of them to soften the shadows. I am using 2 blackbody shaders in the lights and 1 cie_D (blackbodies have a more saturated color, while the cie_d is less saturated). Of course the lights are visible. I am also using final gather and AO within the MIA for the cloth. Kelvin temps of the lights are 5K, 6.5K, and 5.5K and the kelvin control in the lens shader is set to 5.5K. All MIA_X mats. There will be multiple variations of this scene, including a layer that has harsher lights and shadows, different background attributes and etc.. You can see where I put my lights by looking in the chrome ball ;)
Oh and if you notice, you can see in the center of the area light is a bright point. You can see this strongly because the softbox that is in front of it, intensifies this flaw. This proves that area lights in Maya emit more from its center and not uniformly. Can’t wait for 2011 to test this out with the new physically accurate light.

Adidas Enduro Bounce WIP
I have begun the laborious task of replicating an Adidas shoe for the glorious reel. It is called the Enduro Bounce II. This will be high poly and will completely and accurately match the real life shoe. I want to keep things quads and as close to the same relative size as possible so if I need to take things into Zbrush, it will behave nicely. I will be modeling every part of this shoe and of course texturing/lighting/rendering later on. I have started with the sock liner since it was the easiest to get the proportions correct on. Here is the sock liner (the cushy part you put your foot on in the shoe) half completed.I have the shoe in hand and of course have lots of reference images and the such to go by. I’m makin sure the edge loops flow right and every edge loop has a home :-)


here is the actual shoe more or less (found the pic on the web because I’m too lazy to upload one of my own):

Ambient Occlusion
Throughout the years I have always been told to render an AO pas and multiply it over the beauty and fuss with it to make it “correct.” This method has always looked incorrect to me and always makes things look dirty. But I was always the student (and will always be in a sense) so I never thought to challenge it, and thought I was wrong. Well ladies and gentlemen, I am about to link you to a post on Master Zap’s blog that will rock your world and will change how you do an AO pass (hopefully).
Here is the image:

and here is the article
http://mentalraytips.blogspot.com/2008/11/joy-of-little-ambience.html
Illuminance Continued
*Generalizing Alert*
my notes continued.
So say you have a point on a surface and you want to find out how much illuminance it is getting. What we do, is look at the light source and see how big of an angle it covers. We take that angle, multiply it by the amount of luminance the light has and you get the illuminance value at that point. If the light source is bigger, it covers a larger angle. If the same light is farther away, it covers a smaller angle which means the illuminance of that point is lower. Distance is irrelevant actually. All that matters is the size of that angle. A large light from a far distance and a small light at a near distance that covers the same angle and same luminance value will give the same illuminance.
You have heard the term “light falls of quadratically” or at least seen the option for the light in Maya (distance^2). This is actually a fairly inaccurate representation of the above subject. It is only accurate for distant lights. Example. You have a plane of light that has a length of X meters at a distance of Y from object P covering an angle of Z. If you were to half the distance between the light source and the object, the angle of course gets bigger, and at far distances it’s really close to doubling the size of that angle Z. However, since the light source can never reach point P, that means the angle can never grow past 180 degrees. This means that for each time you half the distance, the degree that the angle changes will grow farther away from doubling and closer to staying the same.
Example. Walk up to a large light source such as a window or tv. Look at your hand as well as how bright the tv/window is and notice how bright it is. It has a specific luminance. Take two steps back and look at your hand, your hand will appear darker, but tv/window look to have exactly the same luminance. This is because when you were closer, the light source covered a larger angle compared to your hand and when you stood back, it covered a smaller angle which means it will illuminate your hand less.
There are many ways to imitate this in CG. For MR, you have your final gather, photometric lights, and of course the beautiful and amazing Portal Light.
There is a big problem with traditional cg lights because they are point lights. Points cannot cover an angle to a point on a surface because it has no area which means it cannot emit any illuminance. This means the objects in a scene does not know what luminance the light has so it is faked. It also has an unclear mythical 0-1 value of color which is of course unrealistic (value of light is from 0-whatever). Lights also have strange falloffs (none, linear, or tries to do a distance^2 blindly). They are also rarely ever visible in a scene like they are in real life. When they are visible, their intensity is computed incorrectly. Even old MR. lights are buggy and hacks.
The reflections of the light source is generated by a fuzzy blob. This is a big problem because our eye uses highlights to judge an object and figure out most of it’s features. If we make it visible so it can be seen in reflections we run into major sampling issues.
Let’s get technical with light and pixels
This post is going to be quite dry and lacking of pictures, I hope you will forgive me because this stuff is actually quite interesting. I have learned all of this through mindless perusing of sites, and blogs. Below is basically a summation of some of the teachings of Master Zap. And of course everything is generalized
When you talk about lights and units, you can break them (generally) into two categories. Radiometry and Photometry. Radiometry is what you measure. It is actual radiation and its base unit is the Watt. Photometry is what you see, it is the perceived brightness, and its base unit is the lumen. The relationship of these two is based on the relationship on the sensitivity of the human eyes. This is called the “Photopic Response Curve” For any spectra of light, it can be expressed as a number called “luminous efficacy” (lm/W)
As you can see from the graph, we see green the most–>exactly 555 nm of wavelength. So it will have a very high luminous value. Whereas over in the far left area of the violet where there is exactly the same amount of watts we will have a 0 photometric value to us.
Computer graphics is technically radiometric units, photometric units can be more useful.
. photometric radiometric
Luminous power = lm (W)
Luminous Intensity = lm/sr = cd (W/sr) cd=candela
Luminance = lm/sr/m^2 =cd/m^2 (W/sr/m^2)
Illuminance = lm/m^2 (W/m^2)
sr = steradian
radian=2d angle where the arc length of a circle is equal to the radius
circle =2pi radians
steradian
3d angle where the area on a sphere is equal to the square of the radius
A sphere covers 4pi steradians
luminous power = the amount of light leaving the entire light in every direction at once.
luminous intensity = the amount of light leaving the entire light in a particular direction.
luminance = the amount of light leaving a particular point on a light and goes in a particular point. Our everyday perception of brightness is luminance.
illuminance = the amount of light arriving at a particular point on a surface, but coming from every direction. A sum of all the luminances in all directions seen from a point.
Now you can begin to see how this is all related to the CG world and rendering. But what about pixels?
PIXELS:
A camera is a luminance measuring device.
Pixels can be many different things. They can be the actual brightness of something. R,G,B are proportional to spectral radiances. Weighted value is proportional to luminance. The range of this is 0 – whatever. You can have as much as you want. We cram these into low dynamic ranges and call it black to white. That is just the limit of the file type, not of reality. It can be how much something reflects (0-1 range) such as texture images.
Most computer graphics displays have a display of 8 bits of red, green, and blue. 0 is black, 255 is white and 127 LOOKS like middle gray, but even though 127 is half of 255, it is not half the brightness. The human eye is a funny thing. We perceive light in a non-linear way.
This is a perceptually linear ramp:
This is a linear ramp:
If you measure the values of luminance, you will see that the perceptually linear ramp is not right. If you really made the same change for each step, you would see a curve like the bottom image. We perceive huge jumps in the dark area and small jumps in the light area.
If we try and encode an image using the linear values it will look horrible, whereas if we encoded it using the perceptually linear values, it will look correct. This is exactly what the computer monitor does. The pixel response of the monitor is not linear. 127 is not half as bright as 254. This, of course, is called gamma. A computer’s gamma is typically 2.2.

All this means that your 8 bit images have gamma encoded into them so they will display correctly on your monitor.
When you work in an 8 bit format your gradients between colors become muddled and ugly.
All this creates disastrous results when rendering. This is why, when working realistically, you need to work in a linear method. There are tons of “how to’s” out there, I have even provided links in a previous post on this blog.
If you work nonlinearly lots of bad things happen. You get unrealistic fall offs, you get blown out effects when using physical lights, you also get artifacts around highlights. There is a weak propagation of Indirect Light, and you get unrealistically strong reflections. There is also a huge problem with motion blur, it looks dark and smudgy and highlights will not streak properly.
Swatches?
For you Maya USERS in the house!
Ever create a material preset that looked awesome and you want to save it, but you want that cool little thumbnail so you can find what it looks like again? Well I found out how :-)
I learned a neat little trick today that is quick enough I could share with all of you. Here is a quick tutorial on how to create those thumbnail images associated with your materials that you create.
Step One: Open the scene where you want your material to be rendered on the object you want rendered that has some good lighting.
Step Two: Open your hypershade and navigate to the library where your newly created shaders are. (I strongly suggest having one because things like to break when you start moving your shaders to new homes).
(Create new tab, navigate to the directory). MM drag the .ma material file into your scene and apply it to your object.
Step Three: Render (I suggest a 400X400 image, but it doesn’t really matter)
Step Four: In the render window where your new image is now sitting, click on view>grab swatch to hypsershade/visor.
Step Five. You will now be asked to draw a marquee selection around the area that you want to have as a thumnail.
Step Six: Once this is selected make sure you have your hypershade open and you can see your .ma material file in your library(The one that is sitting in your library not the one that is in your scene) . Middle mouse your selection onto this icon. It will replace that default icon with your new beautiful render of your material!
That’s it!
Job Possibility?
I am in the running for a possible paid internship with an extremely notable company right here in Portland! I won’t say who it is with, but I will say I am very excited. This would be such an amazing opportunity for me and I know I would be able to make a big impact in this company. I would be doing everything that I love to do. And the best part? I get paid to do what I love! I love my industry.
Since this interview process has begun, I have noticed how far a nice and pleasant H.R. person is. I’ve had my dealings with a few H.R since my graduation and while every one is “nice,” it gets to be easy to tell who is faking and who isn’t. I bring this up because I am just blown away by the H.R at this company. She is so incredibly nice and is completely organized and has always gotten back to me very quickly. She is always willing to help out where she can and make everything a little more pleasant which makes me want to put in 110 percent. What’s even better? She has the same name as my car! A little nerdy, but hey we all have our quirks.
Once I got the initial interview, I wanted to basically prove to myself that I can do everything they would need me to do. Think an art test, but not quite. I think the meaning is pretty obvious so I won’t go into that. I hope I can post this, I’m never quite sure how these things work, if it is ok to post something that has a company name on it. If it’s not-SORRY I’ll take it down!
Maya and Mental Ray were used, naturally. Can you figure out the company yet?

What I’ve learned from a girl named Pirate Chick….
So this Pirate Project was by far the most intensive and time consuming project that I’ve done to date. In fact no freelance, school, or personal project even comes close, but it just looks like a normal project. There’s nothing really intricate about it. There is no insane detail or crazy long render times (ignoring the first test renders of hair of course), I didn’t need to use proxy objects or instances. I had no use for referencing, so why did this project take so long to finish? It wasn’t for lack of time put in, I worked on it most days. In fact I have lost track of the amount of hours put in this project… it is far above 300… so why don’t have I have much to show for it. Well actually I do. It may not be in the artwork-let me explain.
This project started out as a portfolio piece… something that will turn heads, hopefully something that would get me a job. This being my purpose for it, I tore through it in the beginning. Going as quick as I could, spending all day on it. I was getting good reviews, nothing horrible and then I got one critique that made me put things on the backburner for a couple days.
The critique was something along the lines of “This is really great work, but I think you are missing the point. You are creating this to show, you need to create this to learn.” I took this to heart and realized he was right. This project needs to be about personal growth and bettering my abilities through learning. So I slowed down.
I went back to old problem areas and fixed them, I re routed much of my topology, creating a cleaner edge flow, even though it wasn’t completely necessary. I broke down the materials that I was using and figured out what made them tick. This part was fairly easy. I only used two different type of materials-exluding the hair. The Mia material (or for those Max user the Arch and Design material) and the sss material, both created-or at least in part-by Master Zap.
The sss shader was by far the harder of the two to understand, especially with the version I was using. I was using the “newer” version which had A&D reflections built in, so they would produce realistic reflections. I realized with the sss material that the radii and the depth didn’t matter soo much-these values could be within the ballpark and be ok. What mattered most was the overall scale and spec along with your maps. You need spot on diffuse and epidermal maps to pull off a realistic skin shader. This gets pretty tricky because there’s an endless amount of mixing and matching and everyone has their own way.
The mia material was pretty straight forward glossy=glossy, samples=samples diffuse=diffuse etc… The trickier part was the BRDF curve. Small small changes to any number gives you far different results. This is pretty lame because this is the most important part of the shader to get it right.
Tip for getting good metal: Use the IOR fresnal (pronounced FRE-NAL, it’s named after some french dude)and set it to a super high value of something around 30 (air is 1)
The mia material is amazing, it can be used for just about everything, from satin, to cloth, to leather, to wood, to conrete, to metal, to glass-whatever. It is a physically accurate model which means you can’t make it behave incorrectly!! OR maybe you just have to try reallly reallly hard.
I also learned that what makes a character feel like a character isn’t the realistic materials or the fancy lighting, it’s the character of the character. It’s the pose, it’s the glint in the yea, it’s the curve of the lip that says “I know something you don’t.” THIS is the hardest part to nail in the character. I wasn’t able to hit this nail. I got close and had a couple glancing blows, but I never managed to nail it.
But this is what learning is. You keep practicing till you get it right. You don’t have to get everything right in one go, it’s a process. From here on out I know that I am a much better modeler, lighter, and texture artist, and I know exactly what I need to work on… everything. haha-that’s what being an artist is all about isn’t it? You’re never done, you’re never fully satisfied with an art piece, there is always something more to be done, to be learnt. It’s a process.
The fun is in learning, exploring, creating, and imagining. It’s about building up your texture and reference libraries and then bragging to all your friends that you need to by another TB hdd because the one you just bought 6 months ago is full due to texture collection, reference gathering, and tutorial videos. It’s about sitting at home with your dual monitor setup, sitting a nice comfortable chair, watching house/big bang theory/scrubs/lost/mythbusters/futurama/ or listening to music, and losing yourself in your work. It’s about wondering why it’s getting lighter outside instead of darker and then realizing it’s because the sun is rising and you really DO need to go to sleep because you have a final exam in 5 hours. It’s about wanting to create and learn new things and new ideas. It’s about learning that even though this is all you want to do, you really do have to go out to the bar with your friends every once in a while and catch up and have a good time. And finally, it’s about realizing it was never about the money, or working at Pixar or for some top secret govt. program (Even though I would never turn it down and would brag to high heaven if that ever happens… hire me-I’m young and cheap =D), it’s about doing what you love, it’s for the sake of the game. You do it so one day some little kid will look up to you like you’ve done to the industry giants your whole life.
So to conclude this episode, you shouldn’t create art to show, you should create it for yourself-to learn-and for others in hopes that it will effect them the same way it did you.
Final Pirate




