[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
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

[MOD] Realtime Reflections

Post by Nystul »

----------------------------------------------------------------------------------------------------------------------------------------------------------

Realtime Reflections mod:
newest version - get it from nexus: https://www.nexusmods.com/daggerfallunity/mods/121

old version for dfunity 0.10.24:
https://drive.google.com/file/d/13WxbPi ... sp=sharing

----------------------------------------------------------------------------------------------------------------------------------------------------------
Gallery:
Image
Image
Image
Image
Image
Image
Image
Image

----------------------------------------------------------------------------------------------------------------------------------------------------------
legacy discussion:

I was investigating (realtime) reflections in unity the last couple of weeks since I plan to do a reflection mod.

things that would be nice to have ingame:
  • water reflections for water terrain tiles near the player (should be possible)
  • floor reflections (should as well be possible)
  • outdoor window reflections (may be possible with some restrictions)
  • reflections on every wall (pretty impossible to make it work correctly I fear)
I took a look at: These are my findings on the different techniques in interplay with DFTFU:
All techniques are not cheap in terms of performance, but some are more performant than others, see below:

Planar Reflections:
pros:
  • correct reflections on a plane
  • good quality
  • runtime performance is acceptable
cons:
  • custom shader required (not working with standard shader out of the box)
  • every seperate reflection plane needs an additional render to texture pass (although it is possible to share the rendertextures in reflective surfaces on the same extended virtual plane to a certain degree and even on parallel planes with the same surface normal )
see a screenshot with dummy reflection quads:
Image

Realtime Reflection Probes:
pros:
  • out of the box support of standard shader and unity pipeline (no custom shader necessary)
cons:
  • poor runtime performance (one realtime probe is basically the max already)
  • poor quality
  • per probe only one reflection plane for which reflections are correct (so can effectively only be used for correct floor reflections)
see this screenshot:
Image

Custom Reflection Probes:
pros:
  • out of the box support of standard shader and unity pipeline (no custom shader necessary)
  • acceptable quality
cons:
  • runtime performance better than realtime reflection probes but still not good
  • per probe only one reflection plane for which reflections are correct (so can effectively only be used for correct floor reflections)
see this screenshot:
Image

Screen Space Reflections (ssr):
pros:
  • out of the box support for unity pipeline
  • pretty good runtime performance (everything is done in the fragment shader)
  • reflections in all directions
cons:
  • requires deferred shading
  • ssr method inherent limitations (missing information is the biggest issue)
  • only works indoors well enough (outdoor reflections are mostly wrong due to missing information)
  • heavy artifacts with daggerfall's billboards (see torch and npc reflection in the screenshot)
see this screenshot (please ignore the incorrect shadows on the floor - these are independent of the ssr - i forgot to switch off the sunlight):
Image

There is no best technique as you can see. While it is possible to mix ssr and reflection probes it is not possible to do the same for planar reflections and reflection probes as it seems.
I may go for planar reflections outdoors (since they are the only technique that might allow for the window reflections) and custom reflection probes indoors.
ssr will be a viable option indoors once all billboards have a model replacement...

The nice thing about the reflection probes is that they are fully integrated in the workflow - you can tweak the parameters inside the editor, e.g. smoothness adjustment:
smoothness 1.0:
Image
smoothness 0.8:
Image

So hope it was an interesting read!
I will keep you informed when there is more progress!

User avatar
LypyL
Posts: 512
Joined: Sun Mar 22, 2015 3:48 am

Re: Investigations on Realtime Reflections in Unity

Post by LypyL »

Just....WOW! Holy @#$%! :D That reflective floor in the mages guild looks incredible.

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

Re: Investigations on Realtime Reflections in Unity

Post by Interkarma »

Well that's fairly stunning. I love the mage guild floors also. Great work!

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

Re: Investigations on Realtime Reflections in Unity

Post by Arl »

This is getting fancy, I like it!
My Deviantart page, I have some Daggerfall stuff in there.

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

Re: Investigations on Realtime Reflections in Unity

Post by Nystul »

hmm buildings with a 2nd floor are a big problem for reflection probes... maybe I should give planar reflections a try indoors as well...

User avatar
Arctus
Posts: 60
Joined: Mon Mar 23, 2015 12:28 am

Re: Investigations on Realtime Reflections in Unity

Post by Arctus »

Getting fancy. I'm assuming nothing is reflected for the player though, correct?

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

Re: Investigations on Realtime Reflections in Unity

Post by Nystul »

Arctus wrote:Getting fancy. I'm assuming nothing is reflected for the player though, correct?
you are assuming right. I will be happy if I can get it to work even without the player ;) there are lots of unsolved problems and every approach has its issues :(

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

Re: Investigations on Realtime Reflections in Unity

Post by Nystul »

made some progress today...
reflected billdboards are a bit too dark in contrast to reflected models - no idea where that comes from.
(the texture seams are caused by my dated graphics card)

Image

Image

Image

Image

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

Re: Investigations on Realtime Reflections in Unity

Post by Interkarma »

Wowsers! That is looking HOT!

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

Re: Investigations on Realtime Reflections in Unity

Post by Arl »

Did my eyes just met an ilusion?
Can this be for real?

If I'm in a dream, don't wake me up!
If I'm awake, don't put me to sleep!

(I'm trying to say that this is beyond awesome).
My Deviantart page, I have some Daggerfall stuff in there.

Post Reply