Lighting in DF

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
User avatar
jman0war
Posts: 315
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Lighting in DF

Post by jman0war »

Thought i'd post this here.
One of the visually unique aspects of DF, or maybe it's the Xngengine, is the Lighting.

Even though the textures are so low rez and pixelated, one can't but discover a certain quality to the player lighting.
I always enjoyed the Magenta hues you get within a certain range of an object.
I notice this doesn't just happen with the Players light, it also occurs from street lamps.

Image
Find my Vibrant Terrain Flats mod at Nexusmods: https://www.nexusmods.com/daggerfalluni ... ?tab=files

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Lighting in DF

Post by Interkarma »

This is an artifact of the colour-shifting palette used to represent different shades at different times of day (or in different weather conditions). The purple hue is just the closest match the 256-colour palette has at the time to represent attenuated areas of the light.

Daggerfall Unity, while using the same 8-bit source palette, renders in full 32-bit wide colour. This allows for smoothly attenuated coloured lighting across any surface. It also means you can use anything in any scene with any lighting and not worry about the palette spread. For example, Lypyl's enhanced sky couldn't function alongside the standard art set if forced to operate under the same palette limitations.

I understand completely some of these xngine limitations make up part of the original's charm, but this really is just a quirk of Daggerfall's limited shading capability. I wouldn't want to force modders to operate under those limitations and there's no reason they should have to.

The good news is that it's Unity - everything is moddable with a bit of effort. It's no doubt possible to cook up a few scripts and a post-process shader to better simulate those same limitations in Daggerfall Unity. :)

User avatar
jman0war
Posts: 315
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: Lighting in DF

Post by jman0war »

I'd guess it's probably not something to try and imitate, it may produce some problems.
Would it be like walking around inside an invisible orb of Player light, that has a bias of Magenta or Purple hues at certain range?

Would get really annoying as it would colour everything in that hue.
In DF the ground is unaffected, i think it's only vertical faces that seem to be coloured.
Find my Vibrant Terrain Flats mod at Nexusmods: https://www.nexusmods.com/daggerfalluni ... ?tab=files

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Lighting in DF

Post by Interkarma »

jman0war wrote:I'd guess it's probably not something to try and imitate, it may produce some problems.
Would it be like walking around inside an invisible orb of Player light, that has a bias of Magenta or Purple hues at certain range?

Would get really annoying as it would colour everything in that hue.
In DF the ground is unaffected, i think it's only vertical faces that seem to be coloured.
In order to do it properly, the mod creator would need start with Daggerfall's colour translation files and emulate this with a combination of scripting and shaders. To nail it 100% would involve a lot more work.

Just to be clear, I have no plans to create such a mod. I'm just saying it's possible. I understand your affection for this graphical artifact, but do not share it personally. I actually see this purple hue as a lighting glitch, I'm sorry. :)

User avatar
jman0war
Posts: 315
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: Lighting in DF

Post by jman0war »

glitch :o
I never thought of that.

Ah, i suppose one man's aesthetic is another man's glitch. :lol:
Find my Vibrant Terrain Flats mod at Nexusmods: https://www.nexusmods.com/daggerfalluni ... ?tab=files

User avatar
tyhender
Posts: 15
Joined: Thu Feb 23, 2017 5:58 pm

Re: Lighting in DF

Post by tyhender »

OMG, I guess that's because I use some type of patch, but in Vanilla DF through DosBox, I don't have such glitch.

Post Reply