Journal
First Week, 6/14-6/18:
Upon arriving at Carnegie Mellon University, I met with Professor Jessica Hodgins, my mentor in the office at the Carnegie Mellon University (CMU) Graphics Lab, located in the Robotics Institute. I had previously exchanged emails with Jessica to discuss what I might do to prepare for any research work I may perform at CMU, and she had suggested that I spend some time working with Maya, a powerful software application created by Alias Wavefront that provides development tools needed for 3D modeling, animation, effects, and rendering. While Jessica and I were finalizing ideas for my project, she instructed me to continue familiarizing myself with various Maya developmental tools within the program. Personally, I haved adored working with Maya software ever since my first interaction with it in my first class in Computer Graphics, so spending extra time on it was a treat for me! During the end of this week, I met with Jessica and Jim Duesing, an art professor that requested the use of the graphics lab to implement a plugin for Maya that would allow the manipulation of photorealistic and non-photorealistic Rendering for various objects, models and surfaces. This has become the initial basis for my DMP project. A more detailed description of my project can be found on the main page.
Second Week, 6/21-6/25:
During this week, I have been concentrating on learning more about the MEL scripting language that maya uses for plugins. To aid my learning, I have been thoroughly reading Complete Maya Programming: An Extensive Guide to MEL and the C++ API , a book by David A.D. Gould. It is an excellent book on learning MEL script, and I learn something new everytime I read it. Jessica has recommended that I visit highend3d.com to reference their nonphotorealistic plugins, and see if any might work to help me in my research. I have tried a plugin called Non PhotoRealistic Shading v0.6. This plugin creates a shade of this type for any type of object in Maya. It works well for Maya 5.0, but there are some compatibility issues with this plugin and Maya's newest upgrade, Maya 6.0. So I am also transistioning from using just Maya 5.0 to interchangebly using the newer version Maya 6.0, and testing to see if I can manipulate the free source code MEL script within the plugin to obtain perfect compatibility between this plugin and both Maya versions. I have also visited the motion capture facility at Carnegie Mellon. Today I was introduced to the procedures of motion capture by Mo, an art graduate at CMU that works at the motion capture lab. I've included a short description of important motion capture facts and rules below:
Third Week, 6/28-7/2:
This week the Motion Capture lab had asked me to help participate in a sample motion capture session. What's exciting about this opportunity is that they need me to assist as a test subject for different motion capture sequences. I had to put on a motion capture suit, which was actually a black tight-fitted athletic suit. The suit had to be skin tight because the motion capture system does better when you don't wear baggy clothes, and the general structure of your body is exposed to the system's cameras. Moshe, the motion capture specialist, assisted me with putting special mocap markers in certain places on the suit I was wearing. These velcro-like markers are covered with special tape that give off light, so that the infrared cameras would be able to absorb this light, thereby taking in the positions of each and every marker. I did a number of motion capture sequences, involving positioning my body to do general everyday actions (i.e. shooting a gun, pouring from a pitcher). I've provided two examples of my motion capture exercises below:
Note: These are Real Player Video Files. Click the bottom link if you need to get Realplayer:
To download the Realplayer for Linux, click here
Click on images for movie viewing:
           
                                 Opening a Jar                                           Shooting a gun
Regarding my project, I have created a MEL (Maya Embedded Language) script involving two directional lights from specific cameras to reflect not general light, but two different textures. The initial examples I used were a crater-like texture on the left side, and a green cartoon shader texture on the right side. The smaller sphere (in the picture examples shown below) is supposed to solely reflect the texture that is cast at a specific region of the sphere that it is positioned at, however, the lights defined are not working perfectly. I might have to modify the positioning of the lights in the MEL script to achieve the desired restriction of the lights in their respective regions. Below are sample trial runs of my plugin, with the rendered examples on the left, and the snapshot of each rendered examples editing environment within Maya on the right, respectively.


