Page 1 of 2

Allow MODELDEFS to parse TEXTURES lump

Posted: Mon Nov 13, 2017 9:19 am
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?

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Mon Nov 13, 2017 2:10 pm
by ZippeyKeys12
I'm 100% for this, this would be a godsend.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Mon Nov 13, 2017 8:38 pm
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).

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Fri Nov 17, 2017 3:39 pm
by StrikerMan780
Agreed with this one. This would allow me to cut quite a few MB off of SMMP's size.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sat Nov 18, 2017 10:31 am
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.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sat Nov 18, 2017 2:31 pm
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.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sun Nov 19, 2017 3:15 am
by _mental_
OK, updated the sample with texture definition. With changes from the mentioned branch both actors are working fine.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sun Nov 19, 2017 8:53 am
by Major Cooke
Can this be pushed to a test branch on GZDoom itself for testing please?

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sun Nov 19, 2017 10:05 am
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.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sun Nov 19, 2017 10:53 am
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)

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sun Nov 19, 2017 11:16 am
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.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sun Nov 19, 2017 11:43 am
by Rachael
I also put it in the latest QZDoom devbuild.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Sun Nov 19, 2017 12:35 pm
by Major Cooke
Here you go. summon SNLightningBeam in console.

It's a shame blend modes don't work on textures applied to models. :(

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Mon Nov 20, 2017 8:27 am
by _mental_
Well, with my change textures are resolved correctly, right? Blending mode being ignored for models is unrelated to the initial request.

Re: Allow MODELDEFS to parse TEXTURES lump

Posted: Mon Nov 20, 2017 9:15 am
by Major Cooke
Yup. Works perfectly!