[v1.1] GLDEFS Generator

Projects that have specifically been abandoned or considered "dead" get moved here, so people will quit bumping them. If your project has wound up here and it should not be, contact a moderator to have it moved back to the land of the living.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

[v1.1] GLDEFS Generator

Post by Accensus »

GLDEFS Generator is a tool written in C# that reads the filenames in a specific folder and generates GLDEFS for each file from a template using keywords.

---DOWNLOADS---
GLDEFS Generator v1.1 [Last update: 08/9/2018]
NOTE: Source code is in the zip under "src" folder.
Spoiler: Requirements
Spoiler: Usage
Spoiler: License
Last edited by Accensus on Sat Sep 22, 2018 12:27 pm, edited 5 times in total.
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [v1.0] GLDEFS Generator

Post by Rachael »

An utility like this would be quite useful, not just for GLDEFS but for TEXTURES generation, too. :) Nice work!
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: [v1.0] GLDEFS Generator

Post by Accensus »

Thanks! Kodi did give me an idea for a TEXTURES generator, albeit a bit different in function. I'll see if something can be done about it. That one's a bit more complex due to all the offset, scaling, and other stuff.
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [v1.0] GLDEFS Generator

Post by Enjay »

Aw man! Where were you a couple or more years back when I really needed something like this? ;) (At least my text editor's macro function took most of the pain out of it.)

This is a really good idea. I suspect I'll get good use out of it sooner or later. Thanks.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: [v1.0] GLDEFS Generator

Post by Accensus »

Enjay wrote:Aw man! Where were you a couple or more years back when I really needed something like this? ;)
Likely having no idea what programming is, lol.

I'm currently working on v1.1. It will hopefully include dynamic lights generation by (possibly) taking the average pixel color in an image and working with that. Also planning on having glowing flats generation which would work the same way.

The current version is only really useful for shaders, as that was the original suggestion by kodi.
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [v1.0] GLDEFS Generator

Post by Enjay »

It was brightmaps I originally needed it for. Can it handle those? (Basically, it would need to put correct paths in for the brightmap image for each image to have a brightmap allocated to it and format them in a brightmap entry in gldefs.)
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: [v1.0] GLDEFS Generator

Post by Accensus »

If you already have the brightmaps as files, then yes. You'd have to edit the template for that. As is, the tool only really replaces keywords in the template. Anything that's not a keyword stays the same.
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [v1.0] GLDEFS Generator

Post by Enjay »

I'm sure I could do that. I'll take a look when I get a moment. Thanks.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: [v1.0] GLDEFS Generator

Post by Accensus »

Just read your ninja edit, I'm not too sure if it can do that, cause I remembered brightmaps require a bit different syntax for the map property iirc. Like, needing the extension. I'll take a look at those. Would be appreciated if you could mail me some test brightmaps to work with.
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [v1.0] GLDEFS Generator

Post by Enjay »

I can easily mail you some if you like, but GZDoom ships with a bunch in brightmaps.pk3

I don't know about anyone else, but the way I set up brightmaps is in a folder (and then possibly a sub folder). I give each brightmap the same name as the texture/sprite that it is a map for. So a typical entry for me would be something like:

Code: Select all

brightmap sprite ABR1A0
{
	map "bm/bmspr/ABR1A0.png"
	disablefullbright
}
or

Code: Select all

brightmap texture exitsign
{
	map "bm/bmtex/exitsign.png"
}
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: [v1.0] GLDEFS Generator

Post by Accensus »

That's easy to do. Only thing I'd need to add is a separate <bmappath> keyword for the full path. Expect it in v1.1 sometime later or tomorrow.

No need to send brightmaps in that case.
User avatar
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: [v1.0] GLDEFS Generator

Post by Enjay »

Very cool, thanks. Much appreciated. :D
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: [v1.1] GLDEFS Generator

Post by Accensus »

v1.1 has arrived.

Changelog:
- Expanded functionality to work with dynamic lights, glowing flats, and brightmaps.
- In the case of dynamic lights and glowing flats, pixel data is read and the average color is picked for glow color. Intensity is based on pixel brightness, but can be fine-tuned.
- Updated the Usage spoiler with useful info. Please read it.
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: [v1.1] GLDEFS Generator

Post by Void Weaver »

Sorry for probably stupid question, but can allows this tool to attach dynamic light (PointLight) to a map texture or it works only for actor textures?
And if no, then a bit off-topic question: is a some way to assign a specific dynlight to the specific map texture, aside from manually attachment? Maybe it already discussed at somewhere?
User avatar
LastManonEarth
Posts: 44
Joined: Mon Apr 25, 2016 4:25 pm

Re: [v1.1] GLDEFS Generator

Post by LastManonEarth »

I have a similar question like Void Weaver here. Can spotlight dynamically be attached to texutres for them to move, or disappear , like switches (from red to gree , i.e.).

I been using a similar add on, (as far as I can see cos I am not able to download this due to gdrive permission) but seems this behaves similar. Wondering if the dynamic fact is real.
Locked

Return to “Abandoned/Dead Projects”