Fourth Week, 7/5-7/9:
This week I had to make some major changes to the MEL script that I'm implementing for this plugin. I've met with Jessica and James (my advisors on the project), and they've told me that while I do have progress, the implementation is not what they wanted. What is needed is for the shading of a particular object to be surfaced based, instead of based on the direction of light. My initial work focus was actually based on the desired implementation, but being that I'm still learning Maya, I didn't think that it would be possible within a short period of time, being that Maya is so complex, however, this method is possible if one thinks of the objects that create a polygon.
Vertices, Faces, UVs, and Edges:
The components listed above are all that of a polygon's internal structure, and is the basis of any kind of manipulation of a polygonal object. For my algorithm, I have to concentrate on the faces of a sphere, and the shaders/textures applied to it at a particular point. I have added in a general attribute slider to the plugin, allowing translation of the smaller sphere to different sides of the larger sphere (via the x-axis) to show change in the surface shader/texture. Upon each translation about the x-axis, the algorithm checks each face of the smaller sphere, to determine the side of the sphere that each face is on. Depending on the side of a particular face, it will recieve coloring based on the side of the sphere it's on. This allows coloring of specific parts of the sphere with respect to a region.
At first, I thought that this was a remedial way of actually writing the algorithm, but have found that the results of this method could be quite rewarding, based upon the number of faces you define for the sphere created. The higher the subdivisions of a sphere, the more detail you can have for transitional shader change as the smaller sphere translates about the x-axis.
Fifth Week, 7/12-7/16:
Changing implementations of my previous work required me to learn how to use the capabilities of Maya and the C++ API combined. The number of functions and classes already included in Maya seem endless. In my previous implementation, I mainly used the graphical user interface of maya to implement many actions to make the desirable lighting and shading, but now I must use C++ to specify exactly what location and procedure I need to be performed on a particular polygonal face. I've also had to change my editing interface from the simple Windows based Notepad editor to a more advanced editor called Emacs via Cygwin, which is a Linux-based environment that is run under Windows. Right now I'm also using Microsoft Visual Studio 2003.NET to try out the Maya Plugin Wizard. This is supposed to make the compilations easier to perform under Maya, instead of having to use Emacs and manually integrate Maya into the Cygwin system and having to declare environment variables.
The Carnegie-Mellon Graphics Lab is amazing! Because of my passion for graphics, I've researched most of the popular graphics-based books in print, and surprisingly enough I've found most of my favorites in Jessica's lab. Titles that I never thought I would be able to glance through are now within my reach. During breaks I'll often glance through the library within the lab, and check out the titles, as well as software they have available to help with graphics modeling. They have titles based on many popular software companies (i.e. Macromedia, Adobe) and the most popular languages (i.e. C++, Java, JavaScript, ActionScript, HTML, etc). Plus, they have many books on advanced math, since this is the basis of the graphics realm.
Sixth Week, 7/19-7/23:
This week when I met Jessica, I had discussed with her my use of the C++ API. Jessica said that using the API wasn't specifically necessary, and that using strictly MEL script was fine for our implementation. I thought that using the API would give me more flexibility for this plugin, but after some modifications to my MEL script, I was getting desired results. Again using the idea of shading a sphere, each face on the smaller sphere was shaded according to which side of the bigger sphere it was on. For each face, if a face is positioned on the equator (which is determined by the color separation of the bigger sphere), if the number of the face's vertices on one side of the equator exceeds the number on the other side of the equator, the face is then shaded in the region that contains the majority of face vertices. The pictures below show the results obtained for this week. The only setback to this implementation was that certain faces weren't shaded because half of the vertices were on one side of the equator, and the other half were on the opposite side of the equator, and since the majority of vertices are not on a particular side of the equator in this case, the shading algorithm will not apply any specific shader to the face examined.

