Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

3DMAX.8K.COM - Level Of Detail Tutorial











Level Of Detail Tutorial

There haven't been many(if any) tutorials on how to keep your viewports rendering smoothly so I thought I'd write one. This will be a long tutorial describing different teckniques on how to get maximum performance in the viewports while not affecting rendering. This tutorial is meant for advanced users who know there way around max. Let's get started!

First Technique: MAX's "Level Of Detail" Utility

3D Studio Max comes with a built in tutorial for changing the detail of objects when rendered based on their size in the rendered image. It doesn't, however effect the detail of objects in the viewports.

One good way to use it is to have two levels of detail for each object. Then set the simple one as the one in the viewports, and make the detailed one the constant one for rendering. This Let's you animate with a low poly object but automaticly renders high poly.

Pros:
Easy to setup
All objects can be used
Can also improve rendering speed

Cons:
Doesn't affect viewports
A whole new model required for each level of detail for each object
Requires complex planning when objects have "animation" modifiers(like physique or skin)
Hard too animate parameters of objects or their modifiers(Like height, Bend angle, etc)

To download a sample scene demonstrating the "Level Of Detail" utility click Here(10k)

Let's do a small exercise to see how the "Level Of Detail" utility works.

Step 1
Fire up max. Create a sphere in the top viewport with a radius of about 50. Make sure it has 32 segments. Call it "Sphere High"

Step 2
Clone the sphere twice as copies. Name the copies "Sphere Med" and "Sphere Low". Now click "Select by name" or press "h" on the keyboard. Select "Sphere Med". Change it's segments too 16. Now select "Sphere Low" and change it's segments too 8.

Step 3
It's time too apply the level of detail. Click the "Utilites" tab. Click "more", and choose "Level Of Detail". In order too apply the utility you must first group all the different levels of detail for each object. So, select all the spheres and group them. Call The group "Sphere". Now back too the "Level Of Detail" Utility. Make sure the "Sphere" group is selected. Click "Create New Set". You should see that only "Sphere Low" is shown, and that All three spheres are in the "Level Of Detail" list. To change wich object we see in the viewport double click it. Let's make "Sphere Med" what wee see in the viewport. Double click "Sphere Med" in the list.

Step 4
The Basic setup if finished. Let's make a small animation to show how 3D Studio MAX will render the sphere based on the size of the sphere in the rendered image. Make a small animation where the sphere starts at frame 0 very far away and almost fills the viewport at frame 100. Now Render it. If you have a good eye you'll see that as the sphere grows larger it changes to more detailed.

That's pretty much how the "Level Of Detail" Utility works. If you have questions then check your manual or post on the Web Board. Some other things to try: Fool around with the "Thresholds" panel in the utility(This is where you say wich object renders at wich size), Try to make a more complex scene to really understand this utility.

Summary: The "Level Of Detail" utility is a simple yet powerful way to speed up rendering and keep low poly objects in the viewport. It does however lack the ability to change the detail of objects in the viewports.

Second Technique: Using "Replace"

A very powerful way to keep rendering in the viewports snappy is to use "Replace" from the "File" menu. "Replace" Let's you replace all the objects in your scene with other objects from another scene that have the same name. It keeps all the objects motion tracks though. This let's you build 2 or 3 or even 4 scenes, each with the same objects. Scene 1 will be very high detailed(ie render quality), scene 2 can be a little less detailed(ie for test rendering), and scene 3 with only what you need to animate. Then you can keep switching back between the scenes but the motion tracks stay the same.

Note: I think there is a bug with the pivot point. When you replace an object it's pivot goes to it's "reseted" position instead of the modified position. To fix this don't modify the pivot point of any objects(You can create dummys where the pivot should be and link the objects to them), or collapse the stack after you modify the pivot point of an object(this will change the "reseted" position of the pivot).

Pros:
Easy to setup
All objects can be used
You can switch very quickly from one detail level to another
Allows material level of detail automaticly(ie low detail with reflection map, high detail with raytrace)

Cons:
A whole new model required for each level of detail for each object
Requires complex planning when objects have "animation" modifiers(like physique or skin)
Very difficult to animate parameters of objects or their modifiers(like height, bend angle, etc)

Let's do a small exercise to see how the "Level Of Detail" utility works. First download this zip containing two scenes Here. We will use these scenes for the tutorial. Unzip both scenes into a directory. Step 1
Load "scene1.max" in MAX. Scene 1 is the low detail scene that we will use for animation. You should see a ball and a bent cylinder. Now, make a very simple animation with these two objects(ie the ball bouncing on the grid and the cylinder spinning around). Step 2
Now when we want to render go to "File" -> "Replace". Choose the file "scene2.max". It will now ask you wich objects you want to replace. Select both objects and press "Ok". Now it will ask if you want to replace the materials also. In our scene it doesn't matter, so choose "No". If you have a material for each level of detail scene then you will want to choose "Yes". Scene 2 contains the objects but at higher detail, and without any animation. You should now see that our low-detail objects have been replaced with our high-detail objects. Now you can render.

That's pretty much how "Replace" works. If you have questions then check your manual or post on the Web Board. Some other things to try: Try making a more complex scene, learn how to replace materials along with objects. This can be very powerful.
Summary: "Replace" is extremely useful and I use it a lot. It alows me to animate in low detail, where things move smoothly and I can very quickly change to high detail too see how things are coming along.

Summary

There are many other ways to help rendering speed in the viewports like splitting and animation up into lots of scenes and then merging. Or by using Xrefs.

I hope this tutorial has been helpful. It is still not finished. Soon I'll add my favorite setup that uses maxscript.