Page 1 of 1

Precache for models and no-limit for models per frame?

Posted: Sat Jan 23, 2021 12:46 pm
by DeXiaZ
Hey there.

While doing the Painkiller Mutilator project we've got a couple questions related to GZDoom sourceport features:
1) An oldie-goldie Zandronum do have precache for 3d models which is very helpful. But there is no precache in GZDoom (there is a precache for textures but it's an another topic). Will it be added in future builds, somehow?
2) The limit for models per frame. Damn, at present time you can add only 4 models per frame. I'm almost sure this is not a often suggestion, but could you somehow turn off this limitation or make it less painful?

Please.

Thanks in advance.

Re: Precache for models and no-limit for models per frame?

Posted: Sat Jan 23, 2021 5:45 pm
by Cherno
I tried to implement unlimited models per frame by editing the source code, but my knowledge of C++ is limited so I failed eventually. I'm al for it and this has also been discussed before. From what I understand, it won't happen because MODELDEF is regarded as archaic and suboptimal and it'd be better to write a completely new model support system from scratch :3:

Re: Precache for models and no-limit for models per frame?

Posted: Sat Jan 23, 2021 6:07 pm
by Marisa the Magician
Model precaching can already be done by adding the actors that use those models to the PrecacheClasses array in mapinfo/gameinfo. Still, it'll only work if you additionally also enable "Precache GL Textures".

Re: Precache for models and no-limit for models per frame?

Posted: Sun Jan 24, 2021 12:29 am
by DeXiaZ
Marisa Kirisame wrote:Model precaching can already be done by adding the actors that use those models to the PrecacheClasses array in mapinfo/gameinfo. Still, it'll only work if you additionally also enable "Precache GL Textures".
Uh, thanks for pointing this, but we've got more problems.

The mod is already requires to enable "Precache GL Textures", so there is no problem with it. But the code seems not working with GZDoom. We don't get it what's exactly wrong:



We've also tried to add this to AddDefaultMap instead, but also got nothing:


Any suggestions?

Re: Precache for models and no-limit for models per frame?

Posted: Sun Jan 24, 2021 1:34 am
by SanyaWaffles
Try using gamedefaults.

Re: Precache for models and no-limit for models per frame?

Posted: Sun Jan 24, 2021 1:44 am
by Graf Zahl
I think the problem is that this does not precache HUD models.

Re: Precache for models and no-limit for models per frame?

Posted: Sun Jan 24, 2021 2:27 am
by DeXiaZ
Graf Zahl wrote:I think the problem is that this does not precache HUD models.
Now it's clear. But why? Zandronum does not have problems with HUD models.

Re: Precache for models and no-limit for models per frame?

Posted: Sun Jan 24, 2021 4:18 am
by Marisa the Magician
That's really odd, on my end, HUD models are precached just fine with my mods.

Re: Precache for models and no-limit for models per frame?

Posted: Tue Jan 26, 2021 7:46 am
by Logan MTM
Just make a "fakeload" or "trueload" everytime maps load. Just spawn a new actor that call all models that you need, frame after frame. You can also make some cool laodscreens to hide this process with hudmessages. It works.

Re: Precache for models and no-limit for models per frame?

Posted: Thu Oct 21, 2021 9:59 am
by Nash
Unlimited model slots are already possible in GZDoom since a few versions ago.

As for the precaching issue - sounds like it's not a request, but a modding problem, or possibly a bug (if it is true that precaching doesn't work only for weapon models, as Graf theorized). However, Marisa says otherwise. In any case, a separate report should be opened if it can be proven that it's a bug.