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.

5 comments:

Zeuk Chou said...

Hey Tim~
Thanks for sharing :)

DommyBoy said...

Great post! Very useful info. Just stumbled on your blog and I love all the info here. Keep it up, you're certainly an inspiration - living the work life I am desperately seeking. P.S. If you get time, I'd love to hear ur top tips for memory saving on heavy scenes. Textures, high res models, displacement rendering etc.

Felipe Budinich said...

Interesting, i'll take a look at those tiled .map and .exr files.

I think it will be insanely useful if the only real downside is the hard drive space and manual input.

Any pointers to documentation you could share?

PS: By the way, great blog!

Tim Jones said...

http://www.openexr.com/

I haven't come across a whole lot of information about tiled textures on the web. Everything I learned came from this website, as well as some searches on some CG forums.

Felipe Budinich said...

Thanks man, you are the best