Page 5 of 9

Re: High Resolution Terrain Textures

Posted: Mon Aug 03, 2020 12:48 pm
by TheLacus
I'm making some tweaks to the shader to improve the look of water. Before performing the splatmap mix (i.e. deciding which texture(s) to draw depending on terrain alpha map and height maps - in other words, the opacity of each layer) UV offset for water layer is changed according to time property, apparently moving water "over" other terrain textures. Additionally, water normal map is drawn again but with different (in direction and speed) change to offset. This is a very basic approach, but should also be relatively performant. I made a video to show the result:


Re: High Resolution Terrain Textures

Posted: Mon Aug 03, 2020 1:18 pm
by pango
Hi TheLacus,

I'm glad somebody's giving it a try, that's a problem I've been thinking about for a while but it's not easy to find the right balance between good looking and simple (they're more and more involved ways to render water in beautiful and realistic ways, but it also has to fit the game overall aesthetic), and I dig that video.

Do you also have ideas/plans for sea water?

Re: High Resolution Terrain Textures

Posted: Tue Aug 04, 2020 12:01 am
by Dalebvr
Very good look on the snowed over roadways. I've seen that effect on cobbles where there is some traffic.

Re: High Resolution Terrain Textures

Posted: Wed Aug 05, 2020 5:07 pm
by TheLacus
pango wrote: Mon Aug 03, 2020 1:18 pm Do you also have ideas/plans for sea water?
It uses the same texture so it's already working. There is a seam because the transition tile is on a terrain and the sea on another...

Re: High Resolution Terrain Textures

Posted: Sat Aug 08, 2020 11:42 am
by King of Worms
Very good job on the water shader, finally its not static :)

Re: High Resolution Terrain Textures

Posted: Sun Aug 16, 2020 8:48 pm
by TheLacus
EDIT removed old downloads

Re: High Resolution Terrain Textures

Posted: Sun Aug 16, 2020 9:09 pm
by King of Worms
Great job mate. Im glad u managed to simulate wet surfaces, that was a thing I wanted for quite some time. Lovely mod!

Re: High Resolution Terrain Textures

Posted: Mon Aug 17, 2020 6:05 am
by pango
I love it!

Question, I used it with Realtime Reflections, and the water didn't look reflexive. That helps a lot identifying water as water, can it be fixed?

Re: High Resolution Terrain Textures

Posted: Thu Aug 20, 2020 2:29 pm
by DolorousJohn
Popped into the editor with it to take a look, absolutely beautiful, cant wait to see the finished product.

Re: High Resolution Terrain Textures

Posted: Tue Aug 25, 2020 8:57 am
by Nystul
pango wrote: Mon Aug 17, 2020 6:05 am I love it!

Question, I used it with Realtime Reflections, and the water didn't look reflexive. That helps a lot identifying water as water, can it be fixed?
if you use a custom shader (instead of the standard shader, and outdoor tilemap shaders are custom shaders) then we need a variant of this shader in the realtime reflections mod that blends in the planar reflections.
the mod computes the planar reflections automatically by injecting into the scriptable render pipeline (2 reflection textures, one for the floor level and the sea level), for all materials with Standard shader the blending is done automatically but for custom shaders the blending in the final shader has to be done by the shader (just lerping the normal texture with the reflection texture). This last step is the reason my mod replaces e.g. normal terrain shader with a variant of it which does this blending. The variant has some additional shader variables (e.g. the reflection textures) that it needs to perform the blending. That is also the reason that I feel it should be done in the realtime reflections mod since it does only make sense there imo.

update: ok, I took a look - your mod uses a Standard-heightblend shader - I will take a look and see if I can make my mod compatible with this shader - might take some time though

@TheLacus: is there a version of your mod's code on github somewhere? would help to see how this Standard-heighblend shader is set up - is one of unity's build-in shaders? do the ground textures come with metallic gloss maps? (or did you just add them for the tests with the reflection probes? if so can you provide a dfmod package for me with ground textures with metallic gloss map textures included)