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.

3 comments:

Zeuk Chou said...

Hey~Tim
May I ask u something about cinematics of Hellgate:London?
How did you guys do the crowd scene in the opening intro clip which has two guys, one man and one woman, fight to lots monsters in the subway?
Does blur use max's crowd system to deal with that scene?
Thanks

Tim Jones said...

Funny enough, some of the big zombie crowd shots were mine.

There were around 300 characters in that one big grenade shot. Most of the other shots had significantly less characters. All the big shots in that project were handled the same way though.

We have high res and low res versions of the characters. Then for Hellgate we wrote a script that would allow us to click on the surface of an object and scattered around that point we would get 8 or so low res zombie characters. Each character had one of several walk cycles on it with random offsets for timing so none of them looked exactly the same.

The Scene Assemblers would place all those characters in the scene and make sure none of them walked over scene objects or each other.

Even having 300 low res characters takes a lot of memory, so we had to be very careful and simplify things where ever possible.

I haven't used that script since that project. Usually the solution to big crowd scenes changes depending on the shot/project. I know for a project we have going on right now one of the scene assemblers is rendering animations of characters running to map onto cards which he's using in a particle system to create a huge army of soldiers running across landscape.

Zeuk Chou said...

Thank you for so circumstantial explanation!! :)