Page 57 of 60

Re: [MOD] Distant Terrain

Posted: Wed Oct 20, 2021 7:35 pm
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 ;)

Re: [MOD] Distant Terrain

Posted: Wed Oct 20, 2021 10:55 pm
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.

Re: [MOD] Distant Terrain

Posted: Thu Oct 21, 2021 3:17 am
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.

Re: [MOD] Distant Terrain

Posted: Thu Oct 21, 2021 11:05 pm
by Interkarma
Thanks for sharing rebuild Freak. :) That's a good interim step until the remaining wrinkles are ironed out.

Re: [MOD] Distant Terrain

Posted: Fri Oct 22, 2021 6:46 am
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!

Re: [MOD] Distant Terrain

Posted: Sat Oct 23, 2021 6:00 am
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.

Re: [MOD] Distant Terrain

Posted: Sun Oct 24, 2021 3:00 pm
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.

Re: [MOD] Distant Terrain

Posted: Sun Oct 24, 2021 10:05 pm
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.

Re: [MOD] Distant Terrain

Posted: Mon Oct 25, 2021 7:41 am
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...

Re: [MOD] Distant Terrain

Posted: Tue Oct 26, 2021 12:21 pm
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