[MOD] Realtime Reflections

A curated forum for compatible and maintained mods. Users are unable to create new topics in this forum but can reply to existing topics. Please message a moderator to have your mod moved into this forum area.
Post Reply
User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Investigations on Realtime Reflections in Unity

Post by Interkarma »

My problem with full ambient is that it makes everything look flat (all surfaces are equally bright regardless of facing). Although that's how Daggerfall's interiors actually look, so I'm pretty much OK with it for now if that solves your issue.

You don't want to set globally ambient from the Lighting panel though. That will make everything fullbright, even outside at night. There's a script attached to the Player object called PlayerAmbientLight which controls ambient light levels based on context, weather, and season. Just need to change the Interior Ambient Light property to a higher value and disable the interior three-point lighting rig.

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Investigations on Realtime Reflections in Unity

Post by Nystul »

Interkarma wrote:My problem with full ambient is that it makes everything look flat (all surfaces are equally bright regardless of facing). Although that's how Daggerfall's interiors actually look, so I'm pretty much OK with it for now if that solves your issue.
this is true, but also the directional light/lightrig approach is not really satisfying - take for example the staircase in the screenshot. it is shadowed though it should be lit since it is exposed to the light from the lamp. I know currently there is no way to do so - but I just want to point out that also the light rig has its issues.
The best approach imho would be to have a brighter ambient setting together with the correct light sources implemented. Though I have to admit that this will impact performance a bit (see the difference in fps between castle daggerfall, where light sources are present and interiors where they are not. It is quite noticeable)
Interkarma wrote: You don't want to set globally ambient from the Lighting panel though. That will make everything fullbright, even outside at night. There's a script attached to the Player object called PlayerAmbientLight which controls ambient light levels based on context, weather, and season. Just need to change the Interior Ambient Light property to a higher value and disable the interior three-point lighting rig.
yeah, I found that script already. Am I allowed to propose some minor changes to it with the next pull request (still some days or weeks ahead of us)?

User avatar
Xaphir
Posts: 85
Joined: Sat Jul 16, 2016 12:55 pm

Re: Investigations on Realtime Reflections in Unity

Post by Xaphir »

Nystul wrote:..... but also the directional light/lightrig approach is not really satisfying - take for example the staircase in the screenshot. it is shadowed though it should be lit since it is exposed to the light from the lamp. I know currently there is no way to do so - but I just want to point out that also the light rig has its issues.
The best approach imho would be to have a brighter ambient setting together with the correct light sources implemented. Though I have to admit that this will impact performance a bit (see the difference in fps between castle daggerfall, where light sources are present and interiors where they are not. It is quite noticeable)
I've noticed the inconsistencies as well from lighting sources; I expect shadows to be a result of where the game shows the light sources to be. From hearing you guys talk this sounds like a conundrum of sorts, but I hope it can eventually be worked out where the light is generated from where the light sources are, and the shadows are "real".

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

Re: Investigations on Realtime Reflections in Unity

Post by Interkarma »

It's not hard to add point lights on top of lit interior light sources. If this is something you guys will enjoy, I'll make some time to implement. Performance hit will be minor as interiors are very small.

Edit: Took about 5 minutes. I've added point lights to interior light billboards, removed three-point rig, and doubled the ambient light. Changes are on git now. Let me know your feedback and we can refine from there.
interior-lights.jpg
interior-lights.jpg (151.19 KiB) Viewed 4521 times
Edit #2: Added shadows to interior point lights. Updated git.
interior-shadows-1.jpg
interior-shadows-1.jpg (90.77 KiB) Viewed 4519 times
interior-shadows-2.jpg
interior-shadows-2.jpg (175.33 KiB) Viewed 4519 times
interior-shadows-3.jpg
interior-shadows-3.jpg (121.64 KiB) Viewed 4509 times

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

Re: Investigations on Realtime Reflections in Unity

Post by Interkarma »

As a tangential change, I've added an INI option to enable point light shadows in dungeons. This includes a script to disable dungeon lights outside of a certain range (just over block footprint) to remove some of the overhead.

Seems to perform well overall on my system, but does drive the render time from ~1ms to ~9ms in highly lit areas (shadows are expensive). But still perfectly OK for systems that can handle lots of draw.
dungeon-shadows-1.jpg
dungeon-shadows-1.jpg (87.8 KiB) Viewed 4513 times

User avatar
Arl
Posts: 202
Joined: Sun Mar 22, 2015 10:57 am

Re: Investigations on Realtime Reflections in Unity

Post by Arl »

Oh, this is great!, I always knew that shadows would give dungeons a real enhancement on their grim look. I think there are some campfires which would also benefit from this, but would require some source of an animated light to look convincing.

Also, what happened with your "automated normal map" stuff? that would be great now with shadows.
My Deviantart page, I have some Daggerfall stuff in there.

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

Re: Investigations on Realtime Reflections in Unity

Post by Interkarma »

Phobos Anomaly wrote:Oh, this is great!, I always knew that shadows would give dungeons a real enhancement on their grim look. I think there are some campfires which would also benefit from this, but would require some source of an animated light to look convincing.
Cheers. Agreed, it would be nice to enhance those burning light sources with a bit of algorithmic flame motion to the light.
Phobos Anomaly wrote: Also, what happened with your "automated normal map" stuff? that would be great now with shadows.
It's still in the tool side of things. I don't use it with Daggerfall Unity because it substantially increases procedural scene generation time. I need either a faster setup or a caching scheme. It's something I can revisit later. Right now core gameplay is still my highest priority.

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: Investigations on Realtime Reflections in Unity

Post by Nystul »

oh wow! looks fantastic - have to try it out now :)

edit: having lights is great! The feeling is 300% better than before. don't want to miss them (and the shadows)

even without reflections mod it is possible to get ight probe reflections now (if you attach a metallicglossmap for example) - and it looks amazing:

Image

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

Re: Investigations on Realtime Reflections in Unity

Post by Interkarma »

Cool, I'm glad you like it. :)

The gloss map looks great. Looking forward to see where you take it from here.

User avatar
Xaphir
Posts: 85
Joined: Sat Jul 16, 2016 12:55 pm

Re: Investigations on Realtime Reflections in Unity

Post by Xaphir »

Nystul wrote:oh wow! looks fantastic - have to try it out now :)

Having lights is great! The feeling is 300% better than before. don't want to miss them (and the shadows)

even without reflections mod it is possible to get ight probe reflections now (if you attach a metallicglossmap for example) - and it looks amazing...
I agree, this is frakking fantastic! Luv it and want some more of it.

Interkarma - the 'realism' effect just took a quantum leap. :)

Post Reply