Wednesday, November 19, 2008

Good example

I recently came across a great example of a situation that can happen when compositing that I thought I'd point out.

http://mymentalray.com/forum/showthread.php?t=1491

Basically, the example shows a limitation when working with RawLighting passes. The compositing math for this example is being done correctly, but because of the anti-aliasing you cannot composite these passes back together again and get the same image that you would get out of your 3d package in one pass. In some cases you can get away with having this problem in your comp and not see it. This thread shows a great example of the problem really showing its ugly head.

There is a work around that would allow you to create a raw lighting pass (if you wanted one) that would multiply over the diffuse pass and create the indentical output from your 3d package. To do this you need to render a lighting pass (textures and lighting together) and a diffuse pass. You could then divide the lighting pass by the diffuse pass which will give you a RawLighting pass. The difference between this RawLighting pass and if you rendered it from your 3d package is that this method will take the anti-aliased color differences into account. If you then color correct this and multiply it back over your diffuse pass you will get the exact same output as your 3d package would do.

Why would you want to do this? It is less efficient. Your basically rendering extra passes and using extra nodes in order to create the pass you just rendered anyways. You might consider doing this if you wanted to tweak the diffuse pass and have it automatically update down the chain reguardless of lighting changes. You might also want to work this way just cause its easier to actually see your lighting seperate from your textures. For lighting passes this workflow is probably more trouble than it is worth. But it does work.

Anyways, I thought the example was interesting and good to know about.

Friday, October 31, 2008

Long time

I had a feeling this might happen. No updates in a long time. Things have eased up a bit today and I found some time to give a little udpate.

Gnomon has released my latest training DVD on Multi-pass Compositing. My first project at Digital Domain is on TV and before pretty much every movie now at the theaters. My first project was actually 3 commercials of which I worked on two. The first one is called "Mecha Mesquito" and is a commercial for the Honda Fit model car. The commercial features a bunch of cars modified to look like mosquitos complete with wings and legs made of car parts. They watch the Honda Fit drive by and begin chasing after it in the hopes of sucking the gas tank empty. At the end they become entranced by a building in the shape of a bug zapper and fly into it. The project was done mainly in Lightwave, with just some minor stuff in other packages. There were two other commercials in this campaign. The other I worked on is called "Defense Mechanism" and features the Honda Fit again but in a city with an underwater feel. All the other cars are fish like. The last I did not work on but had lots of bats flying out of the cars trunk.

After finishing that project I went on "overhead" which was a totally new experience for me. Basically you come to work and wait for someone to find work for you. I started to learn Maya in that time, but two days in they found a new task for me. The VFX supervisor on the film "Curious Case of Benjamin Buttons" came to me and asked if I could render the opening shot of the movie in 3ds Max using Vray. I can't give any details about the shot, but this was an experimental pipeline involving converting animation from another package into max on a VERY grand scale. Unfortunately, after two weeks of trying to make it work we ran into memory problems that just could not be overcome. So the shot remained in the orginal software package it was created in and I was put back on overhead. I was pretty bummed cause the shot is very cool and I really loved working on it. I got to see the final shot (rendered in another package) and it turned out fantastic. A part of me still wants to know what it would have turned out looking like using Max/Vray though. It had been looking really good before the memory cap.

After a couple more days on overhead I was put on another commercial project which again I can't talk about. This project is very cool though. I'm really enjoying it. I came to DD wanting to push myself to create completely photo realistic work and this project is turning out to be the closest I've ever come to that goal. Again on this project I'm involved with creating a pipeline for it which has been quite interesting. I've done quite a bit of scripting over the years in Max, but mainly creating tools that only I needed to depend on. I had a very nerve racking but also exciting experience on this project where we were going to be in serious trouble if we didn't have a particular tool created and I was the one to do it. It was a bit challenging to write this tool and the moment that another artists tried it for the first time on a shot......it worked. The few quite seconds before the tool was run for the first time in production was quite an intense moment. Seeing it work flawlessly that first time made my day and since it was the major stubbling point on the project and we had gotten past it made me feel like this project was well on its way to success. At the moment I'm wrapping up the last of the character modeling. Thats right....for those of you reading this who know me...I'm not a character modeler, but that is in fact what I did on this project. I modeled and textured 3 characters actually. They weren't all that difficult though. Mostly hard surface modeling. But it was something different for me. I've modeled only environments for the past 5 years.

