View Issue Details

IDProjectCategoryView StatusLast Update
0005043The Dark ModGraphicspublic14.09.2019 17:36
ReporterVanishedOne Assigned To 
PrioritynormalSeveritynormalReproducibilityalways
Status newResolutionopen 
Summary0005043: RGBA keywords have no effect in cubemap stages if material has light interaction
DescriptionSee comments by spooks: 'It seems to me that the rgb parameters work on cubemap stages ONLY when there are no diffuse/bumpmap/specular map blending stages set on the material.'
http://forums.thedarkmod.com/index.php?/topic/17308-epis-many-questions-thread/&do=findComment&comment=388559
http://forums.thedarkmod.com/index.php?/topic/17308-epis-many-questions-thread/&do=findComment&comment=388549

TDM nonetheless has light-interactive materials that *try* to use rgb-adjusted cubemap stages, e.g. textures/darkmod/stone/flat/smooth/marble_pattern01_polished

I don't know whether that indicates this worked at some point in the past, or whether the material authors assumed it did (this particular material also seems to try to use alpha blending without an actual alpha mask, so the author may have been throwing mud at a wall to see what stuck).
TagsNo tags attached.

Relationships

related to 0005044 resolvedstgatilov Adjusting specular RGB in material stages fails under enhanced interaction shader 

Activities

Judith

Judith

13.09.2019 05:35

reporter   ~0011845

This seems like a corner case to me. You can easily adjust cubemap intensity with materials using all the texture slots (d/n/s) via the makealpha stage:

    {
        maskcolor
        map makealpha (textures/mask_texture) // eg. your specular texture or a dedicated mask
        alpha .2 // modify it as needed
    }
    {
        blend gl_dst_alpha, gl_one
        maskalpha
        cameraCubeMap textures/your_cubemap
        texgen reflect
    }
VanishedOne

VanishedOne

13.09.2019 15:43

reporter   ~0011847

Yes, that's in the linked thread. But if you want to manipulate the channels independently, you have to make a different alpha mask stage each time, ending up with up to six stages to get the job done: http://forums.thedarkmod.com/index.php?/topic/17308-epis-many-questions-thread/page/5/&tab=comments#comment-388559
Judith

Judith

13.09.2019 18:33

reporter   ~0011849

I took a glance at that thread, but I'm not getting what's a practical reason / common situation when you'll actually need tinting a cubemap. For reflection you either get specular for tinting and then you use a cubemap "to take reflections to the next stage", if just a specular hotspot on a smooth surface isn't enough. But you don't have to tint cubemaps for that.
VanishedOne

VanishedOne

13.09.2019 19:17

reporter   ~0011850

We have glass materials that accept colour parms for their cubemap stages without having any specular interactions (no light interactions at all in fact, so the cubemap tint should actually work): textures/darkmod/glass/colored for example.
Judith

Judith

14.09.2019 09:00

reporter   ~0011852

And why would you want to create materials in such a weird way? Always start with diffuse/normal/specular combo, and then, if the specularity isn't enough to get the surface properties you want, you add cubemap reflections as well. Besides, cubemaps get washed out by high intensity light sources, so they should never be used instead of a specular map.
VanishedOne

VanishedOne

14.09.2019 14:45

reporter   ~0011855

It is, of course, always possible that people didn't know what they were doing; and it is always possible that they did, and Chesterton's Fence applies. In the case of highly transparent glass and water materials, I surmise that the cubemap stages may be there to represent surface reflectivity independent of actual light interactions, and to accentuate surface distortions in materials that use HeatHaze. (After all, it's not unusual for TDM environments to be dimly lit and to have only very dark scenes behind glass/water surfaces.)
Judith

Judith

14.09.2019 15:30

reporter   ~0011856

Then I'd assume the former, as the workflow I posted is standard for both typical materials and translucent ones. To accentuate the distortion in the HeatHaze material you use a distortion texture for that program. Cubemap is useful when you need to have more than just a specular hotspot reflectivity, so you can put some generic cubemap there or maybe something like a fake interior reflection. But cubemap reflection doesn't replace basic specularity, and it vanishes when you put a light source nearby it or turn on the PC's lantern.
VanishedOne

VanishedOne

14.09.2019 17:29

reporter   ~0011858

I think the direction of this thread has ceased to be germane to the tracker.
Judith

Judith

14.09.2019 17:36

reporter   ~0011859

...As the whole ticket itself, which is based on low-priority corner case, which is in turn a result of an incorrect way of working with materials.

I don't see dozens of developers complaining about not having something to do here, so tickets like this one aren't helping much.

Issue History

Date Modified Username Field Change
17.08.2019 16:30 VanishedOne New Issue
17.08.2019 16:42 VanishedOne Relationship added related to 0005044
18.08.2019 15:05 VanishedOne Severity feature => normal
31.08.2019 23:14 VanishedOne Description Updated
13.09.2019 05:35 Judith Note Added: 0011845
13.09.2019 15:43 VanishedOne Note Added: 0011847
13.09.2019 18:33 Judith Note Added: 0011849
13.09.2019 19:17 VanishedOne Note Added: 0011850
14.09.2019 09:00 Judith Note Added: 0011852
14.09.2019 14:45 VanishedOne Note Added: 0011855
14.09.2019 15:30 Judith Note Added: 0011856
14.09.2019 17:29 VanishedOne Note Added: 0011858
14.09.2019 17:36 Judith Note Added: 0011859