@Interkarma: working on an updated version of my DistantTerrain mod (and making it compatible with Uncanny Valley's "Mountains And Hills" mod).
I realized that we will run into problems with terrain samplers not using a baseHeightScale and noiseMapScale equal to DefaultTerrainSampler. Luckily it seems that Uncanny Valley's mod uses same scale factors as DefaultTerrainSampler (8.0, 4.0 which add up to a scaling factor of 12.0).
To get matching near terrain and far terrain I have to scale the small height map with this factor (I just assume it to be 12.0 for the moment).
Now what happens if the terrain sampler function GenerateSamples generates height samples with different scale is that this won't fit far terrain height values of DistantTerrain mod.
A workaround to support custom terrain samplers with different scale factor would be to introduce a settings float value for distant terrain mod. This would work but would require the user to know the correct values for the terrain sampler in use.
A better way would be if distant terrain mod could get the scale factor from the terrain sampler (like with properties MaxTerrainHeight, OceanElevation and BeachElevation)
What are your thoughts about this?
Re: [MOD] Distant Terrain
Posted: Thu Jun 14, 2018 10:21 pm
by Interkarma
I understand, and I'd be happy for the ITerrainSampler interface and base class to expose this property so others can use it.
I'm happy for you to add this so it suits your needs precisely, but just let me know if any assistance required.
Interkarma wrote: ↑Thu Jun 14, 2018 10:21 pm
I understand, and I'd be happy for the ITerrainSampler interface and base class to expose this property so others can use it.
I'm happy for you to add this so it suits your needs precisely, but just let me know if any assistance required.
Ok, I will work on it Will try to coordinate with Uncanny Valley so I do not break his mod
Interkarma wrote: ↑Thu Jun 14, 2018 10:21 pm
I understand, and I'd be happy for the ITerrainSampler interface and base class to expose this property so others can use it.
I'm happy for you to add this so it suits your needs precisely, but just let me know if any assistance required.
Ok, I will work on it Will try to coordinate with Uncanny Valley so I do not break his mod
Thank your for your consideration. My plan is to update my mods over the weekend, and if there anything I can fix or change on my end to improve compatibility, just let me know.
Re: [MOD] Distant Terrain
Posted: Sat Jun 16, 2018 9:21 am
by Nystul
ok, so here is what my latest pull request does and how you can update your mod to work with next version of Distant Terrain mod:
here is a copy of the comment of the pull request:
new property MeanTerrainHeightScale and new method TerrainHeightScale added
default use is fixed terrain height scale factor - set MeanTerrainHeightScale in constructor (SimpleTerrainSampler, NoiseTerrainSampler, DefaultTerrainSampler)
more sophisticated use: terrain height scale factor depends on map pixel position - override for method TerrainHeightScale(x,y) happens in this case (used by Distant Terrain Mod's Improved Terrain Sampler)
what you will have to do (once the pull request is accepted) is to add a line to the constructor of your terrain sampler like in DefaultTerrainSampler:
EDIT: My bad. Enhanced Sky just doesn't work with the current build of DFU.
Re: [MOD] Distant Terrain
Posted: Mon Jul 09, 2018 10:29 pm
by Interkarma
Nystul is working on an update for Enhanced Sky that's compatible with latest version. It's still a work in progress, but you can download best available version from this post (last post on that page).