Next week we begin rendering shots. I can't wait to see the shots start coming together.

Tim J

Friday, August 15, 2008

Gnomon release

The Gnomon Workshop has posted in their "coming soon" section news about the release of my next training DVD. It is called "Multi-pass compositing" and deals with rendering passes out of 3ds max using several different renderers and compositing in Digital Fusion. The DVD mainly focuses on the compositing side of things. I really tried to include as much information as I could. I started off with some basics, but then I got into the "meat and potatoes," if you will, about how to work with passes. I feel that over the years I've come across many compositing work flows and issues in production and I made sure to include examples and explanations on how to deal with as many of them as I could on this DVD. I feel really good about how this DVD turned out. Hopefully if anyone reading this checks it out they'll enjoy it too. :)

www.thegnomonworkshop.com

One week and counting

I've just completed my first week at Digital Domain. So far its been exciting, frustrating and overwhelming at times. I've been bombarded with a ton of new software to learn, both proprietary and off the shelf. The amount of new software to learn has been the overwhelming part. Each day its gotten easier, but its still a lot to try to soak in all at once. At times its been frustrating because for the past 5 years at Blur I've known the pipeline and tools inside out. Even helped to create some of them. But now I find myself the struggling new guy all over again. So far that has been both exciting and frustrating as I mentioned before. Knowing one pipeline inside out and then being dropped into a new pipeline and software that is completely foreign has been the hard part. Your faced with wanting to produce work at the same level and speed that your used to doing, but you know no matter what that there has to be a period of time in which to learn and your going to be slower until you gain experience with the new tools and pipeline. I'm excited about learning new software and work flows. I'm also excited to get to work on different types of projects and make new friends.

Wednesday, July 30, 2008

Project Challenge: Hawx



So as I mentioned in my previous post. Hawx is finished. So its time to give a little breakdown on it. :)

Hawx is a 30 second television spot for the game. The final output resolution was 1920x1080 HD at 30 fps. We had a total of 17 shots. We had 1 animatic artist, 2 vehicle modelers, 2 riggers, 2 animators, 2 scene assemblers and 2 FX artists on the project. The project was for the most part rendered in Mental Ray. I ended up needing to render a few passes in Vray though. More on that later.

The biggest problem as usual ended up being memory management. The city street shots were pretty heavy on the poly count and textures, but nothing above and beyond the normal range. What made it difficult to render was that we needed to have the characters render in the scene in order to get proper reflections and light interaction on the environment as them move through it. Since the final output res was 1080p we had some very high res texture maps. It only takes a few of those before your in memory troubles (This project was in 32bit so we had the 3 gig RAM limit). It came down to carefully optimizing each shot so that it would be as high quality as possible but still render.

Another issue we came across was one that we originally thought would save us time. In this spot we were re-using some characters and vehicles from a previous project we did. The only difference was that the materials needed to be changed over to Mental Ray from Brazil. So we didn't need to worry about new character models or rigs. Unfortunately, in the end it came out as a wash. The models were over a year old and weren't up to date with our current pipeline needs as far as our tools are concerned. So the animators and riggers fought against that enough that it probably didn't save us any time at all in the long run and caused headaches for them. Sorry guys :(

Scene assembly was pretty straight forward. Most of the shots took place in the air so there was no interaction with the environment to worry about. Renders were pretty fast even at final quality. I think the longest render times I had were about 1.5 hours per frame at final quality. That was for some closeup shots of the pilot in the cockpit.

The aerial shots turned out to be simpler than I was originally anticipating. For the most part we got away with some satellite photos mapped onto a rough landscape model. Then we sprinkled in some models of the taller buildings, but left the shorter ones as just part of the aerial photo texture. This map ended up being HUGE. I broke it into two maps cause it was just too big. Each of the two texture maps was 19,000 pixels square. I could just barely get these two maps to render by themselves on the landscape model. So I spent some time looking into ways of dealing with extremely large texture maps. Which lead me to tiled .map and .exr files. In the end I ended up not needed to use them and just rendered as normal, but what you can do with them is really impressive so I plan to start making use of them more often in my work.

