[Added] Allow MODELDEFS to parse TEXTURES lump

Moderator: Developers

Allow MODELDEFS to parse TEXTURES lump

Postby Major Cooke » Mon Nov 13, 2017 10:19 am

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?
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Allow MODELDEFS to parse TEXTURES lump

Postby ZippeyKeys12 » Mon Nov 13, 2017 3:10 pm

I'm 100% for this, this would be a godsend.
ZippeyKeys12
 
Joined: 15 Jun 2016

Re: Allow MODELDEFS to parse TEXTURES lump

Postby Major Cooke » Mon Nov 13, 2017 9:38 pm

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
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Allow MODELDEFS to parse TEXTURES lump

Postby StrikerMan780 » Fri Nov 17, 2017 4:39 pm

Agreed with this one. This would allow me to cut quite a few MB off of SMMP's size.
StrikerMan780
 
Joined: 29 Nov 2005
Location: In a dead-end shithole.
Discord: StrikerTheHedgefox#6299

Re: Allow MODELDEFS to parse TEXTURES lump

Postby _mental_ » Sat Nov 18, 2017 11:31 am

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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Allow MODELDEFS to parse TEXTURES lump

Postby Major Cooke » Sat Nov 18, 2017 3:31 pm

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 allExpand view
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.
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Allow MODELDEFS to parse TEXTURES lump

Postby _mental_ » Sun Nov 19, 2017 4:15 am

OK, updated the sample with texture definition. With changes from the mentioned branch both actors are working fine.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Allow MODELDEFS to parse TEXTURES lump

Postby Major Cooke » Sun Nov 19, 2017 9:53 am

Can this be pushed to a test branch on GZDoom itself for testing please?
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Allow MODELDEFS to parse TEXTURES lump

Postby _mental_ » Sun Nov 19, 2017 11:05 am

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.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Allow MODELDEFS to parse TEXTURES lump

Postby Rachael » Sun Nov 19, 2017 11:53 am

_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 allExpand view
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
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: Allow MODELDEFS to parse TEXTURES lump

Postby Major Cooke » Sun Nov 19, 2017 12:16 pm

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
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Allow MODELDEFS to parse TEXTURES lump

Postby Rachael » Sun Nov 19, 2017 12:43 pm

I also put it in the latest QZDoom devbuild.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: Allow MODELDEFS to parse TEXTURES lump

Postby Major Cooke » Sun Nov 19, 2017 1:35 pm

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 21 times
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Re: Allow MODELDEFS to parse TEXTURES lump

Postby _mental_ » Mon Nov 20, 2017 9:27 am

Well, with my change textures are resolved correctly, right? Blending mode being ignored for models is unrelated to the initial request.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: Allow MODELDEFS to parse TEXTURES lump

Postby Major Cooke » Mon Nov 20, 2017 10:15 am

Yup. Works perfectly!
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

Next

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 2 guests