Allow MODELDEFS to parse TEXTURES lump

Moderator: GZDoom Developers

User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Allow MODELDEFS to parse TEXTURES lump

Post by Major Cooke »

Since blending translations don't work on models (turns them completely invisible -- currently under the impression of 'this is an unsupported feature'. If I'm wrong, please do tell!) I thought I'd try to use a TEXTURES re-blended graphic to apply to the model which, in my case, defines about 20 of the manipulated graphics for the sake of saving on file space.

Turns out, it cannot do that. Can this be changed?
ZippeyKeys12
Posts: 111
Joined: Wed Jun 15, 2016 2:49 pm

Re: Allow MODELDEFS to parse TEXTURES lump

Post by ZippeyKeys12 »

I'm 100% for this, this would be a godsend.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Allow MODELDEFS to parse TEXTURES lump

Post by Major Cooke »

Indeed. This is not only a headache to maintain, it's also a massive waste of space when it comes to having a ton of varieties. Those are literally just different colors and/or offsets (think Photoshop's Filter -> Other -> Offset effect, or TEXTURE's ability to define the offset of each specific graphic inside the box).
User avatar
StrikerMan780
Posts: 485
Joined: Tue Nov 29, 2005 2:15 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Allow MODELDEFS to parse TEXTURES lump

Post by StrikerMan780 »

Agreed with this one. This would allow me to cut quite a few MB off of SMMP's size.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Allow MODELDEFS to parse TEXTURES lump

Post by _mental_ »

Do you want something like this? If so, it's fairly easy to implement.

Although I would like to have more comprehensive testing material for this feature.
It works with quickly hacked sample using a lamp model by Enjay. But it's better to check with something real.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Allow MODELDEFS to parse TEXTURES lump

Post by Major Cooke »

If it can read from the TEXTURES lump, that's all I would like. Because right now it can't do that.

For example, make a quick TEXTURES entry on the graphic.

Code: Select all

Graphic "NJLamp2", 128, 128 // or whatever size it is
{
	Patch "NJLamp", 0, 0 {}
}
It won't work. Not even giving the full directory works at the moment.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Allow MODELDEFS to parse TEXTURES lump

Post by _mental_ »

OK, updated the sample with texture definition. With changes from the mentioned branch both actors are working fine.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Allow MODELDEFS to parse TEXTURES lump

Post by Major Cooke »

Can this be pushed to a test branch on GZDoom itself for testing please?
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Allow MODELDEFS to parse TEXTURES lump

Post by _mental_ »

It's here. Probably it's even faster to copy/paste the change into existing checkout. By the way you can pull from arbitrary Git remote.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Allow MODELDEFS to parse TEXTURES lump

Post by Rachael »

_mental_ wrote:By the way you can pull from arbitrary Git remote.
@ Cooke: Not sure how to do it in SourceTree but it's easy to do from the command-line.

Code: Select all

git pull https://github.com/alexey-lysiuk/gzdoom 55a9f19
(though it is preferable such things are put into a branch that way the HEAD of the branch stays updated)
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Allow MODELDEFS to parse TEXTURES lump

Post by Major Cooke »

Rachael wrote:(though it is preferable such things are put into a branch that way the HEAD of the branch stays updated)
That's the biggest reason why I suggested it. Otherwise pulling updates from the HEAD can sometimes be a pain in the ass.

Thanks Mental! Will give it a try.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Allow MODELDEFS to parse TEXTURES lump

Post by Rachael »

I also put it in the latest QZDoom devbuild.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Allow MODELDEFS to parse TEXTURES lump

Post by Major Cooke »

Here you go. summon SNLightningBeam in console.

It's a shame blend modes don't work on textures applied to models. :(
Attachments
test.pk3
summon SNLightningBeam
(14.02 KiB) Downloaded 45 times
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: Allow MODELDEFS to parse TEXTURES lump

Post by _mental_ »

Well, with my change textures are resolved correctly, right? Blending mode being ignored for models is unrelated to the initial request.
User avatar
Major Cooke
Posts: 8170
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Allow MODELDEFS to parse TEXTURES lump

Post by Major Cooke »

Yup. Works perfectly!
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”