Inheritances on MODELDEF

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Ozymandias81
Posts: 2063
Joined: Thu Jul 04, 2013 8:01 am
Graphics Processor: nVidia with Vulkan support
Location: Mount Olympus, Mars
Contact:

Inheritances on MODELDEF

Post by Ozymandias81 »

While I think the title is clear enough, and that possibly it has been requested already, could be this possible so we can save hundred lines for each model to be included on a project?
How much hard this should be to include on QZ-GZDoom atm?
I also wonder if the inherit logic could save some "load time" for parse actors (not sure which exact term to use here, sorry, but guess you get what I mean).
Thanks in any case :3:
User avatar
Tormentor667
Posts: 13533
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: Inheritances on MODELDEF

Post by Tormentor667 »

Seconded
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Inheritances on MODELDEF

Post by RockstarRaccoon »

Yes. This or anything like this. Yes.
User avatar
R4L
Global Moderator
Posts: 404
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Inheritances on MODELDEF

Post by R4L »

I'd like this as well!
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Inheritances on MODELDEF

Post by RockstarRaccoon »

Same for GLDEFS as well: I have tons of code that's just applying the same brightmaps and such to a bunch of textures...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Inheritances on MODELDEF

Post by Graf Zahl »

How would you implement inheriting brightmaps? Textures have no relation to each other, save for patch composition,.
User avatar
Iniquitatis
Posts: 49
Joined: Sat Oct 24, 2009 1:23 am
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Inheritances on MODELDEF

Post by Iniquitatis »

Or maybe something more universal, like:

Code: Select all

Model PLSG
{
    Path "Models/Blah"
    Model 0 "Blah.md3"
    FrameIndex A 0 0
    ... etc.
}
?

Yeah, yeah, compatibility. :blergh:

We already have global/shared/whatever definitions inside the TEXTURES lump, but why not in the MODELDEF?
User avatar
Shiny Metagross
Posts: 175
Joined: Wed Apr 02, 2014 10:00 pm
Location: USA

Re: Inheritances on MODELDEF

Post by Shiny Metagross »

I know this is a rather old topic, but I personally need this feature quite badly. My current project is requiring modeldefs that take up more space than most mods themselves do because I am creating a set of enemies that are made of a combination of parts and thus have potentially hundreds of variants, plus each variant uses about 50 animations. On top of that because I am still working with Zandronum I get to multiply each model definition times 3. With inheritance, I could just define all the frames for one variant, and clone the 1000+ other ones with just a few lines or less, and probably shave off millions of lines of modeldef (this isn't some exaggeration, given that each variant has about 4000 lines of modeldef code, and I know there's atleast a thousand variations, that right there would amount to 4 million lines). I also wouldn't have to go back and fix everything variant or redo all of the modeldefs in case I mess up somewhere on the original modeldef either.

Some of the potential gains from implementing such feature would give other modders here even more incentives to use models, particularly anything that has variations.

I need this feature so much, that I'm considering trying to make such feature myself, although the only thing really setting me back is that I'm not too experienced with compiling code from repositories. Of course, if I can do this, then I can certainly backport such feature to Zandronum as well. From what I've scouted from the source code, I can mostly understand how the modeldefs are parsed, so it doesn't look all that hard to implement.

EDIT 2: Because there are multiple model definitions that can be made for an actor which can be in different files might be taking off a bit more than I can chew.
User avatar
CBM
Posts: 373
Joined: Wed Oct 09, 2019 3:39 am
Graphics Processor: nVidia with Vulkan support
Location: The Shores of Hell

Re: Inheritances on MODELDEF

Post by CBM »

Same here

And s_andrew_s ... i am excited About your project based on your description. I love 3D models.
User avatar
Cherno
Posts: 1311
Joined: Tue Dec 06, 2016 11:25 am

Re: Inheritances on MODELDEF

Post by Cherno »

I support this. I had a similar problem as S_Andrew_s where I had multiple models with hundreds of frames (each with 4 submodels) that where all the same save for the model file name. I went so far and wrote a small program that auto-generates the frame definitions for me but inheritance would be so much easier.
Post Reply

Return to “Feature Suggestions [GZDoom]”