[MOD] Distant Terrain

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
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: Project "Increased Terrain Distance"

Post by Interkarma »

Nystul wrote:
LypyL wrote: 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?
FloatingOrigin should only be attached to the parent player GameObject (peered with player controller like PlayerMotor, this is to clear moving platform logic in controller). Then set the StreamingWorld reference in Inspector. You can also build an array of OtherParents to float other GameObject hierarchies around (you can just ignore this in most cases). I will eventually add an event to FloatingOrigin that triggers when it does its thing to simplify this.

I just checked the demo scene in current build and FloatingOrigin was also attached to Camera (from an older iteration I hadn't cleaned up). I've removed that one now, thanks for letting me know. I don't have it attached to StreamingWorld though, not sure how that one got there.

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

Re: Project "Increased Terrain Distance"

Post by Nystul »

LypyL wrote: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?
yeah, one even has to because it otherwise it can and will happen, that the player starts climbing terrain colliders from the far terrain inside the near terrain distance (far terrain is no longer rendered in the near terrain distance, but it is computed and so are colliders).
As I wrote, the terrain bug was caused by the floating origin script in multiple different places. I have to investigate this further (if my script is compatible with floating origin if the script is only present once, otherwise I have to make it compatible)
Interkarma wrote:
Nystul wrote: 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?
FloatingOrigin should only be attached to the parent player GameObject (peered with player controller like PlayerMotor, this is to clear moving platform logic in controller). Then set the StreamingWorld reference in Inspector. You can also build an array of OtherParents to float other GameObject hierarchies around (you can just ignore this in most cases). I will eventually add an event to FloatingOrigin that triggers when it does its thing to simplify this.

I just checked the demo scene in current build and FloatingOrigin was also attached to Camera (from an older iteration I hadn't cleaned up). I've removed that one now, thanks for letting me know. I don't have it attached to StreamingWorld though, not sure how that one got there.
the floating origin script in streamingworld script was an error on my side. I added it because I thought it belongs to streamingworld...
it would be nice to have a subscribeable event for floating origin update or something similar which i can react to in my script... because I don't want to hack your floating origin script ;)
There would be other situations where this would be handy, e.g. StreamingWorld initialization finished event

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

Re: Project "Increased Terrain Distance"

Post by Interkarma »

You got it, there will be an event soon. I'll make this a priority in the day or two.

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

Re: Project "Increased Terrain Distance"

Post by Nystul »

in the meantime I am playing around with render to texture of the enhanced sky.
first tests are very promising (although performance is not optimal since i am doing a readpixels from the rendertexture to set fog color...)
eventually I want the far terrain tile shader to blend the far terrain into the sky texture - lets see if this works out... ;)

edit:
using a reasonable fog color can make a difference...

Image

User avatar
Uncanny_Valley
Posts: 221
Joined: Mon Mar 23, 2015 5:47 pm

Re: Project "Increased Terrain Distance"

Post by Uncanny_Valley »

That is a really nice screenshot! Very nice indeed! :D

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

Re: Project "Increased Terrain Distance"

Post by LypyL »

That looks gorgeous! Very nice.

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

Re: Project "Increased Terrain Distance"

Post by Arl »

Oh my...

This is beautiful...
My Deviantart page, I have some Daggerfall stuff in there.

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

Re: Project "Increased Terrain Distance"

Post by Interkarma »

So beautiful! Amazing work as always.

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

Re: Project "Increased Terrain Distance"

Post by Nystul »

I managed to blend the far terrain into the horizon. This can be combined with fog or used without fog. Both alternatives yield good results and have their own charm. You might wonder why I consider this an important feature: While fog alone gives a nice distance effect it also renders geometry with fog color as far as the far clipping plane is defined. In terms of the far terrain this is much to much since there is no planet curvature (which would be in theory be possible to do in vertex shader but in praxis will result in a lot of critical other problems, e.g. water level handling). So blending is the "fake way" to simultate far terrain to disappear.
Using the far clipping plane as limit for maximum view distance turned out to be a bad idea since depending on the player's view direction there happens lots of popping in/out of geometry at the clipping border. It is very noticable and ugly. Fading solves this issue with much less other problems.
The only unaesthetic problem arising from blending is that the sun of the enhanced sky will be seen through far away terrain depending on the transparency of the far terrain in front of it.

edit:
this is how it looks like (fog+blending):
Image
standing at the foot of the wrothgarian mountains one should not be able to see the dragontail mountains (since they are about 300 kilometers away) - at least I think so...

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

Re: Project "Increased Terrain Distance"

Post by LypyL »

I got a real appreciation for the scale of the mountains now using the changes with improved terrain... :shock: They're absolutely huge, both vertically and wide/deep. The peaks around (875, 446) is like 23k units high :lol:

Post Reply