no, it is still the 1000x500 altitude mapUncanny_Valley wrote:That's some great work. I love the progress that you made thus far. Have you increased the resolution of the height map, or is that still the same as before?
[MOD] Distant Terrain
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Project "Increased Terrain Distance"
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
Re: Project "Increased Terrain Distance"
Awesome! Glad that worked out.Nystul wrote:that was an easy fix!Interkarma wrote: Completely ignoring cities for a minute, do nature flats in the wilderness more or less align correctly to the ground at such high terrain scales, or do they float a little also?
If nature flats in wilderness seem to align OK, my first strategy would be to change how a location's vertical position is assigned to work more like nature flats. There's probably a discrepancy between Unity's representation of terrain heights and the calculated average position from source data. The more you scale the terrain, the more the discrepancy is scaled also. The nature flats work differently in that they use SampleHeight() directly from live Terrain. This may yield more accurate alignment of fixed structures than the current method of calculating city height based on source data.
In short, see how nature flats use SampleHeight() in TerrainHelper.cs (line 537) and try to apply this method to cities in StreamingWorld.cs (starting at line 691).
my todo list becomes shorter and shorter
You'd be right on the shadows. I start noticing artifacts after you exceed 1000 units in any direction. I'm sure the other few issues won't be too hard to resolve.Nystul wrote:there are some issues left (but i am not sure if it is a good idea to tackle them before releasing the planned demo, since I don't know how much work is involved in fixing these issues:
-) the sun of Lypyl's Enhanced Sky Mod is in front of the far terrain (not occluded correctly by the far terrain)
-) fog color does not match the color of the enhanced sky - this is especially an issue when it is night and you can see bright grey fog in the night :/
-) in high altitudes false shadows/moire effect pattern type shadows start to appear (I think this is a floating point issue and could be solved by using floating-origin script with y-axis incorporation), see this screenshot:
BTW, that mouse problem is a known issue that I fixed in another project. I must not have moved the fix over to DFTFU yet. I'll make sure this is in the next push.
- Interkarma
- Posts: 7247
- Joined: Sun Mar 22, 2015 1:51 am
- LypyL
- Posts: 512
- Joined: Sun Mar 22, 2015 3:48 am
Re: Project "Increased Terrain Distance"
The sun issue - That's because flares are blocked by collider so without them they will be rendered. I have a potential fix I've been working on for the problem for the horizon without the extended terrain but hopefully it should help most of the time with it as well. Unfortunately it requires turning off the flare layer on the main camera which is probably not viable in the long term as there might be other flares being used down the line...but for the demo and beyond the fix (should) work. The worst case scenario is to just get rid of the flare.Nystul wrote:Interkarma wrote:
-) the sun of Lypyl's Enhanced Sky Mod is in front of the far terrain (not occluded correctly by the far terrain)
-) fog color does not match the color of the enhanced sky - this is especially an issue when it is night and you can see bright grey fog in the night :/
:
the fog - As I pointed out before, I simply haven't gotten to it yet...
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Project "Increased Terrain Distance"
ah ok, I deleted my comment on this, after trying to reproduce it and failing to do soInterkarma wrote: BTW, that mouse problem is a known issue that I fixed in another project. I must not have moved the fix over to DFTFU yet. I'll make sure this is in the next push.
Interkarma wrote: Holy...
There was a little bug in my computation formula that prevented water positions on the mainland to appear, I have fixed that in the meantime
I will try if terrain colliders on the far terrain are the solution. If this all it needs I would be happyLypyL wrote: The sun issue - That's because flares are blocked by collider so without them they will be rendered. I have a potential fix I've been working on for the problem for the horizon without the extended terrain but hopefully it should help most of the time with it as well. Unfortunately it requires turning off the flare layer on the main camera which is probably not viable in the long term as there might be other flares being used down the line...but for the demo and beyond the fix (should) work. The worst case scenario is to just get rid of the flare.
the fog - As I pointed out before, I simply haven't gotten to it yet...
For the fog color: I tried to set fog color according to the cloud colors (in function setTextureColor() in CloudGenerator.cs) - this sometimes works, but often does not give a suitable color to be used as fog color:
Code: Select all
RenderSettings.fogColor = cloudColors.Evaluate(timeRat);
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Project "Increased Terrain Distance"
I have added colliders to the far terrain, though it doesn't seem to work
This is strange because i tried to set them up in the same way as in DaggerfallTerrain.cs
normal terrain occludes the flare, far terrain does not - strange
maybe I did something wrong
anyway, I will finish version 1.2 of my script asap
btw, I would not deactivate the flare in the demo, even if it doesn't get occluded correctly by the far terrain, it looks to good and the problem does not happen that often
edit:
IncreasedTerrainDistance v1.2 is available here (including the optional ImprovedWorldTerrain script):
http://s000.tinyupload.com/?file_id=240 ... 7561644920
here are the other files I have changed in the last weeks - (you will need the changes from StreamingWorld.cs and TerrainHelper.cs for the ImprovedWorldTerrain script to work):
http://s000.tinyupload.com/?file_id=677 ... 8006571323
changes in the WoodsFile.cs were experiments on my side with the woods.wld file (it supports file export now and stores the noisemap data in a separate buffer now)
changes in the ExplorerMode.cs are small: keypress m shows the distance from water map (used this for debugging), I want to show a world map later instead of it, keypress n exports the woods.wld file (to hardcoded path in WoodsFile.cs in function private bool Write()) which one would have to change to the desired output path of course
edit: unfortunately the far terrain positioning suffers from a bug, I thought I solved this already but it seems to strike back in an bitchy way I will update the link when I solved this. Though I can't estimate how long it will take
This is strange because i tried to set them up in the same way as in DaggerfallTerrain.cs
normal terrain occludes the flare, far terrain does not - strange
maybe I did something wrong
anyway, I will finish version 1.2 of my script asap
btw, I would not deactivate the flare in the demo, even if it doesn't get occluded correctly by the far terrain, it looks to good and the problem does not happen that often
edit:
IncreasedTerrainDistance v1.2 is available here (including the optional ImprovedWorldTerrain script):
http://s000.tinyupload.com/?file_id=240 ... 7561644920
here are the other files I have changed in the last weeks - (you will need the changes from StreamingWorld.cs and TerrainHelper.cs for the ImprovedWorldTerrain script to work):
http://s000.tinyupload.com/?file_id=677 ... 8006571323
changes in the WoodsFile.cs were experiments on my side with the woods.wld file (it supports file export now and stores the noisemap data in a separate buffer now)
changes in the ExplorerMode.cs are small: keypress m shows the distance from water map (used this for debugging), I want to show a world map later instead of it, keypress n exports the woods.wld file (to hardcoded path in WoodsFile.cs in function private bool Write()) which one would have to change to the desired output path of course
edit: unfortunately the far terrain positioning suffers from a bug, I thought I solved this already but it seems to strike back in an bitchy way I will update the link when I solved this. Though I can't estimate how long it will take
- LypyL
- Posts: 512
- Joined: Sun Mar 22, 2015 3:48 am
Re: Project "Increased Terrain Distance"
It looks like it still requires disabling the flare layer on the main camera
After a quick check, it looks like removing flare layer from main camera, distance camera, enabling the flare layer on sky camera and adding default layer to the flare's list of ignored layers (or moving the enhanced sky controller so it doesn't intersect with the terrain colliders) makes it work - but I'll need to test it further to make sure.
After a quick check, it looks like removing flare layer from main camera, distance camera, enabling the flare layer on sky camera and adding default layer to the flare's list of ignored layers (or moving the enhanced sky controller so it doesn't intersect with the terrain colliders) makes it work - but I'll need to test it further to make sure.
Is that what's causing the distant terrain to shift / move around weirdly? I didn't recall it happening in 1.1, but I'm not sure if that was the case.unfortunately the far terrain positioning suffers from a bug, I thought I solved this already but it seems to strike back in an bitchy way I will update the link when I solved this. Though I can't estimate how long it will take
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Project "Increased Terrain Distance"
exactly, I am not sure what reintroduced this bug or if it was never really fixed.LypyL wrote: Is that what's causing the distant terrain to shift / move around weirdly? I didn't recall it happening in 1.1, but I'm not sure if that was the case.
one can easy reproduce it by entering high-runspeed-mode with key "h" and running into one direction, after a few blocks it starts to behave weird
edit: this gets more and more mysterious. I tested the new version on my system at work and it worked without any problem out of the box. No terrain shift/move at all. I have to find the difference in the two setups...
edit2: I found the culprit: active floatingorigin script in PlayerAdvanced. Interkarma, where do one have to put this script and activate it. Somehow I found it on 3 different places: PlayerAdvanced, Camera and StreamingWorld - is this correct?
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: Project "Increased Terrain Distance"
that made the trick!LypyL wrote:It looks like it still requires disabling the flare layer on the main camera
After a quick check, it looks like removing flare layer from main camera, distance camera, enabling the flare layer on sky camera and adding default layer to the flare's list of ignored layers (or moving the enhanced sky controller so it doesn't intersect with the terrain colliders) makes it work - but I'll need to test it further to make sure.
- LypyL
- Posts: 512
- Joined: Sun Mar 22, 2015 3:48 am
Re: Project "Increased Terrain Distance"
You can get rid of the terrain colliders on the distant terrain if you want, I've tested that idea I had for a fix and it seems to be working. Any luck with the terrain bug?