Optimizing rendering

Somebody should stickie this, it could come in handy.

I’ve read too many teams’ descriptions about how their room full of dual-core Xeons were taking forever on the rendering, they didn’t get it done in time, deadline trouble, etc. etc. etc., so I thought it’d be a good idea for a thread on optimizing render times.

I’ll eventually collect these and put them on my site or something.

Remember, faking an effect is often as good as using complicated calculations.

Here goes:

Raytraced shadows:
Consider using shadow maps instead. Raytraced shadows are very sharp, but they take forever. Shadow maps are flexible, and can be tweaked to fake a soft shadow. If not done right, however, the shadow can show jaggies (pixelation in the shadow map).

Raytraced objects:
Consider not using raytrace at all. Reflections can be faked with a reflection map. Often, the raytrace effect isn’t significant enough to warrant the long render times. Sometimes, just turning up the specular can be enough to suggest reflectivity.
Sometimes, Max’s built-in materials insist on using raytracing. You can actually disable raytracing (and other fancy nonsense) in the render properties, preventing the renderer from doing any raytracing at all.

Polygon count:
Keep your poly count low. Scenes usually don’t need hundreds of thousands of polygons. Too often we focus on the pretty 3D instead of concentrating on the overall effect or story. This is art, not a physics simulator.
Watch your subdivisions with MeshSmooth. Use just enough to get rid of most of the visible jagged edges. Take a few seconds to adjust the segments for primitives for minimal polygons.

Lighting:
To avoid harsh shadows with few lights, set the shadow density on the light lower.
To have lights cast light in only a small area, use Attenuation. Set the near and far attenuation to what you want so the light doesn’t try to brighten the whole scene.
Avoid using Omni lights to light the whole scene, unless you feel it’s justified. Spots and directionals have less area to illuminate, which helps when calculating shadow maps.
Some objects simply don’t need to be lit. You can go into an object’s property and turn off illumination, shadow casting, etc. You can also control this in a light’s parameters.

Antialiasing:
Sometimes, you don’t even need antialiasing. In mental ray, you can turn down the filter size, which will degrade mapping but speed up rendering. Use this if you’re doing something like camera motion blur.

SuperSampling:
You don’t need it in an AVA. Don’t do blurry reflections/refractions. Don’t use SuperSampling.

Hair:
You don’t need hair in an AVA. Cartoonish solid hair (like in Second Life :P) works great. People shouldn’t have to stare at individual hair strands to see your animation skills. Get rid of the hair.

Global Illumination:
Most of the time you can use a few strategic Omnis (with attenuation and no shadows!) to simulate GI. People won’t know the difference.

Trees/plants:
I know this year was thinking green, and people probably used the built-in trees that came with Max. Use them sparingly. Having a complicated tree with individual opacity mapped leaves (and raytraced shadows) is guaranteed to slow you down. For further-away trees, use two intersecting planes mapped with a tree. That’s it: four triangles. You could even do the same for the tree’s shadow.

Grass:
No hair. You could slap Max’s built-in grass onto some planes, but it looks very flat. You can opacity-map a plane with a grassy alpha map to give edges a fuzzier look.

Focus on what’s in the frame:
You only see what’s in the camera’s view, but other objects out of sight still drag your renderer down with things like shadow calculations.

Network rendering:
It can be useful sometimes. Sometimes it’s easier to just have each computer render a different scene file or a range of frames. If you’re in the odd case of having more computers than frames (probably never), you can distribute mental ray buckets or have each computer render “stripes” and assemble them (look in your documentation).

Particles:
The less particles the better. You probably don’t need 3D particles - try facing planes. I find that using large facing planes and mapping them with an opacity map works for many effects. It makes fantastic smoke at low poly-counts.

Hope this helps next year.

yeah one scene in 1094’s animation had 5.8 million polys killed 3 computers before we saw only my laptop could render it.

I’ll be honest, our little motto in our animation studio for team 103, is all about “cheating.” It doesn’t have to be right, it has to look good! In our 2006 animation we made the mistake of having each of those buildings be about 750,000 faces, and when you have about 15 huge skyscrapers like that, it just kills the computers! RAM was in great demand last year. This year, with the help of a dual xeon quadcore computer with 3 gigs of RAM, we didn’t have much trouble. We used all sorts of particle systems, lighting effects (daylight is really good in 3dsmax9), and we had better strategies for creating big scenes, such as the powerplant/city scene. As usual, we used mental ray to render due to the great quality and different effects you can utilize with it. Every year we run into issues, but the next year those issues are not a problem because we know how to solve them. The biggest issue this year was probably our unreliable server! It hosts about 1.5 terrabytes of data, but takes pleasure in shutting down for no reason. Everytime it happened, I had every team member at my “terminal” yelling at me to fix it because I’m the IT guy for the team. But besides that, we were very efficient this year. All of those tips posted are great tips and are all pretty much true. Good luck to teams next year, if anyone ever needs help, although I’ll be in college, I’m hoping to mentor team 103, but if not, I’m always available for help or questions. Just drop me an email and I’ll be more than happy to give you a hand. [email protected]