Author Topic: When is it advisable to compile models?  (Read 384 times)

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
When is it advisable to compile models?
« on: February 02, 2014, 12:14:26 am »


               The Custom Content Guide advises "You do not need to compile your model as there is no discernable performance hit for ASCII models compared to binary ones. Moreover, the nwnmdlcomp program does not do a good job of compiling models that have custom animations or custom supermodels."

I've read, and understand, that this might not be true for hi-poly models, and that there are better compilers for certain purposes.

However, does it remain sound advice for mods to older models?

If not, can we quantify the pros and cons?

I'd ask that we don't talk about CM3 in this particular thread, as that's being covered elsewhere.

Apologies if this is an old chestnut.
               
               

               
            

Legacy_Lord Sullivan

  • Hero Member
  • *****
  • Posts: 671
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #1 on: February 02, 2014, 12:55:47 am »


               Quite frankly, I recommend compiling them. Sure if you only make 1-5 models that you store in your
override directory, you won't really see an performance hit per say, but it's more a mass related thing
and more on the content loading time aspect of performance since the game as to compile on the fly
when models that need to be loaded are ASCII (Not complied).

As for custom animation(s), I don't see how a compiler that only translate text code into binary
code would translate one animation differently from another and I personally know that a model
I made in the past (i.e. a tomb) has a custom open/close animation that I created and it compliled
just fine with the animation intact.

Perhaps the peeps who had made the custom animations and had issues from nwncomp did
something wrong somewhere? ... who knows.
               
               

               


                     Modifié par Lord Sullivan, 02 février 2014 - 12:56 .
                     
                  


            

Legacy_Pstemarie

  • Hero Member
  • *****
  • Posts: 4368
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #2 on: February 02, 2014, 02:54:32 am »


               I've never noticed a performance hit from ascii models in single-player or over LAN. However, you might take a performance hit playing over the internet. The bit about failing to compile custom animations is a fallacy.

I think the two camps developed because of the compiling issue created by the mispelling of the "Setfillumcolor" parameter on export from NWMax (NWMax changes the spelling to "Selfillumcolor"). Since the model worked fine in game as an ascii model, many people erroneously believed that nwnmdlcomp was broken or flawed. MDA is working on a fix for this issue in NWMax Plus.

I've also seen issues where a model compiles fine in nwnmdlcomp, but when used it crashes the toolset or game. Use the ascii version and it works fine. I've never been able to nail down a reason for this behavior - there must be an error in the model somewhere, but I can't find it.
               
               

               


                     Modifié par Pstemarie, 02 février 2014 - 02:57 .
                     
                  


            

Legacy_Master Jax

  • Hero Member
  • *****
  • Posts: 618
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #3 on: February 02, 2014, 06:06:14 am »


               In my experience, compiling models messes up shadows and some animations. I used Carottes for it, and went back to de-compiled soon after. I was worried the compiled models would be as messed when de-compiled again, but to my surprise, all issues were fixed by converting them.
               
               

               
            

Legacy_OldMansBeard

  • Full Member
  • ***
  • Posts: 245
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #4 on: February 02, 2014, 10:30:45 am »


               I'd say, only compile if you need to shorten load times. For example, I've had a case where an unusually large set of animation supermodels (around 100 Mbyte in total) benefitted from compilation; if uncompiled there was a perceptible delay (~1 second on my machine) in-game while they loaded, which went away when they were compiled.

Otherwise I'd say it's generally not worth the effort.

Animation models get a bit smaller when compiled, but mesh-heavy models get larger so it's a trade-off. But file sizes are less of concern now than they were ten years ago so that's much of a muchness.

Models that have supermodels have to be compiled carefully otherwise the nodes may not match and animations break. Basically, you have to compile the whole set of models and supermodels all at once, so the compiler can sort out the node numbering consistently. The procedure for that is different between nwnmdlcomp and the BW model compiler and it's not well documented in either case. I think this has deterred people from doing it.

