minilogoguy18 Posted December 4, 2016 Posted December 4, 2016 Just how many can we have on a GLM model? I was adding another to my AT-ST just now and using the F1-F3 keys to toggle between them in Modview to make sure they load properly only to find that I could go all the way up to 8 using F1-F8. Can we actually have that many LOD's? Maybe someone familiar with game code can give a concrete answer? @@eezstreet @@Xycaleth @@ensiform
eezstreet Posted December 4, 2016 Posted December 4, 2016 There's 3, as defined by MD3_MAX_LODS (which is a misnomer - it controls both the maximum LODs for MD3s and GLMs). However this is a purely arbitrary limit, and can be increased without breaking compatibility (in OpenJK?), at least for GLM models. MD3 models, it's a different story entirely as they're separate files and get loaded differently. The GHOUL2 format allows for potentially near-infinite LODs because of how it's set up. But it'll need a minor code change to get the engine to support that many LODs. And it'll probably work just fine, with proper tuning of the cvars. minilogoguy18 likes this
minilogoguy18 Posted December 4, 2016 Author Posted December 4, 2016 This probably should be looked at as something to implement into OpenJK, maybe at least double the LOD count, that way we can load higher detail models. I've noticed that making more LOD's makes a higher polygon model work much better since collision, correct me if I'm wrong, is based on the lowest detailed LOD. While I had a 6.5k model the game would crash when shooting it or sabering it, after giving it 3 LOD's this no longer happened. It would also help greatly in MP as the distance/LOD equation can be further taken advantage of in open maps like t2_trip which is a popular makermod/lugormod map.
Tempust85 Posted December 5, 2016 Posted December 5, 2016 And also the lowest LOD is used for stencil shadows which makes it very important for every model to have LODs. Side note: If only someone could fix stencil shadows self-shadowing, then they'd look nice.
Archangel35757 Posted December 5, 2016 Posted December 5, 2016 @@eezstreet, @@DT85 -- I thought 3 LODs (LOD0, LOD1, and LOD2) was the absolute maximum for the MD3 format; but Ghoul2 could have more. I think we should keep MD3 as 3 LODs. Maybe increase GLM to 6 (twice MD3 limit). Beyond that I think it's going to create too much work on a modeller. This would require a new define (GLM_MAX_LODS) for Ghoul2 models, yes? Also there would need to be some new engine code changes for handling distance-based switching for an increased number of GLM LOD levels, yes? We have a hard enough time getting folks to make any LODs, is there truly a need to go beyond 3 levels?
Tempust85 Posted December 5, 2016 Posted December 5, 2016 Just because there's support for more LODs, doesn't mean you'd have to use them all. I mean, the game won't wig out if there's like 6 LODs present for a GLM but only 2 for an MD3. So while there should be separate defines for clean sake, keeping it shared won't harm anything.
minilogoguy18 Posted December 6, 2016 Author Posted December 6, 2016 Even if not for viewing distance having more levels would allow for tangible performance gains by simply having a very low resolution, like early PSX detail model even if it were to compute damage collision and shadows.
Archangel35757 Posted December 6, 2016 Posted December 6, 2016 Just because there's support for more LODs, doesn't mean you'd have to use them all. I mean, the game won't wig out if there's like 6 LODs present for a GLM but only 2 for an MD3. So while there should be separate defines for clean sake, keeping it shared won't harm anything.The current MD3 exporters currently define and use the MAX_MD3_LODS to know how many iterations to loop to look for LODs. So I would need to modify all the exporters.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now