Tuesday, January 29, 2013

Day 138

Now I'm done with my third book. I really liked this one. It wasn't as broad and in depth as my first book, but I felt that what it did choose to go over had a lot of information and was well written. I did things I didn't think I could do and they turned out pretty good. So now I gotta keep on trucking. Since this blog is linked to my Google account and since I have an Android phone, all the images I upload here end up on my phone automatically. So this weekend, I used that to show some people what I've done. Now I think its time to finally show people this blog. I've mentioned it to some but never gave them the link. It's pretty long overdue. As a warning to anyone reading this, even though it's supposed to be a daily blog, I usually do a week's worth of posts at a time. Also Nick wanted to see the wireframes of what I modeled so here they are.

Day 137

Here we are making the alien walk. First up is having the hips move side to side and rotating back and forth. The video is supposed to loop so it's kind of short. I lengthened the last video but not these.

After the hips, I moved onto making him take steps. I followed the book and things did not turn out well. The inverse kinematics was supposed to make it easier but also made it harder to fix mistakes for me. I did my own tweaks until it looked alright. After the steps, I adjusted the spine, neck and head so it stayed centered instead of swaying side to side. Finally, I did the arms and here it is.

Day 136

Next up is animation. Again I had to do the ball bouncing exercise. I think this is the best one yet. The ball seems more alive instead of being an inanimate object. Then it was onto the tube below. Instead of just moving back and forth like a pendulum, it tried to make a more natural wavelike motion. This involved offsetting the movements of every joint inside the tube (the tube has a skeleton, the ball did not).

Day 135

Now it's time to rig up a skeleton for the alien. Overall it's not that complex because it's a videogame character. The legs will be utilizing inverse kinematics which I've mentioned before. That's where I can just move the feet, and the knees and leg will move accordingly. So the legs have a little more bells and whistles. The rest of the body will use forward kinematics where I have to move everything around by hand.

With the skeleton done, I bound the model to it so now the joints will move the alien around. All the joints exert a certain amount of influence on the model. Maya automatically determines this which doesn't always produce the best results. On the left side of the body, the elbow joint got assigned some of the hips because it was nearby. So when the elbow moves away, it pulls the hips with it. On the right is a visual representation of how much influence the joint has; the whiter the more influence. So I have to adjust the influences myself. This involves just moving joints around and fixing weird things that happen. On the right side of the body, you can see how I fixed the elbow. While I was doing all of this, I found some parts of my model that could have been better. It wasn't so much a problem of the shape but sometimes textures would get unnaturally stretched. Anyway after all that work was done, I now have an alien that I can animate.

Saturday, January 19, 2013

Day 132

Time to light my alien. On the left, we have him under a single key light. On the right, I've turned on shadows. 

Next I created a couple of warmer but not as intense fill lights around the key light to help augment it. Then I created some cooler lights on the opposite side to lighten up the dark side of his face.

Then I duplicated all the fill lights and lowered them to remove the shadows around his chin. This was too much light so I tweaked the intensity of different lights to get the final set up on the right. I also changed the material of his eyes to make them shiny.

Day 131

Moving onto lighting now. Above you can see the various types of lights that Maya has. There's the point light where light gets emitted in all directions from a single point like a bare light bulb. Then you have a spotlight which is like...a spotlight. Next is directional lighting where a light runs parallel from a far distance somewhat like sunlight. Last we have area lighting where light comes from an area kind of like a window.

So here on the left, I put in some directional light meant to represent sunlight. Things in Maya default to creating no shadows. Once I turn on shadows, I get what you see on the right. I'm trying to light this like it's during the day so it's still a bit too dark.

Then I made three area lights and placed them over each window. They aren't as bright as the sunlight but they give a nice amount of diffuse light and break up the stark shadows. That's what you see on the left. The shadows are still a bit too dark though. Maya has multiple rendering systems. The default one doesn't have the best lighting effects. Light doesn't bounce off objects so that's why the shadows are so dark. I switched over to a more light focused renderer and I get what you see on the left. Light now bounces off objects and lightens the shadows.

Now it's suppose to be daytime and outside looks a little black cuz nothing is out there. So I created a big background screen and downloaded a panorama to place onto it.

