Xonotic Forums
Can anyone help me understand player model lod? - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Configuration Tips (https://forums.xonotic.org/forumdisplay.php?fid=19)
+--- Thread: Can anyone help me understand player model lod? (/showthread.php?tid=2942)



Can anyone help me understand player model lod? - W4RP1G - 04-20-2012

I see that the slider goes all the way to "4". Some people have suggested setting it even higher. Yet, the game on the "low" setting sets player lod to "2". And I noticed that the player models in "xonotic-rsync-data.pk3/models/player" only have up to lod2, which leads me to believe that anything over 2 doesn't make a difference.

Am I right to believe this? If so, would setting it higher than 2 have a negative impact on performance?

Also, I see the largest fps drops when players are on screen. Is there a model, perhaps from nexuiz, that I could easily put in the game that uses far less geometry(preferably with the glowing HDR textures already on it)?


RE: Can anyone help me understand player model lod? - nifrek - 04-20-2012

Indeed playermodels only have 2 LODs, setting it higher won't make a difference, I believe it'll just use lod2. IIRC MegaErebus is more or less around 500 polys at that level, but I don't know about Nexuiz models.

I have a 325 poly version of MegaErebus that I made from scratch but it needs to be rigged and I'm not sure it would help much. If it's worth it, I might finish it and merge-request it to replace existing LOD2.


RE: Can anyone help me understand player model lod? - W4RP1G - 04-20-2012

(04-20-2012, 08:06 PM)nifrek Wrote: Indeed playermodels only have 2 LODs, setting it higher won't make a difference, I believe it'll just use lod2. IIRC MegaErebus is more or less around 500 polys at that level, but I don't know about Nexuiz models.

I have a 325 poly version of MegaErebus that I made from scratch but it needs to be rigged and I'm not sure it would help much. If it's worth it, I might finish it and merge-request it to replace existing LOD2.
Ok, thanks for the reply.

Also, wouldn't it make more sense to use your megaerebus as LOD3? I'm assuming the game will use a LOD3 model if it is available.


RE: Can anyone help me understand player model lod? - Ronan - 04-21-2012

cl_playerdetailreduction is the relevant cvar. Using a negative value (-2) should force to use the low detailed model at any distance. With a combination of forcemodel, you should get the less polygons possible.

But the bottleneck also include the animation, it won't be faster until the skeletal animation system is incorporated into the GPU, a long awaited feature...


RE: Can anyone help me understand player model lod? - W4RP1G - 04-21-2012

Wouldn't a negative value actually use a higher quality model than the normal settings? If a higher number means lower quality, then a lower number should mean higher quality.

Also, was there any talk of moving the skeletal animation system to the GPU?


RE: Can anyone help me understand player model lod? - Mr. Bougo - 04-22-2012

There are no such higher quality models, and you can't guess the effect without reading the source or the cvar's documentation Tongue

Here's the relevant code (line 48 in csqcmodel_hooks.qc).
Code:
// apply LOD
        if(autocvar_cl_playerdetailreduction <= 0)
        {
                if(autocvar_cl_playerdetailreduction <= -2)
                        self.modelindex = self.lodmodelindex2;
                else if(autocvar_cl_playerdetailreduction <= -1)
                        self.modelindex = self.lodmodelindex1;
                else
                        self.modelindex = self.lodmodelindex0;
        }
        else
        {
                float distance = vlen(self.origin - view_origin);
                float f = (distance * current_viewzoom + 100.0) * autocvar_cl_playerdetailreduction;
                f *= 1.0 / bound(0.01, view_quality, 1);
                if(f > autocvar_cl_loddistance2)
                        self.modelindex = self.lodmodelindex2;
                else if(f > autocvar_cl_loddistance1)
                        self.modelindex = self.lodmodelindex1;
                else
                        self.modelindex = self.lodmodelindex0;
        }

If the cvar is n where n is 0, -1 or -2, the lod_-n model is used at any distance


RE: Can anyone help me understand player model lod? - W4RP1G - 04-22-2012

I see. I thought it might be like the textures that go into the negative when you go above "normal"


RE: Can anyone help me understand player model lod? - divVerent - 04-23-2012

No. This one has special debug modes -1, -2 to force LOD1 and LOD2. Never use them.

The positive values set a distance multiplier - higher number makes LOD0 less likely shown, basically.