Page 1 of 2

[v1.1] GLDEFS Generator

Posted: Thu Sep 06, 2018 1:45 pm
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

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 2:32 am
by Rachael
An utility like this would be quite useful, not just for GLDEFS but for TEXTURES generation, too. :) Nice work!

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 2:51 am
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.

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 1:46 pm
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.

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 2:17 pm
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.

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 2:23 pm
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.)

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 2:26 pm
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.

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 2:46 pm
by Enjay
I'm sure I could do that. I'll take a look when I get a moment. Thanks.

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 2:48 pm
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.

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 3:03 pm
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"
}

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 3:05 pm
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.

Re: [v1.0] GLDEFS Generator

Posted: Fri Sep 07, 2018 3:17 pm
by Enjay
Very cool, thanks. Much appreciated. :D

Re: [v1.1] GLDEFS Generator

Posted: Fri Sep 07, 2018 6:16 pm
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.

Re: [v1.1] GLDEFS Generator

Posted: Wed Feb 06, 2019 11:49 pm
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?

Re: [v1.1] GLDEFS Generator

Posted: Thu Jul 04, 2019 2:28 pm
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.