Then with a few more tweaks here and there, I get this end result. A decrepit hospital never looked so nice.

Day 130

Now it's time to add textures to the alien. On the left, I have my texture map. In Photoshop for some of the parts like the skin, I just used simple colors and then applied a general noisy texture over it to make it seem less flat. For most of the rest though, I found textures online and used those. That included metal for the armor pieces, leather for the belt, fabric for the shirt and pants, etc.  

After placing a texture in Photoshop, I exported it into Maya to see how it looked on the alien. Then I adjusted the size of the texture if it wasn't looking right along with color and brightness. After I was ok with the texture, I went back into Photoshop and drew in shadows and highlights to enhance the look. This involved a little guesswork so there was a lot of back and forth between the two programs to get the right look. On the top left, you can see the textures by themselves. Next to that you can see what I drew in by hand. It was a lot of work but it turned out well. Below you can see the alien with basic textures and then with all the extra stuff I painted on. It's pretty impressive what you can do to create the illusion of light and shadow.

Wednesday, January 16, 2013

Day 129

Now to add some extra oomph. Above you see the ambient occlusion shadows. Any place where two edges meet gets a little less light. I've used this before but only in a superficial way. Maya can render out the shadows but it takes a little time, especially if you want to render out shots at different angles. What I did before was render out something like you see above. Then I'd render out the same image with its normal colors and textures. Then I'd take those two images and combine them together in Photoshop. Not a bad thing to do if you want one image, but it's not very efficient if you want more.

The book showed me a better method. Maya can render out the shadows and covert them directly into textures. So I end up with a bunch of images you see above. And guess what, they're all arranged in the maps I made before. So I can take these shadow maps and combine them with the color texture maps in Photoshop. Now the textures will have the shadows built in and Maya won't need to render them out every time.

So I've gone over creating color texture maps but there are so many other kinds of maps like transparency. Now I can finally make the glass for the windows. Using the general map of the glass I made awhile ago, I created the color map above on the left. Next I'll create a transparency map. Anything black will be transparent, white will be opaque and gray can be anything in between. So I just took my color map, changed it into black and white, and then inverted it to get the above right.

Then I apply both the color and transparency map to the glass and I get the above image. So the white parts on the color map get ignored because the transparency map tells Maya that that part is transparent. I put the ball outside the window to show that the windows are see through and not just black. The ball looks kind of like a creepy perv.

Another type of map is a bump map. It makes flat things not look flat. I'm not exactly sure how it works but the results are above. I had to download another program to make the bump map. I fed the program my color map and it makes a bump map out of it. It's not a surefire method so the program has a lot of settings to tweak to get the right look. Below is what the map actually looks like.

I made a bump map for the furniture and window frames. I tried making one for the walls and floor but for some reason, it wasn't turning out right so I left it out for the time being.

Day 128

Now switching back to the room and finally making some textures. The book guided me to a website where I could download a variety of textures to use. On the top left, I have the map I made of the room.  On the top right using Photoshop, I applied some basic textures on what will be the walls, ceiling and floor using the map as the guide. 

Then I saved the textures as a JPG and imported it into Maya. Since the textures were placed directly on the map, Maya knows exactly where they should go and I end up with the room above. Now I can go back and make the textures look better. 

After downloading a variety of textures and using Photoshop, I can create the exact look I want by layering them together. Remember that the room is suppose to be part of a run down hospital. I don't want to brag but the texture I made looks better than what the author had in the book. Note that any textures that extend beyond the lines of the map will be ignored since they don't really point anywhere so Maya doesn't put them anywhere.

Next I did the same thing for the exam table and drawer above and window below. I liked the worn leather I found for the table but the rusted metal wasn't the best. So I went away from the rust and that's why the drawers have more of a scratched metal look. You can see the results on the lower right.

Day 125

I mapped out the room so now I need to do the same with the alien. Above is jumbled mess that I have to unravel. This represents every part of the alien piled on top of each other. I need to just take it one part at a time.

