View Issue Details

IDProjectCategoryView StatusLast Update
0004683The Dark ModGraphicspublic02.12.2017 08:25
ReporterSpooks Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
OSWindowsOS Version7 
Product VersionSVN 
Fixed in VersionTDM 2.06 
Summary0004683: ambientCubicLights have no falloff
DescriptionThe abmientCubicLight light types have no falloff and appear glitched in 2.06. This problem does not affect the cubicLight lights. A screenshot of the problem and a testmap could be found in this post: http://forums.thedarkmod.com/topic/18282-tracker-3881-cubemap-lighting-beta/?p=414721
Additional InformationMy videocard is an nVidia GTX 950 running driver version 388.31 -- context which I feel is important.
TagsNo tags attached.
Attached Files
broken cubic light.jpg (881,359 bytes)

Activities

duzenko

duzenko

25.11.2017 15:08

developer   ~0009700

The falloff texture slot is being used for ambient specular component.
How do you pass the falloff texture in light material? That link only has the .map file.
Spooks

Spooks

25.11.2017 15:17

reporter   ~0009702

As far as I know, when cubemap lights were introduced they were an import of Sikkpin's shader and came with (preprogrammed?) spherical falloff - I don't think they have a falloff texture.

I don't wish to mince terms here, to be fair I don't know if falloff or lack thereof is the exact cause of this graphical artifact. It's the best word I could use to describe the clipping behavior the lights exhibit when viewed by the player.

I've seen a graphical glitch like this in earlier versions of TDM and from what I remember the cause was the vertex/fragment programs. Vague, I know, but I hardly know the math behind those.
duzenko

duzenko

01.12.2017 21:20

developer   ~0009721

Last edited: 01.12.2017 21:21

I gave it some thought and I kinda need a mapper to decide here for me.
Do we need falloff at all for ambient lights (even cubic)?
Do we want shader-level spherical falloff for cubic ambient light?
Do we want shader-level falloff to be linear, quadratic or XXX?
At this point I would prefer it over adding another texture.
The clipping here is a result of the scissor optimization, that clips screen space based on rough estimation of the light bounding box.

Spooks

Spooks

02.12.2017 00:21

reporter   ~0009723

Last edited: 02.12.2017 00:25

The current "2D projection + 1D falloff image" method affects ambient lights the same as normal lights. I did a quick test and an ambient light with the same projection texture does look different with and w/o a falloff. Removing that would affect how already released missions look (and possibly even play) in a negative way, so yes, we need it.

A caveat: most common ambient lights in TDM use their 2D projection texture as their 1D falloff texture through the "lightFalloffImage makeIntensity( tex )" keyword. I don't know how that factors into memory usage, but I mention it if you are concerned about footprint.

As far as cubic ambient lights are concerned, I really cannot say. In my opinion they are, at this point, not that useful to mappers until a system is built around them, so that a mapper can utilize cubemaps (or irradiance maps, now) in environments of any size, shape, or form. Much like a normal ambient light "leaking" through walls, ambient cubic lights will show cubemaps through walls, which looks very jarring.

Normal cubic lights (eg cubegrate6, tdm_lampshade_cubic) have had spherical falloff so far, which I find agreeable. I am a fan of quadratic, but that usually means a larger light radius to compensate for the exponential function, which in turn means more shadow draws and worse performance.

The problem here is I cannot imagine anything BUT a shader-level falloff implementation for cubic lights. If you would offer an example of how a texture - be it a 1 pixel strip or a 2D one - would factor into a cubemap's falloff, I'd love to hear it. The easy bit about our current lights is that the 2D light textures, for the most part, act as the attenuation for the light, but that just doesn't fly with cubic lights.

e: As this is a dialogue at present, I'd like another mapper with experience with falloff and light properties to chip in. I'm working off a lot of hypotheticals, because cubic lights have not seen wide use yet and do not have much light texture assets associated with them.

duzenko

duzenko

02.12.2017 08:25

developer   ~0009724

At revision: 15102

Issue History

Date Modified Username Field Change
25.11.2017 14:55 Spooks New Issue
25.11.2017 14:55 Spooks File Added: broken cubic light.jpg
25.11.2017 15:08 duzenko Note Added: 0009700
25.11.2017 15:17 Spooks Note Added: 0009702
29.11.2017 09:04 duzenko Assigned To => duzenko
29.11.2017 09:04 duzenko Status new => assigned
01.12.2017 21:20 duzenko Note Added: 0009721
01.12.2017 21:21 duzenko Note Edited: 0009721
02.12.2017 00:21 Spooks Note Added: 0009723
02.12.2017 00:25 Spooks Note Edited: 0009723
02.12.2017 08:25 duzenko Note Added: 0009724
02.12.2017 08:25 duzenko Status assigned => resolved
02.12.2017 08:25 duzenko Fixed in Version => TDM 2.06
02.12.2017 08:25 duzenko Resolution open => fixed