The beauty of a tiled .map or .exr is that Mental Ray can look at these texture maps and know if they are tiled or not. When I say "tiled" I don't mean you take a texture map and repeat it a number of times. Tiled in this case means that within the texture map are smaller defined areas or "tiles." When these types of texture maps are used in your scene and Mental Ray finds them it does not load the whole texture map into memory...Instead it only loads the tile it needs in order to render the current bucket. Then when its finished rendering that bucket it dumps the memory and loads the next tile it needs. So you have almost no Ram overhead, and it seemed in my case to actually initialize and render the scene faster. It is also possible to have these .map or .exr files store multiple resolution texture maps inside them. This way if Mental Ray knows that an object is far away it can load a lower resolution version instead of the full res one. The downside to this is that it requires a lot of hard drive space. These texture maps get huge. Mine were around 400 megs each. Another downside is that it takes some manual setup to create the tiled texture maps. For that I found some dos based executables on the OpenEXR website which allow you to convert texture maps to tiled texture maps. But its not a simple "save as" menu, you have to actually type out some basic code in a certain format. Totally worth the trouble though if you have a lot of highres maps you need to render. I found that .map files worked just fine in Max 2008, however, exr's did not work properly. The memory was not being handled right in mental ray. In max 2009 the exrs worked beautifully. FYI

In the end the project went very smoothly. The clients were great, the project delivered on time and on budget. There were hardly any long work days and nobody pulled any all nighters.

Friday, July 25, 2008

Nearly 5 years

Well...Hawx is now finished and out the door.... And so am I. After nearly 5 years at Blur I've decided to move on. I'll be heading over to Digital Domain to work in their commercials department. Its been an amazing ride at Blur. I've made lots of great friends and grown tremendously as an artist and team leader. Blur is a fantastic place to work and I'm very sad to say goodbye. I've always wanted to produce photo real renderings, and since that is a type of work that Blur rarely does, I've decided to move on. I will miss you Blur! Thanks for everything.

On a side note. Digital Domain is pretty much walking distance from Blur, and Sze (my wife) will still be working at Blur. So I'm not really leaving, just sitting further down the street. :)

Wednesday, June 25, 2008

1st Pass of Hawx

Hawx is in full swing now. Animation is about 98% done with just minor fixes being done as we find them. Scene assembly is just past half way done and the FX artists started this week. As projects go this one is simpler than most. Half of the spot takes place in the air so we don't have to worry about shadows on the environment or in some shots not even an environment at all. Only 3 of the aerial shots ended up needing a modeled environment in the background. The rest of the aerial shots worked just fine with photographed cloud backgrounds and afterburn particles mixed together. The FX will consist of two large explosions (seen in 4 total shots) and some simpler things like vapor trails and flares. We'll have our first review of the scene assembly this Friday with the client. That's when we'll find out if we're really on the right track or not ;) .

Wednesday, May 7, 2008

HAWX begins

Section 8 is finally completely approved and out the door. So work on HAWX has officially begun. HAWX is a game all about modern air combat. This project will be a 30 second television commercial for the game. Part of the spot will take place on the ground in some war torn streets of Rio de Janiero. The rest will take place in the air over the city. I'm looking forward to this project. I have never done a project that requires me to create a CG version of a recognizable city and its landmarks. Let alone do that from the air. Should be fun and very action packed. The in-game footage we were given for reference is pretty impressive.

Tuesday, April 8, 2008

Project Challenge

With every project I work on there is always some unique challenge that has to be overcome while working on it. I thought I would start a re-occurring topic where as I finish a project I'd share what the main challenges were with it and how we over came them.

For the first post in this series I'll talk about the game trailer for "Section 8."



This project was pretty typical in most respects. It was rendered in HD at 1280x720 at 30fps. The total running time was 2 minutes 10 seconds and there were 30 shots. We had 2 character modelers, 1 rigger, 5 animators (never all at once), 3 Scene assemblers, 2 FX artists and 1 matte painter. The cinematic mainly takes place on the surface of an alien desert environment approaching sunset. Some shots at the beginning take place inside a space ship. The characters are futuristic soldiers wearing highly reflective body armor.

For this project we rendered with Mental Ray in 3ds Max 2008. This was the first project to be rendered at Blur using this combination. Understandably, many of our issues in the beginning were just learning the ins and outs of Mental Ray. Memory turned out to be our biggest challenge on this project. Memory is always an issue on every project, however, this time it really came to the forefront.

