View Issue Details

IDProjectCategoryView StatusLast Update
0001201The Dark ModGUIpublic05.10.2017 13:30
ReporterFidcal Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
PlatformALL 
Product VersionTDM 1.00 
Target VersionTDM 2.06Fixed in VersionTDM 2.06 
Summary0001201: readables world gui text invisible in fast ambient light
Descriptionreadables world gui text invisible in fast ambient light
TagsNo tags attached.

Activities

Springheel

Springheel

29.10.2008 14:28

administrator   ~0002136

This does indeed look odd. I have no good ideas about how to fix it though.
Springheel

Springheel

16.12.2010 02:02

administrator   ~0003387

Just a note that this seems to apply with all ambient_world lights.
nbohr1more

nbohr1more

27.02.2011 18:10

developer   ~0003680

Last edited: 05.09.2016 12:46

Sotha has found that some fonts do not exhibit this problem with the new "Enhanced" Ambient:

http://forums.thedarkmod.com/topic/12367-v104-bug-thread/#entry249341

nbohr1more

nbohr1more

13.04.2011 01:42

developer   ~0003803

Last edited: 05.09.2016 12:46

It may be possible to correct this behavior by adding the additive Ambient stage to the Material Definition of the "GuiSurf" Decal rather than trying to find the Font material definition itself (which does not appear to exist... fonts appear to be a blend operation in the renderDef or windowDef ).

Forecolor:

https://modwiki.xnet.fi/Forecolor_(GUI_item_property)

Springheel

Springheel

14.04.2011 13:28

administrator   ~0003804

I can't find any material definition called GuiSurf. There is a line in some decal shaders that says: guiSurf entity

No idea what that means though.
nbohr1more

nbohr1more

14.04.2011 18:17

developer   ~0003806

Last edited: 14.04.2011 18:18

Sorry, that's what I meant.

Any material with "GuiSurf entity" in the definition will act as a "GUI Surface". I believe that these decal materials will need the additive ambient stage.

Though, adding this may lighten the characters so the "Forecolor" opacity in the GUI declaration may need to be tweaked.

Springheel

Springheel

15.04.2011 02:21

administrator   ~0003807

The decals I found with that spawnarg were related to D3 weapons. What ones would be relevant to readables?
nbohr1more

nbohr1more

21.04.2011 20:09

developer   ~0003816

Last edited: 21.04.2011 20:41

This article has an example decal texture material with guisurf entity as a property... The example material does NOT have the ambient method stage.

http://modetwo.net/darkmod/wiki/index.php?title=Text_Decals_for_Signs_etc.

I will look at the prefab listed in the article:

prefabs/readables/sign_text_decals/sign_text_carleton.pfb

unless someone else can review it before I get a chance.


Also... check "textures/common/entitygui" for the enhanced ambient stage as that appears to be the advised readable "GUI" texture:

http://modetwo.net/darkmod/wiki/index.php?title=Readables

nbohr1more

nbohr1more

29.04.2011 17:39

developer   ~0003829

Last edited: 05.05.2011 13:08

Inside tdm_textures_base01.pk4:

Line 303 from tdm_decals_signs.mtr

// Fidcal - a non-solid entity gui for use with text signs etc.
textures/darkmod/decals/signs/decal_gui
{
    qer_editorimage textures/editor/entityGui.tga
    DECAL_MACRO
    noShadows
    nonsolid
    noimpact
    discrete
    guiSurf entity
}

As you can see, the new Ambient Method is not present...

I haven't seen an override for Doom 3's "textures/common/entitygui" yet in the materials but I will keep digging...

Inside pak000.pk4 invisible.mtr

// when gui surfaces are placed on an entity to allow them to be
// interactive, use this surface for the view screen and place
// a "gui" key containing the gui file, like "guis/mainmenu.gui"
// on the entity
textures/common/entityGui {
    qer_editorimage textures/editor/entityGui.tga
    discrete
    playerclip
    guiSurf entity
}

nbohr1more

nbohr1more

04.09.2016 19:31

developer   ~0008302

Hmm, returning to this bug with new thoughts.

This section in ui/SimpleWindow.cpp