First I start with the head. I isolate that part and move it away from the rest so I can see what I'm doing. After smoothing out the face, I end up with the above left. The large strip going up from the face is actually the back of the head. I also isolated and flatted the antennae and mouth cavity. On the right, you can see how nice and uniform the checkers are on the head now while the body is still pretty messy. 

Now what I did with the head, I need to do with every other part of the body - the hands, boots, belt, arms, shoulder pads, etc. I isolate the part I want and then unfold and smooth it out. Once that's done, I arrange all the parts to fit back onto the square that will be our map. The blue parts represent a single layer and they are the parts that cross the midline of the alien's body like the head, belt and pants. The pink parts are where there's two layers on top of each other. This is for objects that are the same on both sides like the hands and feet. A single texture will be applied to both as a mirror image. The blue parts could have been pink as well but then when the texture gets mirrored over, it could create a visible seam down the middle which we don't want. Note that the checkers on the head are larger than the rest of the body. This is because the face is going to be more detailed since that's where we focus most on. Bigger checker = more of the texture going there.

Day 124

Now that I have my models done, it's onto texturing. First up, is the room I made awhile ago. So just as a review of how textures work, my goal is to take a 2-D image and place it on a 3-D object. For that to work, I need a map to tell where the 2-D image needs to go onto the 3-D object. The first step is to make this map. It's sort of like taking the 3-D object and unfolding it flat. So I start out with just the room itself. Maya can try to automatically unfold it itself and I end up with something like the upper left. Unfortunately it's broken up too much and some pieces are overlapping. So I move parts around and attach pieces that should go together until I get something like the above right. 

I applied this checker board pattern as a sort of test pattern. I want to see that they are all squares and there's no distortion. I also want to make sure that the squares are the same size everywhere. 

The room was simple but the furniture is a little more complex. Above is what I got after unfolding and rearranging all the pieces. So why am I doing all of this? Like I said before, these are like maps. I'm going to take this map and import it into Photoshop. There I'll apply the textures (what I want the objects to actually look like) directly over the map. Then I'll take the texture, import it into Maya, attach it to my object and the object should finally look like something instead of being gray. If that doesn't make sense, just wait awhile when I actually do that part.

Day 123

I didn't do all the armor plating. I just added in one more on the chest and stopped there. I think I had general idea down. So here's my finished model.

Compared to what the author of the book did, his was more detailed but mine's not too shabby. It turned out better than I expected. I wasn't planning on doing so much. I was just going to do the face and stop there. But I'm glad I went as far as I did.

Day 122

Next I finished the lower jaw and expanded down the neck. Unfortunately the polygons in the neck were running in the opposite direction of the big neck tendon. Ideally they would have run parallel so that's why that part looks a little blocky. I could have fixed it but it wasn't too big of a deal.

I kept moving down to do the chest, shoulders and collar bone. This dude is ripped.

Then I made the spiked head plate armor thing. Once I made that, I just duplicated it a few times to run over his head and down his neck making tweaks here and there. I didn't go all the way down his back or make any plates for his shoulders cuz I was getting tired at this point.

Day 121

So I was at my parent's place for a week. My sister was visiting from LA which she doesn't do that often. So I hung out with her everyday instead of working on Maya stuff. I'm back at home now so it's back to work. After finishing the alien last time, the book gave me some homework which was to model the guy above. He's obviously a lot more complex but apparently I just needed to apply what I used on the alien just much more detailed. After not working for a week, this was a good test to see if I remembered how to do this.

Part of the supplemental material available online was a folder full of screenshots of how the author modeled this guy step by step. It was nice because it gave me a general idea of how to approach it but I didn't follow it to a tee since I knew I wasn't going to be as detailed as the author. Just like with the alien, I started with the eye.

Then I expanded out from there to do the mouth, face and strong cheek bones. Just like before, I'm only working on one half while the other half is being automatically mirrored as I work.

I added in wrinkles between the mouth and cheek, nostrils and then pulled out the ear. Overall, I think it's turning out pretty well. 

Monday, January 7, 2013

Day 111

With everything mostly done, I went back and added all the finishing touches which included the ears, antennas, head ridges, belt buckle and armor plating. The polygon count was kept low on purpose so he isn't super smooth. I think he turned out well. I will definitely be coming back to him again.