Insurgency 2 - LOD switching trouble

Hello!

I’m a bit at a loss here, so i hope someone on this forum can help me out.

I have modeled a static prop, it has 256 faces, i have made several LOD versions of it to get it down to 48.
The problem is this:

When i have finished compiling and take a look at the model in the HLModelViewer and
either flip through the LOD levels manually, or set it to auto-LOD, the LODs change according to how
i configured them in my QC, but the polygons stay the exact same all the time.

http://anony.ws/i/2014/09/27/mdl01d0873.md.jpg

http://anony.ws/i/2014/09/27/mdl02b0266.md.jpg

I have tested this in-game, just to make sure there’s nothing wrong with the HLMV.

I have re-written my QC from scratch at least a dozen times by now,
always getting the same results.

Here’s what it looks like at the moment:

Honestly, i can’t figure out what i’m doing wrong,
but i hope it is something obvious.

I’m using GUIStudioMDL 2.2 in combination with the Insurgency2 gameinfo.txt.

If anyone cares to take a look at my files, i have uploaded them to this place:

http://www.mediafire.com/download/2b966rkndb9946n/smd.7z

Regards,
John

Try changing $body to $model, and putting the $lod commands directly after it. Finally, the first argument has to be the exact reference of the $model, (the command says ‘replace a with b’) so make sure they match. So your qc should read:


$modelname test\pillar.mdl

$staticprop
$cdmaterials models	est

$surfaceprop concrete

$model studio "pillar_ref.smd"

$lod 30
{
replacemodel "pillar_ref.smd" "C:\smd\pillar_170.smd"
}

$lod 50
{
replacemodel "pillar_ref.smd" "C:\smd\pillar_128.smd"
}

$sequence Idle "C:\smd\pillar_ref.smd"

$collisionmodel "C:\smd\pillar_col.smd"



Thank you very much, Lt_C,
it works now as expected!

I think the problem was, as you mentioned, that i had used a mishmash of absolute and relative model reference syntax
(but since my SMDs are in the same folder as my QC, there’s really no need for making absolute path reference)
and that the position of the $lod command in relation to the $body/$model command was out of place.
Tried it with both, the $model and $body command, but since $body is supposed to be less expansive (correct?) i will stick to $body for now.

This is the content of the working QC file:



$modelname test\pillar.mdl

$staticprop
$cdmaterials models	est

$surfaceprop concrete

$body studio "pillar_ref.smd"

$lod 30
{
   replacemodel "pillar_ref.smd" "pillar_170.smd"
}

$lod 50
{
   replacemodel "pillar_ref.smd" "pillar_128.smd"
}



$sequence Idle "pillar_ref.smd"

$collisionmodel "pillar_col.smd"


Best Regards,
John