11/30/11

Thesis Project: Robot Shaders

This week I did a lot of work that will save me some headaches further down the road.  I finished up doing the initial texture painting of the Robot model just so every piece of geometry could have a texture map associated with it.  I had to deal with some corrupted Mudbox files, which is never fun, but eventually, I got something stable that would work for me.

After that, I had to figure out how to be able to link the 53 individual shaders so that they would be easy to tweak down the line.  I wound up at first creating a master shader with the basic overall settings.  After that, I created another shader that I called a "starter" shader.  I then linked certain values like sampling, glossiness, and others directly into the master shader.  For the starter shader, I also created three layered texture nodes and linked them to the diffuse color, reflected color, and reflectivity attributes.  I then linked the colors of those individual layered texture nodes back to the master shader


Basically, I was then set to copy the starter shader and the starter layered texture nodes, do some reconnecting, add the texture files, and that was it!  They were then connected to a master shader ready to adjust the color across all 53 shaders with ease.  In the end, if this works the way it should, I'll either love myself or curse myself if it doesn't work out.


Here are a few test renderings of the robot posed with full textures and shaders applied.  There is a lot of tweak work to do, but I am now set to finish this guy off.









11/27/11

Advanced Texturing and Lighting: More Tweaking

Now that I'm down to the last little bit of tweaking shaders and lights, things are starting to look the same. There isn't that much more to speak about in terms of how to set this up.


I did try adding a bokeh shader to the camera to simulate some depth of field.  However, without an HDRI light source and a narrow depth of field, it's sort of useless.  I'll probably take it out.  Some other time I will explain more about that and how the effect works, but for now, I have other things to work on.

11/26/11

The Sounds Inside My Head: A Musical Sketchbook

I fancy myself a bit of a musician.  I ever since I was young, I can say that I had an interest in music.  Maybe not talent, but interest.  Some of my fondest memories were of me getting to play around with the musical keyboards that my brothers owned.  Like most electronics of the late 80s and early 90s, these keyboards had pre-programmed music tracks that you could turn on and off in addition to hundreds of synthesized instruments.