If a model doesn't compile, or doesn't work when compiled, then technically there is something wrong with it but it might still work correctly in-game because the in-game loader is quite robust and can fix things on-the-fly in ways that the compilers can't. In such cases, and if the model is too much trouble to fix, then compiling is obviously counter-productive.

"Compile if you will or if you must, but not because you can."

OMB
               
               

               


                     Modifié par OldMansBeard, 02 février 2014 - 10:32 .
                     
                  


            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #5 on: February 02, 2014, 10:56:17 am »


               Thanks
               
               

               
            

Legacy_Zarathustra217

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #6 on: February 02, 2014, 11:22:45 am »


               I might be a bit of a perfectionist in that regard, but if a model acts differently when compiled, I usually try to figure out just why and correct it because it (at minimum) indicates some minor inconsistency or lack of adhering to standards within the model. The built-in compiler seems more flexible than the external compilers, but since we don't (always) know exactly how it overcome these issues, I prefer having more control of the process.

Additionally, the external compilers give you some feedback when compiling, all in all making them handy for error and quality control.

But beyond that, I can only mirror what OMB said.
               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #7 on: February 02, 2014, 12:59:19 pm »


               My experience relates only to placeables in this regard. I would personally say always compile them. Individually they have an imperceptible performance hit. It's when you get them en mass that you start to notice it. Now I use models that are the height of simplicity, but when I make my catalogue areas for the things I make, I can definitely see the difference in load times. In an extreme case there was a difference of around 10 seconds. The thing is as content creators we do not know how our work is going to be used. It could be that only a single model (fat chance with Map Mats) will be used. On the other hand it could be that the placeables could number in the 10s or even the 100s. So I always err on the side of caution in this matter and compile them. Converting tgas to dds is another matter as I have had distortions and visual glitches from that.

TR
               
               

               
            

Legacy_Zwerkules

  • Hero Member
  • *****
  • Posts: 1997
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #8 on: February 02, 2014, 02:19:49 pm »


               I've had nothing but trouble with compiling models and that isn't with new models which I never even tried compiling when I already had so many problems with Bioware models. Apart from some of the models not compiling at all, those which did compile had walkmeshes destroyed, emitters not working any more and causing toolset crashes.
Again, this is not with any new models, but with Bioware models from the mines and interior tileset.
There is no noticeable difference in performance with those models compiled or uncompiled, but some creatures take longer to load and I'll see if some other compiler works better so I can get those compiled, maybe placeables as well.
               
               

               
            

Legacy_Khuzadrepa

  • Sr. Member
  • ****
  • Posts: 347
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #9 on: February 02, 2014, 04:18:42 pm »


               I second OldMansBeard's comments. Supermodels with lots of animations are good candidates, but otherwise I wouldn't put too much into it.
               
               

               


                     Modifié par Khuzadrepa, 02 février 2014 - 04:18 .
                     
                  


            

Legacy_Lord Sullivan

  • Hero Member
  • *****
  • Posts: 671
  • Karma: +0/-0
When is it advisable to compile models?
« Reply #10 on: February 02, 2014, 08:23:57 pm »


               

Pstemarie wrote...

...

I think the two camps developed because of the compiling issue created by the mispelling of the "Setfillumcolor" parameter on export from NWMax (NWMax changes the spelling to "Selfillumcolor"). Since the model worked fine in game as an ascii model, many people erroneously believed that nwnmdlcomp was broken or flawed. MDA is working on a fix for this issue in NWMax Plus.

...


Now that would explain it as I don't use NWMax but rather MDLSuite(3rd release since 4th release was not complete). I do everything that need to be done and don't rely on "suppose to do it for you" utilities when they don't always do it right and then you're left having to hunt down the issue and left wondering what happened. Sure it
takes a bit more work to DIY, but I'm fully aware of the state of my model(s). Thus never had any compilation issues with nwncomp.
               
               

               


                     Modifié par Lord Sullivan, 02 février 2014 - 08:25 .