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

Add Alpha Channel as optional value for color keys #4494

Open
magicaldave opened this issue Feb 17, 2024 · 2 comments
Open

Add Alpha Channel as optional value for color keys #4494

magicaldave opened this issue Feb 17, 2024 · 2 comments
Labels
Prio:3 Low priority: Minor problems and nice to have features Type:Enhancement New features

Comments

@magicaldave
Copy link

Screenshot_20240216_201412

Hello, with lights in my custom game definition, lights use RGBA values and not simply RGB. I propose a simple addition to game definitions which uses RGB by default, and allows developers to enable alpha channel values for any color keys detected by trenchbroom. Currently the way I accomplish this is to use an additional transparency key, which is fairly ugly if easy to do.

Thanks for your time!

@SirYodaJedi
Copy link
Contributor

SirYodaJedi commented Feb 17, 2024

The color1 and color255 KV types, which aren't properly supported by Trenchbroom yet (relevant issues #4293, #1048) allows any arbitrary number of additional values after the three color values to be manually added (that's how Half-Life's light entities handle brightness, and would work here for alpha). Does Trenchbroom strip these when using the color picker? They should be kept.

On a related note, I'd imagine it'd make sense to allow the model() key's alpha parameter to take a color1 or color255 KV as input, and assume the fourth value is alpha.

@magicaldave
Copy link
Author

Perhaps TB might read these values, but it certainly doesn't appear to use them when trying to create a new map. I can't verify whether they're being stripped from maps which actually do contain them or not, just that the smart editors don't pick up on them.

@kduske kduske changed the title Feature Request: Add Alpha Channel as optional value for color keys Add Alpha Channel as optional value for color keys Feb 17, 2024
@kduske kduske added Type:Enhancement New features Prio:3 Low priority: Minor problems and nice to have features labels Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio:3 Low priority: Minor problems and nice to have features Type:Enhancement New features
Projects
None yet
Development

No branches or pull requests

3 participants