However, I had very little knowledge of how to actually play music at a young age.  The rest of my brothers had the opportunity (forced, sometimes) to take organ lessons.  (My parents still have their old Wurlitzer sitting in their home and, while some of the keys don't work that well anymore, it still will play just fine.)  By the time I reached the age where I was to start learning the organ, Wayne, the teacher of the rest of my brothers, decided he'd had enough of teaching organ lessons.  There weren't any other organ teachers in the area, so my dear mother took it upon herself to try and teach me keyboard lessons herself.

Bless her heart.  I think we made it through two lessons before she gave up hope on me because I was more interested in dinking around on the keyboard than actually reading music and training my fingers to work opposite of one another.

Eventually her hopes would turn around as I learned the saxophone in junior high and happened to excel in my music classes.  During that time I also got my first guitar, a Yamaha acoustic, that for the first six months didn't really get played properly.  I was given an ultimatum by my mother that I would either take guitar lessons or she was giving it away.  Being the greedy child that I was, I opted for lessons.

And then I found my true musical love.

While I still feel I could pick up a saxophone and play it, I know it wouldn't be like picking up a guitar. I took guitar lessons for a number of years and eventually came to play it in our high school jazz band.  That is where my skill really started to develop, since I was being forced to change chords drastically on every beat.

As the years passed, I gained a lot of musical equipment and started to get interested in how to record songs.  My first attempts at recording (and at the songs) were laughable and involved routing the guitar into a tape recorder.  The quality was so bad that I even cringe now while writing this.

Eventually, I discovered digital recording, although I only knew how to record using a waveform editor.  That worked okay until I had to start synching up the tracks.  I got lucky sometimes, but others, I was clueless about how to fix.  Thankfully, technology got better and I got wiser... and I got one of the most helpful musical creation programs I have been exposed to: Garageband.

After playing the guitar for many years, I one day sat down at my parents' organ and began to play actual music.  Granted, it was pretty much only a few church hymns, but they sounded decent.  I remember my mother coming in to see me at the organ and asking where in the world I learned to play.  It was amusing to me to see that learning how to play the guitar actually helped me understand how to play a keyboarded instrument.  I could translate chords with my left hand and could do a decent job at picking out the melody with my right hand.  It's not perfect, but it works well enough to get the melody across.

Now, even though I enjoy a good jam session with friends, if I'm doing music, it's mainly for my stuff at home.  I now have a MIDI keyboard and USB guitar interface where I write out songs for my own personal enjoyment.  I'm not much one for lyrics, so most of what I do is sort of "musical sketches."  I thought I would share a few recent additions to my so-called musical sketchbook:


This is actually going to be the music track for my upcoming demo reel (hence the creative title).  I needed a track that was only two minutes long, and since I usually write my own music for these things, I had to come up with something.


This track actually evolved during a jam session with a good friend, Matt Banz.  Sometimes I just start playing and he comes up with a beat on the drums to fit the tune.  This was one of the ideas that came out this past summer.

I have more, but most of them are just sketches, or little musical doodles.  They're not fit for the blog.  Or human ears.

One of my hopes with doing a career change is that I can get back into music as a hobby.  As it was, I would go all day at work as an industrial designer, then come home and work on animation as my hobby.  I would like to go to work all day doing my hobby so I can come home and work on my hobby.  Some day, perhaps, when the stars align, that dream will come true.  Until then, I won't stop "sketching."

11/23/11

Thesis Project: Robot Textures

 This week I dealt with a few technical issues, so the amount of work that I actually got to do was sort of minimal.  I decided to finally download and install the student version of Maya 2012 for Mac, seeing that it is a 64-bit application.  The thing that has been killing me lately is that Mental Ray for Maya 2010, which is what I have been running previously, runs out of memory on me halfway through preview renders.  Doing a batch render every single time I want to test out rendering the robot wasn't exactly what I had in mind.

However, I found my own set of problems when trying to upgrade to Maya 2012.  For some reason that I couldn't ever really understand, the nodes in the Hypergraph and Hypershade had no labels on them.  I later found out that the text only appeared when you zoomed to an optimal level, but otherwise disappeared.  This sort of renders Maya inoperable for the most part, so I had to do some searching on the web to see if anyone else had this problem.  I found someone posted something about changing fonts in Maya 2011 for Mac to make it more legible, and that involved editing some of the core files of Maya.  However, they had created a script that automated the process, but it was only for 2011.  I downloaded it and did some editing to the script so that it would modify 2012.  When I ran it, it seemed to solve my no-name problem just fine!  Sometimes I know just enough to get myself into trouble.

After doing the upgrade to Autodesk's 2012 applications, I started doing the texture painting for the robot in Mudbox.  Mudbox is Autodesk's answer to ZBrush and it allows you to do sculpting as well as painting directly onto a mesh to create texture maps.  I mainly have been using it for texturing, as ZBrush has features that I like better for sculpting.  The one thing about Mudbox that makes it so versatile in texture painting is the fact that you have layers, just like in Photoshop, and can stack textures on top of one another.  Then you can export your whole scene back into Maya with all of the shaders automatically created for you.  It's pretty snappy, although there are still a few bugs to be worked out.




With the robot, the look I am going for is metal that isn't corroded, but isn't impervious to having material buildup on it.  These renderings are straight from Mudbox, so they don't give the best impression of what the shaders will really be doing, but they can give you an idea of the grime I painted on. 


The way I plan on going about with this will require some fancy shader programming, which hopefully will work for me.  I calculated that I will have at least 53 different shaders for my scene, some of which are very similar, but use different texture maps.  This will require creating a master shader and linking the individual shaders to this master shader.  I've done a few tests, and it's looking promising.  However, I hope I don't screw up my scene by doing this.  If it works, it will make tweaking the textures all that easier to do.  If it doesn't, then I've got a lot of work on my hands.

11/17/11

Advanced Texturing & Lighting: Haunted House Progress

This week I spent some time amping up the amount of fog within the room.  That required masking out some of the areas of ambient occlusion in Photoshop, but the effect seemed to come across.  I also played around a bit with global illumination, which is another way of simulating how light bounces from one surface to another.


11/16/11

Thesis Project: Robot – Image Based Lighting

 This week was quite a rush in trying to finish up the modeling for the Robot.  Some of the shapes and structures were quite difficult to figure out, but I managed to get them in the end.  The main issues with hard surface modeling, especially with a model with complex curved surfaces, is trying to keep your surface continuity consistent.  One wrong move with a vertex and you're done for!

Okay, maybe not really, but it really helps to have really clean, smooth geometry to give the appearance that something has been manufactured.  When you apply a nice, reflective shader to a surface like that as well, all of the problems can quickly be revealed.

That brings me to the next point.  For this model, I decided that I wanted to try rendering it out using image-based lighting using Mental Ray.  Image based lighting allows you to illuminate a model using a high dynamic range image as a light source.  In a sense, you are mimicking how light typically reflects and refracts on objects in real life.  If you place an object outside and take a picture of it, you'll get a nice highlight from the sun, reflected blue light from the sky, and reflected light from the ground it's sitting on.  Mental Ray allows you to fake that effect with fairly decent results.

I wanted to figure out the best image to light this Robot model with, so I lit him using various HDR images and rendered it out to see the results:



An abstract environment



A cityscape environment



A crater environment



A desert environment



A european plaza



A forest meadow



The city of Pisae



A photography studio lighting setup

 As you can see, different environments give off different results, but the reflections and highlights are incredibly realistic.  While the Robot won't be this shiny because I'll be adding quite a bit of grunge to the textures, this gives me a good starting point to judge my textures by.


A gray model turntable test


Reflective turntable test

11/14/11

Demo Reel 2012: New Intro Work In Progress

After more than two years of service, I have decided to redo my current demo reel's introductory animation.  There are many reasons for doing this:
  • It adds too much time to the overall reel, which needs to be around two minutes.
  • It takes too long to display my name.
  • I have a revised logo since I did the last one.
  • I have learned a ton of stuff since I did that one, primarily within the realms of lighting and texturing.

I had received some helpful critiques from some classmates as well, so I knew it was time to start working on a new one.  I've stuck to the whole mechanical theme of the previous one, but I'm trying to get it down to about eight to ten seconds in total length.  For the mean time, I've been focusing on modeling some new robotic arms and getting the shaders right:



Also, I had to figure out how to import my logo model from Cinema 4D into Maya, with a few hiccups in the texturing.  After I finish doing the modeling, it will be time for animating.  It's my goal to have this rendered out by the beginning of December, so I have some real work ahead of me.

11/10/11

Advanced Texturing & Lighting

This is just some more tweaking with the lights and textures of the haunted house model.  I moved around some lights and added some volumetric fog, but it tends to be a bit diminished with the post-processing I did on the image:


Thesis Project: Robot Modeling Progress

I haven't posted my progress on this model in a little while.  I started over with some of the major pieces of the Robot a few weeks ago and have been working my way forward ever since.  The reason I started over was because the surface topology had a lot of artifacts in it that would show up whenever I would smooth the surface, especially where I had to punch holes in the mesh, like on the back.



You can compare this to the original a few months back and see that this is much higher in resolution than the previous iteration.  One thing that I also focused on this time around was not getting caught up in making the NURBS surfaces line up perfectly every single time.  I found that if I didn't get caught up in making mathematically perfect geometry, I was able to work faster without any real issues to speak of.  One thing you have to keep in mind is that the end results are what you are after, even if the process isn't "perfect."  As long as the end rendering looks good, you can get away with a lot of cheating!



Once I finish modeling the head, I will do some quick UV mapping, and then I will actually duplicate some of the parts.  This saves me time in having to UV map objects that are just going to be mirrored anyway.

11/6/11

Advanced Texturing and Lighting: The Haunted House – Textures

I think this week was one of the longest I have experienced in a while.  A lot of it was spent trying to figure out some weird rendering issues, but also me just having anxiety on where to start.  I always have that problem when I start texturing something.

This week we started to add some bounce lights to our scene.  Before the advent of efficient global illumination algorithms, this was a very tedious task.  Most of the time, you would fake the reflected light in a scene by adding another light and aiming it at the surrounding geometry.  Now things have advanced to make that happen in the rendering itself at render time, saving a bit of time.  However, there are a few times when you just want to control the lighting a bit more, so you add another light or two.


You can see the contrast from the "Neutral Gray" scene to the textured scene below:


When doing textures, you have to see certain images or textures as what they could be rather than what they are.  For example, the floor panels were textured using a photograph of the fence across the street from our apartment.  The cracks and grime on the walls are actually in the pavement in our carport.  A lot of the textures are the same for all of the geometry, but with a little bit of tweaking with the UVs, so everything isn't the exact same.

This image actually has some fairly complex things happening both with the textures and with the way it is put together.  Here is a little breakdown of how things are composited at the moment:

Background plate

Beauty pass (an accumulation of diffuse, specular, reflection, ambient, etc.)

Occlusion pass (to simulate the real world phenomenon)

 And finally a glow pass, which I did in Photoshop after the fact

This is an involved process and I have a lot more to do, but the heavy lifting is done for the most part now.  I spent some time linking shader values in Maya, so now if I adjust one of the "master" values for the walls, the rest update as well, rather than having to go through and remember the values of each attribute separately.  It took some time to set up, but in the end, I know it will pay off.