void idSimpleWindow::Redraw(float x, float y) {
    
    if (!visible) {
        return;
}

does a boolean check for visibility and completely stops rendering if it fails. If the "visible" parameter is affected by light interactions then this would explain the behavior.
nbohr1more

nbohr1more

04.09.2016 20:03

developer   ~0008303

Last edited: 04.09.2016 23:21

Another possibility.

ui/DeviceContext.cpp

void idDeviceContext::DrawMaterialRect( float x, float y, float w, float h, float size, const idMaterial *mat, const idVec4 &color) {

    if ( color.w == 0.0f ) {
        return;
    }

Edit: Removing all the black check conditionals does not cure this.

nbohr1more

nbohr1more

05.09.2016 12:43

developer   ~0008306

Last edited: 07.09.2016 02:25

I disabled a few more "is this black" conditionals in the ui code but the behavior persists.


Edit: Hmm. I think I missed this one:

int idDeviceContext::DrawText(float x, float y, float scale, idVec4 color, const char *text, float adjust, int limit, int style, int cursor) {
    int len, count;
    idVec4 newColor;
    const glyphInfo_t *glyph;
    float useScale;
    SetFontByScale(scale);
    useScale = scale * useFont->glyphScale;
    count = 0;
if ( text && color.w != 0.0f ) {

Edit 2: I did miss it but removing it did not fix the issue...

nbohr1more

nbohr1more

04.10.2017 18:40

developer   ~0009390

New proposed design. A dedicated light interaction shader for the simple ambient instead of using texture brightening

http://forums.thedarkmod.com/topic/18982-tdm-206/page-3#entry412812
nbohr1more

nbohr1more

05.10.2017 11:47

developer   ~0009391

Src Rev 7206

(Needs 7207 to build the tools binary).
duzenko

duzenko

05.10.2017 13:19

developer   ~0009395

Nine years, huh?
nbohr1more

nbohr1more

05.10.2017 13:30

developer   ~0009396

LOL. The simple ambient system predates the GPL Doom 3 release.
Who knew it would take changing the entire render order of GUI's to fix this one.

Issue History

Date Modified Username Field Change
30.09.2008 18:55 Fidcal New Issue
30.09.2008 18:55 Fidcal ReleasePriority => minor
24.10.2008 05:24 angua Project @3@ => The Dark Mod
29.10.2008 14:28 Springheel Note Added: 0002136
16.12.2010 02:02 Springheel Note Added: 0003387
27.02.2011 18:10 nbohr1more Note Added: 0003680
13.04.2011 01:42 nbohr1more Note Added: 0003803
13.04.2011 01:43 nbohr1more Note Edited: 0003803
13.04.2011 01:45 nbohr1more Note Edited: 0003803
13.04.2011 02:23 nbohr1more Note Edited: 0003803
14.04.2011 13:28 Springheel Note Added: 0003804
14.04.2011 18:17 nbohr1more Note Added: 0003806
14.04.2011 18:18 nbohr1more Note Edited: 0003806
15.04.2011 02:21 Springheel Note Added: 0003807
21.04.2011 20:09 nbohr1more Note Added: 0003816
21.04.2011 20:41 nbohr1more Note Edited: 0003816
29.04.2011 17:39 nbohr1more Note Added: 0003829
05.05.2011 13:08 nbohr1more Note Edited: 0003829
04.09.2016 19:31 nbohr1more Note Added: 0008302
04.09.2016 20:03 nbohr1more Note Added: 0008303
04.09.2016 20:14 nbohr1more Assigned To => nbohr1more
04.09.2016 20:14 nbohr1more Status new => assigned
04.09.2016 20:14 nbohr1more Platform => ALL
04.09.2016 20:14 nbohr1more Product Version => TDM 1.00
04.09.2016 20:14 nbohr1more Target Version => TDM 2.05
04.09.2016 23:21 nbohr1more Note Edited: 0008303
05.09.2016 12:43 nbohr1more Note Added: 0008306
05.09.2016 12:43 nbohr1more Note Edited: 0008306
05.09.2016 12:46 nbohr1more Note Edited: 0003680
05.09.2016 12:46 nbohr1more Note Edited: 0003803
05.09.2016 14:55 nbohr1more Note Edited: 0008306
05.09.2016 19:27 nbohr1more Note Edited: 0008306
07.09.2016 02:25 nbohr1more Note Edited: 0008306
08.11.2016 15:00 nbohr1more Target Version TDM 2.05 => TDM 2.06
04.10.2017 18:40 nbohr1more Note Added: 0009390
05.10.2017 11:46 nbohr1more Assigned To nbohr1more => duzenko
05.10.2017 11:46 nbohr1more Resolution open => fixed
05.10.2017 11:46 nbohr1more Fixed in Version => TDM 2.06
05.10.2017 11:46 nbohr1more Status assigned => resolved
05.10.2017 11:47 nbohr1more Note Added: 0009391
05.10.2017 13:19 duzenko Note Added: 0009395
05.10.2017 13:30 nbohr1more Note Added: 0009396