Seventh Week, 7/26-7/30:
This week when I met with both professors, Professor James Duesing let me know that the test implementation we were working on was only a step to the true configuration he wanted for the plugin. In my present implementation, the smaller sphere in the scene was shaded according to it's position with respect to the equator of the larger sphere (defined by the color separation on the larger sphere). However, the desired implementation was for an entire scene to be shaded according to the position of a plane, not a sphere object. In the previous implementation, the object to be shaded was moved, and it was shaded according to it's position aligned with another object that had no translation, but controlled the shading of the scene. However, the desired implementation requires the object that controls the shading of the scene to have movement, and the other objects in the scene to be still for analyzation. With every move of the object that controls the shading, the algorithm will shade the still objects according to the new position of that object. It seems to be the opposite of the previous implementation: Instead of the object that controls the shading being still, it is actually the object that does the movement in the scene, and shades at the same time. Professor Jessica Hodgins said that this should be just a code change of my present implementation, switching roles of the still object and the moving object. With this implementation however, a plane will be used as the controlled polygonal shading object, and different types of polygonal objects will be used for analyzation.
Eighth Week, 8/2-8/06:
After changing around the implementation, the results were quite satisfactory. I was requested to create a movie showing results of the plane moving about the scene, and shading the objects within the scene. Below is a movie showing the MEL script at work. The movie below shows an example of shading different objects in a scene, using two different shaders on one surface. It was requested that I use a photorealistic 3D shader, and also a non-photorealistic 2D shader, to show the difference of using both at the same time on one surface. I used a plugin called the TomCat Cartoon Shader Maya Plugin. This allows the creation of non-photorealistic shaders for use on Maya objects. As I stated in last week's entry, since I changed around the implementation by switching the roles of the still objects and the color controlling object (in this case the plane in a scene), certain faces on a polygonal object would still not be shaded because the face vertices would be split equally on both sides of the plane. Professor Jessica Hodgins had recommended that my next step would be to create a shader that would serve as a fill in area for the faces that were not shaded by the algorithm. This shader would average whatever shaders were used to shade different parts of the scene. This is my next focus for the future implementation.
Note: These are Real Player Video Files. Click the bottom link if you need to get Realplayer:
To download the Realplayer for Linux, click here
Click on images for movie viewing:
Ninth Week, 8/9-8/13:
This week I have traveled to Los Angeles, CA, to attend SIGGRAPH 2004. SIGGRAPH is a computer organization dedicated to increase the knowledge and education of Computer Graphics implementation and usage. SIGGRAPH 2004 is an actual conference that takes place every year for the organization. Hundreds of thousands of attendees come every year to see new technologies, be educated on new and old computer graphics techniques, and socialize with professionals and students that have an interest in graphics. What's so unique about this conference is that unlike most technological conferences, SIGGRAPH involves not only computer scientists, but also artists that choose to practice on computer, using 3D software like Maya 6.0 to create characters or 2D software like Adobe Photoshop to create beautiful sketches. I found myself interacting with both computer scientists and artists. Together we all discussed the circle of computer graphics production. We discussed topic on both sides: The computer scientist, who creates the software and algorithmic techniques needed for computer graphics creations, and the artist that uses the software created to create fascinating and beautiful works of art and breathtaking computer models via computer, and also applies animation to give the characters created life.
To continue with the project, this week I've worked on creating shader that would serve as a fill in area for the faces that were not shaded by the algorithm. This shader would average whatever shaders were used to shade different parts of the scene. I used the option within Maya to create a layered shader that contained shader input from both general shaders used for the initial shading process. The layered shader would be created using both shaders, with each shader output having 50% transparency for equal blending. With this process, objects shaded will have a middle area to fill in the transition area between both shaders on a surface.
Below are two sample images of the script in action. If you look closely enough, you can see the layererd shader filling in the space between the two dominant green and white striped shaders:
Tenth Week, 8/16-8/20:
This is the last week of my summer internship at Carnegie Mellon. This week I've made some updates to my MEL script. It turns out that in order to create a layered shader with other shaders as input to be layered, I had to duplicate the input shaders and use the duplicates instead of the originals as input to the layered shader, so that the original's input properties would not be altered. I created an interface that allowed the user to personalize the MEL script execution by giving as input the shaders used for the shading of the scene, the shader used as a filler for the boundary area, the name of the plane used to separate different parts of the scene, and the folder location they would like output to be placed.
I've provided a movie below that shows a previous test with final rendering with higher resolution:
Note: These are Real Player Video Files. Click the bottom link if you need to get Realplayer:
To download the Realplayer for Linux, click here
Click on images for movie viewing:
Concluding Remarks:
This internship has opened my eyes to many realities of graduate school. I've met so many great minds at Carnegie Mellon from all over the world, and the knowledge I have gained seems endless. So many graduate students reside in the Robotics Institute, and I've talked with many. The ones I have talked to have given me advice on so many topics: Life after undergrad studies, the transition from undergrad life to grad life, balancing family and social life with academia, and the list goes on. I would like to thank the Distributed Mentorship Program for the opportunity to be a participant. Being able to dedicate such a long period of time to do research gives such an opportuntiy for exploration and the findings of new techniques to be applied to research. Working with Professor Hodgins was such a wonderful experience. She gave me such great advice regarding graduate school, and treated me like one of her graduate students. I truly appreciate this summer, and will never forget what I've learned as I pursue my graduate school endeavors and beyond.