Page 6 of 13

Re: Investigations on Realtime Reflections in Unity

Posted: Mon Sep 12, 2016 9:54 pm
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.

Re: Investigations on Realtime Reflections in Unity

Posted: Tue Sep 13, 2016 7:58 am
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)?

Re: Investigations on Realtime Reflections in Unity

Posted: Tue Sep 13, 2016 2:37 pm
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".

Re: Investigations on Realtime Reflections in Unity

Posted: Tue Sep 13, 2016 10:12 pm
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 2459 times
Edit #2: Added shadows to interior point lights. Updated git.
interior-shadows-1.jpg
interior-shadows-1.jpg (90.77 KiB) Viewed 2457 times
interior-shadows-2.jpg
interior-shadows-2.jpg (175.33 KiB) Viewed 2457 times
interior-shadows-3.jpg
interior-shadows-3.jpg (121.64 KiB) Viewed 2447 times

Re: Investigations on Realtime Reflections in Unity

Posted: Wed Sep 14, 2016 12:12 am
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 2451 times

Re: Investigations on Realtime Reflections in Unity

Posted: Wed Sep 14, 2016 3:40 am
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.

Re: Investigations on Realtime Reflections in Unity

Posted: Wed Sep 14, 2016 5:28 am
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.

Re: Investigations on Realtime Reflections in Unity

Posted: Wed Sep 14, 2016 8:16 am
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

Re: Investigations on Realtime Reflections in Unity

Posted: Wed Sep 14, 2016 11:42 am
by Interkarma
Cool, I'm glad you like it. :)

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

Re: Investigations on Realtime Reflections in Unity

Posted: Wed Sep 14, 2016 8:14 pm
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. :)