An explanation of the reasoning:
Say that you have a sphere with a bunch of sides on it. As you get farther away from the sphere, you can't tell the difference between a sphere with 32 sides and one with 16. As you get even farther away you can't tell the difference between a sphere with 16 sides and one with 8. In these cases, why bother rendering the extra sides?
Basic Concept:
As you get farther away from a model, it gets less detailed. It does this by actually switching what interior is being shown. So you make a bunch of rmf files and then designate at what distance the specific rmf file will be shown. When you actually compile the rmf files, it combines all of the different versions of the building (the different detail levels) in to one dif file. You can have up to 10 levels of detail for each interior.
Once you understand the concept behind it, you just need to know the implementation:
Step 1: Create an rmf file for every level of detail level
Using the sphere example above, you would create one .rmf file where the sphere has 32 sides, one .rmf file where it has 16 sides and one with 8. That?s 3 levels of Detail.
What I usually do is make my most detailed version first, then copy that file and start modifying things. I might, for example, completely delete parts of the building that can't be seen because they are underground, or hidden away, or something. In the less detailed versions you can be more frivolous with detail brushes, so Ill add a bunch of those too. Maybe decrease the number of sides on a cylinder. The goal is to optimize the number of faces.
Be careful, though. You don't want to let the player see when the detail level changes. This means: be meticulous about disappearing brushes, lighting changes and texture changes.
Once I have my second level of detail done, Ill make a copy of it and modify that copy. The make a copy of the copy and modify that. Keep doing this until you feel like you have enough LODs.
Step 2: File Naming Convention
Part of the way the computer knows which LOD is which is through a naming convention for the .rmf files. So, open the directory the .rmf files are in with explorer and start renaming.
You are going to add an underscore and a number on to all of your file names, so it looks something like this: "???????_0.rmf" or "???????_1.rmf", where ?????? is the name of the interior. Starting with the most detailed version, you will put an _0 on and start incrementing the number until you reach your most detailed version. The maximum number you can put there is 9.
At this point, its better to teach by example, so Ill go back to the sphere example again. After renaming the files, this is what they would look like:
Sphere_0.rmf
Sphere_1.rmf
Sphere_2.rmf
Where Sphere_0.rmf is the most detailed version with 32 sides, Sphere_1.rmf has 16 sides, and Sphere_2.rmf is the least detailed version with 8 sides.
Step 3: Shapes Detail Index
As if the file naming convention wasn't enough, the computer has to be told one more time which LOD is which.
Open up each rmf file and go to map->map properties, then select Shapes Detail Index from the list. The number in the field should be the same as the number you put next to the file name. Again, 0 is maximum detail and increment that number until you run out of Detail Levels.
So,
Sphere_0.rmf would have a "Shapes Detail Index" of 0,
Sphere_1.rmf would have a "Shapes Detail Index" of 1, and
Sphere_2.rmf would have a "Shapes Detail Index" of 2.
Step 4: Minimum Pixels For Detail
So now you have these detail levels, but the computer isn't going to know when to switch between them. That is where the "minimum pixels for detail" property comes in.
Open up each of your detail levels in World Craft and go to map->map properties and select "Minimum Pixels For Detail" from the list, a field with a number in it should appear to the right. This number tells the computer when to switch to the next LOD. It is measured in how many pixels tall the building appears to the camera that is looking at it. In other words, the bigger the building is from your view, the taller it is in pixels.
Your most detailed version of the building will have the highest "Minimum Pixels For Detail." As they get less detailed, you will need to put in a lower number. The least detailed version of your building should have this number set to 1.
Going back to the sphere example, say that I set the "Minimum Pixels For Detail" for my 32 sided sphere to 200,
I set it to 100 for the 16 sided sphere,
and 1 for the 8 sided sphere.
This means that when the sphere is larger than 100 pixels tall, it will show the 32 sided version. When it is between 50 and 100 pixels tall, it will show the 16 sided version. When it is less than 50 pixels tall, it will show the 8 sided version.
"Minimum Pixels For Detail" is the lower cut off, in pixel height, for displaying a certain level of detail.
Step 5: Exporting and compiling
You need to export your different .rmf files to .map files. This is simple. Open each of them up in World craft and go to file->Export to .map
You can then run your building in World Craft as you normally would, and it will detect all your LODs and combine them in to one .dif file.
Attached is an example of these steps implemented. In the zip are 2 rmf files and one compiled dif. The rmf files use lava.wad.Statistics: Posted by Nycto — Sun Feb 23, 2003 5:09 pm
]]>