I was responsible for modeling the environment (among other things) which is full of large rock formations and was wanting to use mental ray's displacement for them. The rocks were modeled in Z-brush and displacement and normal maps were exported for them. After only putting my second rock into the scene my render crashed. I checked the RAM and was shocked to see it was well up above 3 gigs. After some experimentation it turned out that Mental Ray was not flushing the RAM it was using for the displacement after the bucket being rendered finished. Vray users (like myself) will know this as dynamic memory. Its memory that is only loaded when the bucket starts to render, and is flushed when the bucket completes allowing you to render very memory intensive scenes. I started lowering displacement quality to see how low I had to push things before I could get it to render. After a short while it was obvious that displacement was not going to work for me. I couldn't get anyways near the quality level I was hoping for. So instead I started outputting level 4 subdivided meshes from Z-brush for all my rock formations and normal maps to use for the finer details. The normal maps looked great. Almost as good as the displacement did, and because the meshes were pretty dense I was able to get a pretty decent silhouette for the rocks also. The silhouette detail is the most important part of getting the rocks to look realistic. A good shader helps too ;). So I stripped all the displacement out of my scene and was getting lighting fast renders. From that point on it was business as usual with RAM. I could just watch my RAM usage in the task manager just like I always do. Towards the end of the project though we started running into memory problems again. In order to get the level of detail we needed in the rocks we had to have millions of polys in the scene. Every shot needed its own custom optimizations just to get it to render at all. The poly count of every shot varied, but the larger shots ended up around 6 million polys.

The second challenge was the highly reflective body armor the soldiers have. We have shots of the characters running through the scene as well as crouching behind rocks as they take fire from the opposing side. The original plan was to render and HDR of the environment and use that for lighting and reflections when we did the character passes. We've done that plenty of times in the past and it works great. However, this time, because the characters were so reflective it was really obvious they weren't moving through the environment. The reflections remained very static. We thought about maybe rendering HDR sequences that tracked the motion of the characters, but then every character would need its own HDR sequence and it just would be too complicated to do it that way. So we ultimately ended up making the environment invisible to camera, but having the characters rendered with the environment in the scene. This really helped add to the realism, but was very difficult to get it to render because of the RAM usage required having the environment and characters in the scene rendering together. In the end though this was the best solution and is how it ultimately got rendered.

As projects go, this one was fairly easy. It was a small crew and most of us are veterans. The new guys on the team did a great job on this project as well.

Saturday, March 29, 2008

Simple scripting

Scripting in 3ds Max is maybe not for everyone, but I couldn't even begin to count the hours/weeks/months of my time that was saved by learning at least the basics. You don't have to be a scripting genius to automate some simple repetitive tasks. The "For loop" is very basic, and is also probably the most common bit of coding you'll need. Save yourself hours of work and try this.

Lets say you've modeled a bunch of vines using renderable splines (based on a true story), but after placing about 300 of them you realize you forgot to give them enough segments to look rounded. The "for loop" is here to save you. It goes like this.

---------------

for i in selection do
(
i.render_sides = 12
)
-------------------

Its that simple. But let me explain what its doing. "i" could be anything. It could be "n", "blah", "Myfirstofficialblogpost"....etc. It doesn't matter. Its a variable that you make up that will represent each object in your selection. So basically....for (every object) that is selected do...the following bit thats in parenthesis.

In this case inside the parenthesis is a line of code that will change the segments a spline to 12. Because "i" will represent every object in my selection. This script will go through each object in my selection one at a time and change the segments to 12.

Now lets take this one step further. Another really helpful bit of code to know is how to generate random values. With a slight modification you can have the above script assign a random number of segments to each spline.

-----------------------------

for i in selection do
(
X = random 3 16
i.render_sides = X
)

-----------------------------

So in the above situation all we've done is create a variable called "X" which for every object in the scene will generate a random number between 3 and 16. Then the script assigns that value to the segments parameter of one of your splines and repeats the process until it has done this to every object in your selection.

You can use the Maxscript help file to look up what a certain parameter is called, or you can open the maxscript listener and adjust the parameter you want to later script and watch what code appears in the listener. Its an easy way to get the line of code you need without having to open the help file and search for it.

Its pretty simple stuff, but its saved me countless amounts of time. Enjoy.

Thursday, March 27, 2008

First Post!!

I've been wanting to start a blog for a while, but hadn't gotten around to it. I guess the stars aligned and it finally happened. Anyways, the idea was to have a place to just ramble out ideas and tests related to CG, compositing and photography. Maybe some experiments, tips and tricks I've come across, tutorials. Whatever seems interesting.