Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Micah Cox, posted on February 04, 2001

Image Description, by Micah Cox

This shot shows my Dynamic Level Of Detail demo. The image marked number 1 is the model at it's full detail level, and as you can see the polycount decreases as you progress to the higher numbers. The method I used to implement it was in the November '98 issue of Game Developer Magazine but the author of the article has posted it on his website <> as well as some demos. The article describes a very simple method of calculating the edge collapses and then reordering the vertex list based on which costs the least amount to collapse. It only took me about three days to write the demo.

Micah Cox

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

February 04, 2001, 04:34 AM

Nice shot - the LoD works well at preserving the human shape, and there is no large anomalies.

One problem you seem to have though is quick loss of prominent features. You are losing extremely angled polygons (the spikes) very quickly. I would normally aim for the knees, elbows, neck and facial polygons to collapse before the spikes, as they are prominent features and likely to contribute to the outline of the image.

Otherwise, well refined and good avoidance of texture problems etc.


February 04, 2001, 07:12 AM

Impressive !

What kind of model is this ? Skeletal animation ?

How does the algorithm perform on animated models (skeletal/keyframe) ? Do artifacts appear while animating ?


Brebion flavien

February 04, 2001, 07:49 AM

Very nice !

In your evaluation function, do you handle texture mapping coordinates ? If so, how..?
And how many polygons are there in each image ?

Micah Cox

February 04, 2001, 01:24 PM

Thank you very much for such a positive comment. The model is actually a half-life model from, it has a complete skeletal animation system. The only artifact that the animation produces is when the character gets to the really low levels of detail like in image number 5, his feet and hands tend to disconnect from his body.

Saad Faisal

February 04, 2001, 01:37 PM

As i am unaware of the process (I am in the process to read the article) i have certain questions.

1. Are there any new polygons that gets created while reducing the other???
2. What about calculating Texture Coord for these new polys.

Micah Cox

February 04, 2001, 01:42 PM

Thank You. No I totally ignore the texture coordinates. In image 1 there are 639 triangles, and the vertex count is decreased by 25% in each addition image. The vertex count is never aloud to go below 10% of the total vertex count.

Micah Cox

February 04, 2001, 01:44 PM

There are no new triangles created, you just remove the vertexes that will affect the overall look of the model first.

Micah Cox

February 04, 2001, 01:46 PM

Thank you very much for your comments.

Michael Kurth

February 04, 2001, 03:36 PM

I think that this algorithm would work well for distance based LOD. As the model gets further away those "prominent" spikes would likely contribute zero pixels to the scene, while the overall knee area would still be relatively significant.


February 04, 2001, 04:16 PM

Zero pixels for nearly horizontal triangles that look fairly long? Not likely :)


February 05, 2001, 12:40 AM

One thing that I don't understand is how you prevent seams from forming when you change parts of the texture that you use.

For example, if you were to have a model that used 2 sections of a texture. One for the front, and one for the back. Wouldn't it be impossible to remove the verts that are connected to both sections of the texture?


February 05, 2001, 03:11 AM

"For example, if you were to have a model that used 2 sections of a texture. One for the front, and one for the back. Wouldn't it be impossible to remove the verts that are connected to both sections of the texture?"

Well, it's not impossible, it just results in a lower quality image. For this reason, those modifications are penalized so that collapses which have a larger effect on the geometry of the model (but do not cause problems with the texture mapping) are made first.



February 05, 2001, 05:49 AM

Nice IOTD.
I've been doing some work recently on LOD mesh generation for a 3dsmax exporter for a game I've been working on... seems static "Levels" of LOD are more plausible than more complicated geometry (and art, for that matter) generation systems such as patch rendering (wasn't that supposed to be the Next Big Thing?!). Off topic, I think it's peculiar how 3D developers go through phases of the "next cool thing" code trends.. I swear it's almost a right of passage to being a complete 3D coder, everyone at some time or another seems to turn their hand to "obligatory" milestones in their coding career - starting with particle systems and raytracers, the infamous terrain engine (no offence to people who take the time to implement one, but why do they always seems to come straight from someone elses graphics paper on the subject?), the Quake2/halflife level renderer and finally on to stuff that really needs some heavy math like realtime CSG and rigid body dynamics. Excuse my meandering.

Anyhow, as for the questions regarding texture/material/shading preservation using this vertex collapse method - typically each vertex contains a "cost" precached value, indicating the visual impact removing this vertex from the mesh would have (edge length is often a good weight) and allowing the reduction code to leave those vertices in existance until last. In meshes that contain areas where two verticies occupy the same [x,y,z], but yet have differing normals, colour, U/V's or or material- it may be advisable not to remove these vertexes AT ALL to preserve the visual integrity of the model, as it generally avoids removing verts that define the primary edges. Just my 2c.

Anyhow - nice IOTD, I'll crawl back in my box now :)

Phil Carlisle

February 05, 2001, 09:42 AM

The reason people do terrain renderers from graphics papers is that they are trying to implement something that the paper suggests MIGHT work.

I dont think thats a bad thing IMHO, because you have to understand the problems better to understand the solution.

With the bsp level renderer, its probably just a matter of having something nice to display (it was for me).

As for me, I am steering clear of rigid body dynamics and all that math heavy stuff :)) I am a game programmer, not a mathematician jim!


This thread contains 14 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.