Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Setting Custom Brightmaps For Custom Textures (maybe sprites and flats too?) #729

Closed
rouncey opened this issue May 25, 2022 · 6 comments

Comments

@rouncey
Copy link

rouncey commented May 25, 2022

The brightmaps in Doom Retro are a big favorite of mine. I'd love to be able to set brightmaps for custom textures, so that I can have switches, lights, etc. show up as fully bright regardless of sector light level.

I'm not certain what the best way to implement this would be. Perhaps a text lump, named maybe BRITEMAP or DRBRIGHT or something? The syntax could look like this, perhaps:

NEWSW01 192-207,240-247,250

This could tell Doom Retro to draw the colors in the texture named "NEWSW01" with indices 192-207, 240-247, and 250 (the entire blue range, plus the brightest pink) as always bright.

Of course I'm not sure how would be the best way to implement this, but I'd love to be able to set custom brightmaps as that'd bring another great Doom Retro graphical enhancement to the universe of Doom WADs with new graphics out there.

@bradharding
Copy link
Owner

I have been considering this. If I do, it will be done through a MAPINFO lump. At the moment you can specify nobrightmap = "walltexture" to disable a brightmap for a texture, so the opposite makes sense.

Although more restrictive than your suggestion, it will likely be of the following format (so as to not involve an entire rewrite of the existing brightmap code):
`brightmap = "walltexture" NOTGRAY|REDONLY1|REDANDGREEN
For the last parameter, look how brightmaps are specified here.

@bradharding
Copy link
Owner

Hi @iainrm. So, I've created a new BRGHTMPS lump here that allows customization in PWADs. But I'm thinking your idea of having color ranges such as 192-207,240-247,250 is much cleaner than 256-character strings of 0s and 1s, so I think I'll progress to that...

@rouncey
Copy link
Author

rouncey commented Jul 1, 2022

I saw the back-and-forth in the logs. I agree, manipulating a big array of 1s and 0s is rather obtuse and painful for people to actually edit by hand. It'd be much easier with a third-party tool but allowing a BRGHTMPS lump to be human-readable and editable is for the best imo.

Nonetheless this is very exciting! I'd love to implement this feature in my own WADs and maybe if enough people use it BRGHTMPS can be a standard feature across Doom ports.

@rouncey rouncey closed this as completed Jul 1, 2022
@rouncey rouncey reopened this Jul 1, 2022
@JNechaevsky
Copy link
Contributor

Hand editing is extremely simple when using this image. 😉
There are some technics in GFX editors like selecting same colors in palette and image, to make sure proper color will be lit. But it depends on artist skills, I believe.

@bradharding
Copy link
Owner

It's that exact image I referenced to convert each brightmap. So this is how BRGHTMPS is going to look now:

TEXTURE BTNTMETL 4,9-63,112-125,152-256 2
TEXTURE BTNTSLVR 4,9-63,112-125,152-256 2
TEXTURE COMP2 112-123,192-207 0
TEXTURE COMPSTA1 4,9-79,112-256 0
TEXTURE COMPSTA2 4,9-79,112-256 0
TEXTURE COMPUTE1 4,9-63,112-125,152-256 0
TEXTURE COMPUTE2 45,65-68,70,73,76,121-124,164-167,190,206,207,240-241,243 1
TEXTURE COMPUTE3 45,164-167,190,206,207,240-241,243 1
TEXTURE EXITSIGN 4,9-79,112-256 0
TEXTURE EXITSTON 45,173-191 0
TEXTURE LITEBLU1 4,9-79,112-256 0
TEXTURE LITEBLU2 4,9-79,112-256 0
TEXTURE LITE173-183 45,173-191 2
TEXTURE LITEYEL2 160-167,224-231,249 2
TEXTURE LITEYEL3 160-167,224-231,249 2
.
.
.

It can't get any simpler than that. I'm now working on code to parse it correctly. And I'll make sure to include comments in the lump with a clear explanation of the format.

bradharding added a commit that referenced this issue Jul 2, 2022
So this is what I've settled on. Instead of 256-character strings of 1s and 0s, use ranges of colors delimited by commas. Much simpler and intuitive imo. Thanks @iainrm for the suggestion! See #729.
@bradharding
Copy link
Owner

All done! 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants