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

Re: [MOD] Distant Terrain

Post by Nystul »

I will take a look at the weekend, what could cause the issues. Looks like it will take a bit though to get this sorted out
Freak2121 wrote: Tue Oct 19, 2021 10:40 pm If Nystul is okay with it, I can compile and release it as an update. If not, you can do the changes and compile it yourself. :)
of course, if it works ;)

but I will take a look at everything (especially the terrain transition ring issues) nevertheless ;)

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

Re: [MOD] Distant Terrain

Post by Interkarma »

Thanks Nystul, will be awesome to have your input as well. :) Just hit me up here or in PM if there's anything you need to bounce off me and I'll do what I can do help. Usually we solve this stuff after a small amount of back and forth.

User avatar
Freak2121
Posts: 60
Joined: Fri Sep 08, 2017 6:14 am

Re: [MOD] Distant Terrain

Post by Freak2121 »

For people who want a quick mostly working version (only issue is the watery edges of terrain if you have terrain transitions turned on) then here you go.

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

Re: [MOD] Distant Terrain

Post by Interkarma »

Thanks for sharing rebuild Freak. :) That's a good interim step until the remaining wrinkles are ironed out.

User avatar
Jay_H
Posts: 4062
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: [MOD] Distant Terrain

Post by Jay_H »

I tried it and it's working well on 0.13.1. It causes hanging when combined with Interesting Eroded Terrain, but that's expected. Great work!

User avatar
Freak2121
Posts: 60
Joined: Fri Sep 08, 2017 6:14 am

Re: [MOD] Distant Terrain

Post by Freak2121 »

Jay_H wrote: Fri Oct 22, 2021 6:46 am I tried it and it's working well on 0.13.1. It causes hanging when combined with Interesting Eroded Terrain, but that's expected. Great work!
Are you sure? They work together just fine for me.

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

Re: [MOD] Distant Terrain

Post by Nystul »

Freak2121 wrote: Tue Oct 19, 2021 10:40 pm That got me thinking it's related to the change from gamma to linear colourspace, which was messing with the Interesting Terrains mod. So I looked at Interkarma's solution to that problem, and changed the following line from:

Code: Select all

Line 555: textureTerrainInfoTileMap = new Texture2D(terrainInfoTileMapDim, terrainInfoTileMapDim, TextureFormat.RGBA32, false);
to

Code: Select all

Line 555: textureTerrainInfoTileMap = new Texture2D(terrainInfoTileMapDim, terrainInfoTileMapDim, TextureFormat.ARGB32, false, true);
and now it works!
well this also causes the issue with the Terrain transition ring, a change to line 111 from DaggerfallTerrain.cs (dfunity core file)
from

Code: Select all

tileMapTexture = new Texture2D(tilemapDim, tilemapDim, TextureFormat.ARGB32, false);
to

Code: Select all

tileMapTexture = new Texture2D(tilemapDim, tilemapDim, TextureFormat.ARGB32, false, true);
solves the issue.

But I don't get it what this a) really does and b) why it is necessary. Especially since all other terrain shaders from core work without this change.

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

Re: [MOD] Distant Terrain

Post by Interkarma »

Creating texture as linear is generally needed for non-colour (i.e. data) textures in linear colour space. It's probably just luck the internal tilemap shaders get by and problem only happens when sampling from mod.

I'm happy to make that change in core. I'll spend some time confirming it doesn't affect anything else and push that change.

Edit: Have pushed this change to core now. Terrain tilemap textures will always be created as linear. This is technically most correct as these are data textures not colour textures.

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

Re: [MOD] Distant Terrain

Post by Nystul »

thank you ;)
going to take a look on inverted colors in classic sky next

update: I have found the reason for messed up colors on classic sky - stacked camera HDR setting...

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

Re: [MOD] Distant Terrain

Post by Nystul »

distant terrain 2.9.0 preview build for dfunity 0.13+:
https://drive.google.com/file/d/1IRsQ15 ... sp=sharing

if you guys could try it out and give me feedback

Post Reply