[v1.1] GLDEFS Generator

Any utility that assists in the creation of mods, assets, etc, go here.

[v1.1] GLDEFS Generator

Postby Lud » Thu Sep 06, 2018 2:45 pm

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 Lud on Sat Sep 22, 2018 1:27 pm, edited 5 times in total.
Lud
 
Joined: 11 Feb 2016

Re: [v1.0] GLDEFS Generator

Postby Rachael » Fri Sep 07, 2018 3:32 am

An utility like this would be quite useful, not just for GLDEFS but for TEXTURES generation, too. :) Nice work!
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle

Re: [v1.0] GLDEFS Generator

Postby Lud » Fri Sep 07, 2018 3:51 am

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.
Lud
 
Joined: 11 Feb 2016

Re: [v1.0] GLDEFS Generator

Postby Enjay » Fri Sep 07, 2018 2:46 pm

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.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v1.0] GLDEFS Generator

Postby Lud » Fri Sep 07, 2018 3:17 pm

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.
Lud
 
Joined: 11 Feb 2016

Re: [v1.0] GLDEFS Generator

Postby Enjay » Fri Sep 07, 2018 3:23 pm

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.)
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v1.0] GLDEFS Generator

Postby Lud » Fri Sep 07, 2018 3:26 pm

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.
Lud
 
Joined: 11 Feb 2016

Re: [v1.0] GLDEFS Generator

Postby Enjay » Fri Sep 07, 2018 3:46 pm

I'm sure I could do that. I'll take a look when I get a moment. Thanks.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v1.0] GLDEFS Generator

Postby Lud » Fri Sep 07, 2018 3:48 pm

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.
Lud
 
Joined: 11 Feb 2016

Re: [v1.0] GLDEFS Generator

Postby Enjay » Fri Sep 07, 2018 4:03 pm

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 allExpand view
brightmap sprite ABR1A0
{
   map "bm/bmspr/ABR1A0.png"
   disablefullbright
}


or

Code: Select allExpand view
brightmap texture exitsign
{
   map "bm/bmtex/exitsign.png"
}
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v1.0] GLDEFS Generator

Postby Lud » Fri Sep 07, 2018 4:05 pm

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.
Lud
 
Joined: 11 Feb 2016

Re: [v1.0] GLDEFS Generator

Postby Enjay » Fri Sep 07, 2018 4:17 pm

Very cool, thanks. Much appreciated. :D
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

Re: [v1.1] GLDEFS Generator

Postby Lud » Fri Sep 07, 2018 7:16 pm

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.
Lud
 
Joined: 11 Feb 2016

Re: [v1.1] GLDEFS Generator

Postby Void Weaver » Thu Feb 07, 2019 12:49 am

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
Void Weaver
Keeper of Diablo bestiary storage
 
Joined: 18 Dec 2014


Return to Editors / Asset Manipulation

Who is online

Users browsing this forum: No registered users and 2 guests