[MOD] Realtime Reflections
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Investigations on Realtime Reflections in Unity
i'm quite surprised how natural the reflections feel - don't want to miss them anymore...
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Investigations on Realtime Reflections in Unity
ReflectionsMod version 0.2:
outdoor ground and sea reflections
indoor reflections in some buildings (check out daggerfall castle)
https://drive.google.com/file/d/0B1QjwG ... sp=sharing
installation:
without the enhanced sky mod reflections are pretty dark...
outdoor ground and sea reflections
indoor reflections in some buildings (check out daggerfall castle)
https://drive.google.com/file/d/0B1QjwG ... sp=sharing
installation:
- import the package
- drag&drop prefab ReflectionsMod into the hierarchy at root level
- add this function to MaterialReader.cs:
Code: Select all
public bool SetCachedMaterial(int archive, int record, int frame, CachedMaterial cachedMaterialIn, int alphaIndex = -1) { int key = MakeTextureKey((short)archive, (byte)record, (byte)frame); if (materialDict.ContainsKey(key)) { materialDict[key] = cachedMaterialIn; return true; } else { return false; } }
- if you are using the game branch of DFTFU change lines "using DaggerfallWorkshop.Demo;" into "using DaggerfallWorkshop.Game;"
without the enhanced sky mod reflections are pretty dark...
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Investigations on Realtime Reflections in Unity
This is great, thank you for the update.
- epicurius7
- Posts: 11
- Joined: Sun Aug 02, 2015 4:18 am
Re: Investigations on Realtime Reflections in Unity
We need a 'Muddy Footprints' mod now, and janitors that shout 'halt!'Interkarma wrote:That is beautiful! I actually feel sorry for the fictional cleaners who have to keep that level of shine with grubby adventurers stomping all through the place.
- LypyL
- Posts: 512
- Joined: Sun Mar 22, 2015 3:48 am
Re: Investigations on Realtime Reflections in Unity
Looking good! One thing I was thinking of that would be a nice touch is when stores / guilds /temples are implemented, would be to make it so that lower quality buildings have non-reflective floors and increase the reflection strength as the quality increases.
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Investigations on Realtime Reflections in Unity
nice ideaLypyL wrote:Looking good! One thing I was thinking of that would be a nice touch is when stores / guilds /temples are implemented, would be to make it so that lower quality buildings have non-reflective floors and increase the reflection strength as the quality increases.
should be possible to extend the script in some way then
will be challenging to make reflections look good on wooden floor textures
I am not too happy with the way i calculate the output color by combining albedo and reflection color in the shader - I wonder how it is done in the standard shader for the reflection probes. I tried to understand what is going on in there but I need to spend more time on it.
It was a struggle to get textures without reflections to look similar bright compared to textures with reflections. Just alpha-blending didn't do the trick...
I want to support optional custom metal/smoothness maps for textures in the next version, so that parts of a texture can be more reflective/smooth than other parts. Just have to find the time to implement it
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Investigations on Realtime Reflections in Unity
update:
ReflectionsMod version 0.24:
outdoor ground and sea reflections
indoor reflections in some buildings (check out daggerfall castle)
0.24 changes:
shadows are working again correctly now
0.23 changes:
lots of bugfixes, improvements
outdoors:
installation:
without the enhanced sky mod outdoor reflections are pretty dark...
ReflectionsMod version 0.24:
outdoor ground and sea reflections
indoor reflections in some buildings (check out daggerfall castle)
0.24 changes:
shadows are working again correctly now
0.23 changes:
lots of bugfixes, improvements
outdoors:
- no more pink shaders on terrain tiles when loading new terrains
- working with FloatingOrigin and PositionUpdate script now, still working without also
- location reflections can be seen from other map pixels as long as it is the largest neighbor location and no location is at the current player location's map pixel
- reflection plane determination for lower level is now more robust
- much less cases where lower level reflection plane computation is wrong
- holes in walls, floors in daggerfall's indoor geometry are handled correctly much more often
- mages guild with 4 floors also works now
- reflections "around the corner" work now in most cases
installation:
- import the package
- drag&drop prefab ReflectionsMod into the hierarchy at root level
- add this function to MaterialReader.cs:
Code: Select all
public bool SetCachedMaterial(int archive, int record, int frame, CachedMaterial cachedMaterialIn, int alphaIndex = -1) { int key = MakeTextureKey((short)archive, (byte)record, (byte)frame); if (materialDict.ContainsKey(key)) { materialDict[key] = cachedMaterialIn; return true; } else { return false; } }
- if you are using the game branch of DFTFU change lines "using DaggerfallWorkshop.Demo;" into "using DaggerfallWorkshop.Game;"
without the enhanced sky mod outdoor reflections are pretty dark...
- LypyL
- Posts: 512
- Joined: Sun Mar 22, 2015 3:48 am
Re: Investigations on Realtime Reflections in Unity
Awesome work!
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Investigations on Realtime Reflections in Unity
working hard to get version 0.3 out as soon as possible...
metallic gloss map in action (ok, maybe I overshot a bit with the reflectivity on the floor texture):
metallic gloss map in action (ok, maybe I overshot a bit with the reflectivity on the floor texture):
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Investigations on Realtime Reflections in Unity
Looking great as usual!