Game Development Community

LOD in Blender

by Joseph Jonathan · in Artist Corner · 04/06/2008 (10:44 am) · 5 replies

I need help. I want to use the different 3rd/1st person views of weapons tutorial but I need to have weapons with two different LODs. In blender how do I do this?



~Joseph-Jonathan Salzano

#1
04/06/2008 (11:25 am)
Have you exported models from Blender before? I'm going to assume you have, and it'll make this much easier.

Under your 'shape' empty, you should have a 'collision' empty and a 'detailXX' empty. This detail empty is part of the LoD system. the two numbers (My usual default is 32) give the detail level - the smaller they are, the less detailed a model you should parent to it.
Basically, you need to make several detailXX objects, where XX increases for each empty. Then, add your LoD model as a child of the empty that it corresponds to. Here's an example hierarchy:

-Shape (empty)
----Collision (empty)
--------Col0 (collision mesh object)
----Detail32 (empty)
--------Cube1 (mesh)
----Detail50 (empty)
--------Icoshpere1 (mesh)
----Detail100 (empty)
--------UVSphere1 (mesh)

This model will be a cube when you're far away, but as you get closer to it, it turns into an icoshpere, then a UVsphere.
For use with that resource, your most detailed mesh should have arms - so in this case, it would be the UVSphere1 object that has hands attached, because it's in the 'highest' detail level.

Hope that was helpful...
#2
04/06/2008 (12:11 pm)
So if I make 2 "models" one with arms and have its parent as Detail32 and one without arms as Detail9 The Detail9 is a LOD 1?
#3
04/06/2008 (1:15 pm)
Nope, I think it's the other way around. Detail 1 is the most detailed model, the one that will be seen when the camera is close.

[The following is partly guesswork. I don't know the specifics that well, but I know that the effects are the same.]

The numbers after the detail node signify the on-screen size of te object. So say you have Detail32 and Detail9. You're several hundred metres away from your in-gae object. It takes up just a few pixels on-screen. If the width of the object on-screen is less than 32 pixels, your Detail9 object will be used. When it hits 32 pixels wide, its mesh gets swapped for the Detail32 model. So as you get closer, and the model gets bigger, you're using the mesh from the detail level with a higher number.

That's a bit confusing when the 'highest' detail level is 1 - this means the most detailed. So in your case, I think that Detail32 would be 1, and Detail9 would be 2.

EDIT
Here's an extract from an export log I have:
Quote:> Detail Levels
Detail-1 (size : 100)
Detail-2 (size : 50)
Detail-3 (size : 32)
These were exported from a file with empties detail100, detail50 and detail32. So you can see, as the number after 'detail' gets higher, the detail level actually gets lower :P

My high-res mesh was parented to detail100, and a really low-res mesh to detail32.
#4
05/01/2008 (6:55 pm)
Does LOD require 3 levels of detail? Can it be less? Can it be more?
#5
05/01/2008 (7:14 pm)
As many as you want - I'm currently using 5 LODs for my human models. Goes from high detailed up close to practically a stick figure at longest distance.