Jump to content
The Dark Mod Forums

[Feature Request] Different gamma/brightness for UI/readables/maps


Daft Mugi

Recommended Posts

2 hours ago, Daft Mugi said:

I tried this by making newspaper_bridgeport01.dds, newspaper_bridgeport02.dds, and newspaper_bridgeport03.dds darker, and it worked well. The result was better than I originally thought it would be, so thank you for suggesting this.

On the long run it is probable easier to darken the guis instead of altering the image files (and it is easier to revert if necessary).

I'm curious how your try on an automatization works out. Thumbs are pressed. :)

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

So... I discovered another complication. Some readables have their own "filter" that darkens the screen.

I've attached a readable from Volta 2 to show the "filter" (I don't know what to call it) of the readable. When the readable overlay is shown, the game world is slightly darkened. In this case, any reduction in brightness or gamma -- for example, the brightness_ui and gamma_ui cvars -- makes it look too dark. The screenshots both have identical gamma and brightness values.

guis/readables/scrolls/scroll_hand_ellianerelle_smaller.gui

cauldron_readable.webp

Edited by Daft Mugi
Link to comment
Share on other sites

57 minutes ago, Daft Mugi said:

I've attached a readable from Volta 2 to show the "filter" (I don't know what to call it) of the readable.

It's the correct term. I don't think it is an issue, though. You usually don't move while reading and the text is readable. But maybe it appears differently in game.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I think it's a totally reasonable request however personally I'd work around it differently.

It depends greatly on your monitor and room brightness however I'd just set gamma to 1.0 and adjust monitor brightness to room brightness.

In the end you'll end up with adequate GUI backgrounds. If you think the world is too dark now, use the ambient min brightness cvar.

In the ideal world we would not have this problem if we had been conscious about little details like this in the past. I believe this is best fixed in standard .gui/texture assets rather that applying all sorts of hacks on top of it. 

When you think about, a separate .gui brightness setting makes sense, if applied universally to all guis.

Link to comment
Share on other sites

  • 2 months later...

I ended up abandoning my code.

My code changed the brightness/gamma when a readable was on screen.
This didn't quite give me the results I was looking for, because the brightness/gamma of each readable can vary a lot.
The main goal was to reduce the brightness of bright readables to reduce blinding light.
However, the main negative outcome was that dark readables would become too dark.

Instead, I used a graphics editor to edit the DDS files of the following textures, lowering their brightness.
(Note: There may be other bright readable backgrounds that I haven't found in the core assets yet.)
(Note: Some missions, such as Iris, have their own copy of readable backgrounds, so those missions require overriding the assets in their respective FM folders.)

dds
└── guis
    └── assets
        └── readables
            ├── books
            │   ├── book_leftpage_01.dds
            │   ├── book_leftpage_curled_01.dds
            │   ├── book_rightpage_01.dds
            │   └── book_rightpage_curled_01.dds
            └── sheets
                ├── newspaper_bridgeport01.dds
                ├── newspaper_bridgeport02.dds
                └── newspaper_bridgeport03.dds

 

Link to comment
Share on other sites

On 1/11/2023 at 2:59 AM, Daft Mugi said:

However, the main negative outcome was that dark readables would become too dark.

I wonder if there could be made a check on background color of gui file and then apply a darkening filter on top of the gui based on that information. I get that there are more colors in a background file, but maybe check for the lightest as a base.

I think it should at least be possible to make a list of applied semi-transparent darkening gui overlays and then apply them via a script via if statements (if this readable gui -> load this gui overlay, etc.).

On 1/11/2023 at 2:59 AM, Daft Mugi said:

My code changed the brightness/gamma when a readable was on screen.

Can you still share the code?

Edited by datiswous
Link to comment
Share on other sites

  • 3 weeks later...
On 1/13/2023 at 8:27 AM, datiswous said:

Can you still share the code?

I guess I can do that.

Note: This code is not complete.
I'm not sure if this patch will apply correctly these days, since it's based on an old revision.
There are my debug print statements in this work-in-progress patch that should be removed if it was complete.
There's a cvar used for tracking whether or not the main menu is open. I didn't like this and wanted to find an alternative.
There's this block of code used to identify readables, etc. I wanted to find a more explicit way of identification.

guiFileStr.find("invgrid") != std::string::npos ||
  guiFileStr.find("objectives") != std::string::npos ||
  guiFileStr.find("map") != std::string::npos ||
  guiFileStr.find("readable") != std::string::npos;

Again, I got better luck just editing the image files themselves.
But maybe there's something good in the patch that can be salvaged for later.
Attaching here for you @datiswous and others who are curious.

wip-ui-brightness.diff

Edited by Daft Mugi
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 5 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...