View Issue Details

IDProjectCategoryView StatusLast Update
0001744The Dark ModGUIpublic20.11.2024 04:57
ReporterSneaksieDave Assigned Tonbohr1more  
PrioritylowSeverityminorReproducibilityN/A
Status assignedResolutionopen 
Product VersionSVN 
Summary0001744: Method for controlling readable brightness
DescriptionJust a general issue to serve as a note that we should come up with some method* of adjusting readable brightness. It was raised as a result of actual experience in our recent contest FMs and it seems at least some agree there is a need. When you're playing in a dark environment for long periods of time, then open a readable... BAM! Instantly blind. I actually found myself delaying opening of readables until I was in a more lit area so it wouldn't be so jarring.

*

  • simply darken the actual texture files?

  • cvar/menu setting to allow flexibility with an rgb setting in materials?

  • some kind of ambient filter light (hacky)?

  • ...


TagsNo tags attached.

Activities

Springheel

Springheel

07.04.2009 22:47

administrator   ~0002417

Another possibility might be a slight fade in/out effect so it isn't so jarring.
LEGION

LEGION

31.07.2010 18:55

reporter   ~0003156

What about the lantern-light, that is lit over the readable, like it looks when the book isn´t frobbed and highlighted. But the light is only barely visible or not at all to guards, because this simulates the player lifting up the towel over the lantern slightly to be able to read and only to lit up the readable.
nbohr1more

nbohr1more

08.01.2023 18:15

developer   ~0015734

Unless we broke this, GUI's accept a parameter "matColor" that can define RGBA values for the material used for a background image ( such as a readable parchment ).
We can hook a cvar into this value easily to affect the value but I suspect that ( similar to text scaling ) changes wont show up until the user restarts TDM?
Daft Mugi

Daft Mugi

11.01.2023 00:38

developer   ~0015754

The "matColor" method sounds quite promising.

I wrote some code to automatically adjust the brightness/gamma when a readable was on screen.
But in the end, that method didn't seem worth it.
Instead, I just edited the DDS files of the following textures, lowering their brightness.

```
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
```
nbohr1more

nbohr1more

18.03.2024 03:38

developer   ~0016572

Thread:

https://forums.thedarkmod.com/index.php?/topic/21631-feature-request-different-gammabrightness-for-uireadablesmaps
nbohr1more

nbohr1more

19.03.2024 04:44

developer   ~0016575

Some research:

matColor does indeed alter the brightness of a defined texture. It doesn't just define a color where no texture is used
GUI cvars start with the convention of gui_* except r_skipGuiShaders which appears to be a cutoff cvar to stop all GUI triangles from rendering.
ReloadGuis is smart and quickly detects changed files so it doesn't have to reload all defs.
Might be a good idea to restrict the new cvar to only readable guis but will need to see if anything in the code makes that distinguishable ( probably needs info from the game side )?
nbohr1more

nbohr1more

11.11.2024 05:44

developer   ~0016911

Some limited success in Window and SimpleWindow with this:

float mcl = idWindow::gui_matColor_bias.GetFloat();
matColor = idVec4( matColor.x() * mcl, matColor.y() * mcl, matColor.z() * mcl, matColor.w() * 1.0 );

need to figure out the best place in the loop to place it ( currently flickers ).
nbohr1more

nbohr1more

20.11.2024 04:57

developer   ~0016920

Better place in RenderSystem.cpp

SetColor

This can be used to pass general information to the current material, not
just colors
=============
*/
void idRenderSystemLocal::SetColor( const idVec4 &rgba ) {
    guiModel->SetColor( rgba[0], rgba[1], rgba[2], rgba[3] );
}

Issue History

Date Modified Username Field Change
07.04.2009 14:45 SneaksieDave New Issue
07.04.2009 22:47 Springheel Note Added: 0002417
31.07.2010 18:55 LEGION Note Added: 0003156
08.01.2023 18:15 nbohr1more Note Added: 0015734
08.01.2023 18:33 nbohr1more Assigned To => nbohr1more
08.01.2023 18:33 nbohr1more Status new => assigned
11.01.2023 00:38 Daft Mugi Note Added: 0015754
18.03.2024 03:38 nbohr1more Note Added: 0016572
19.03.2024 04:44 nbohr1more Note Added: 0016575
11.11.2024 05:44 nbohr1more Note Added: 0016911
18.11.2024 12:18 datiswous Description Updated
20.11.2024 04:57 nbohr1more Note Added: 0016920