LODs for mapmodels possible?

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

Post Reply
No1_sonuk
Posts: 9
Joined: Fri Mar 05, 2004 1:49 am
Location: Essex, England, UK, Earth, Sol

LODs for mapmodels possible?

Post by No1_sonuk »

Is there a way I can make a mapmodel with 3 LODs?

I need to make an invasion beach obstacle called a "hedgehog" or "dragon's teeth" that could do with at least 2 LODs, preferably 3, because we're going to be using a lot of them in a large area.

Rough estimates put the poly counts at 260 for the "in your face" model, down to 17 (or less) at a distance.

I know ET already has a hedgehog model, but our mapper doesn't like it.
User avatar
WeblionX
Posts: 762
Joined: Sun Sep 08, 2002 1:03 pm
Contact:

Post by WeblionX »

I really don't see why one would need a 260 polygon model for dragon teeth, but I believe the MDC format supplies LOD. If not, you might want to look into misc_gamemodels, which I believe may support that.
Got any old idtech3 tutorials you made or saved? Send them my way.
No1_sonuk
Posts: 9
Joined: Fri Mar 05, 2004 1:49 am
Location: Essex, England, UK, Earth, Sol

Post by No1_sonuk »

Well, it's the least I can use to make it look right, up-close.

Could you, or someone else, elaborate on how to use MDC or misc_gamemodels in order to get LODs?
User avatar
WeblionX
Posts: 762
Joined: Sun Sep 08, 2002 1:03 pm
Contact:

Post by WeblionX »

MDC was a model specification for compressed models. You would have to look around the internet for information about it. If you have access to it, you might want to look at the ones that come with RTCW.
Got any old idtech3 tutorials you made or saved? Send them my way.
No1_sonuk
Posts: 9
Joined: Fri Mar 05, 2004 1:49 am
Location: Essex, England, UK, Earth, Sol

Post by No1_sonuk »

As no one seems to know the answer, I'll share how to do it now that I've found out:

How to use Level of Detal (LOD) models in ET

Thanks to Digibob of splashdamage for the heads-up on this.

LOD models are lower-poly models that replace high-poly ones as you move away from them. The idea is to cut down the number of drawn polygons when you have a lot of models in view, and/or you're too far away to see details.

This is the naming format for LoD models in Q3 engine games:
modelname.md3 for the high-poly model
modelname_1.md3 for the first lod level
modelname_2.md3 for the second

To make the LOD system work in ET is very simple.
1) Create your 3 models, named using the above system, all in the same directory.
2) Place a misc_gamemodel in your map using modelname.md3
3) Compile the map
4) Pak the files, including the modelname_1.md3 and modelname_2.md3 files and distribute

The engine detects the presence of LOD models and uses them automatically.

So, for our beach hedgehog model, the model files are (poly count in parentheses)
pop_hedgehog.md3 (262) High detail - This is the model you'll see when you're hiding behind it, trying to avoid the MG fire.
pop_hedgehog_1.md3 (118) Medium detail - This is the model you'll see when you look at hedgehogs a little way away that you hope you can reach while the MGs are reloading.
pop_hedgehog_2.md3 (24) Low detail - This is the one you'll see from long distance, while you're raining MG fire down on the Allies.

Note that it has to be a misc_gamemodel, NOT a misc_model. Models placed as misc_model entities are compiled into the BSP and therefore can't change to a different model as you move away.
Last edited by No1_sonuk on Tue Mar 09, 2004 11:42 am, edited 1 time in total.
duke'ku
Posts: 1053
Joined: Sun Nov 03, 2002 1:42 pm
Location: portland, oregon
Contact:

Post by duke'ku »

You should also take note that misc_gamemodels aren't lightmapped.
No1_sonuk
Posts: 9
Joined: Fri Mar 05, 2004 1:49 am
Location: Essex, England, UK, Earth, Sol

Post by No1_sonuk »

duke'ku wrote:You should also take note that misc_gamemodels aren't lightmapped.
misc_models don't do LOD - Make your choice - I have.
duke'ku
Posts: 1053
Joined: Sun Nov 03, 2002 1:42 pm
Location: portland, oregon
Contact:

Post by duke'ku »

I'm just saying that you should take that into consideration when models might be in need of different LODs or not - sometimes you can sacrifice a few extra polys for nice lighting.
Post Reply