Jump to content
Defunkt

ANZINS Terrain

Recommended Posts

release.jpg

 

This is my terrain shader mod for 1.92 Stable (DX11 only). Essentially it's an implementation of THIS idea and seeks to ameliorate, with varying ambition and success, a couple of gripes I have with the terrain in Arma;

 

Lack of Vibrancy: Between the haze and the washed out satellite textures I've always perceived a real disconnect between the sharp foreground (weapons, characters, vehicles, buildings & clutter) and limp background (everything else).

 

Lack of Texture: Dissatisfaction with the smooth, featureless & fuzzy appearance of terrain in the middle distance is well documented.

 

Additionally there are a couple of PBOs which are fundamental (yet optional) or complimentary to the above goals;

 

Less Haze (addons\haze.pbo): Pushes the atmospheric haze much farther out. I presume BI thought to soften the view distance block but to my mind the default haze hurts far more than it helps.

 

Colour Correction (addons\colour.pbo): With EvilOrgan's kind permission this addon enables his excellent EO_Real_3 preset by default. You probably have your own colour correction preferences so by all means delete this but maybe give it a try first as the mod was tuned for/with it (and my PP Brightness/Contrast/Saturation at 100/125/75 currently).

 

There may be some small improvement to concealment at distance but it wasn't a particular goal.

 

Probably won't be to everyone's taste, ultimately it's just a mathematical formula that treats each terrain pixel based on little more than its original colour so there's a limit to what it can achieve. It will make some things better and others worse - but hopefully more things better. I find the effect generally pleasing and it was fun to learn something about shaders (not to mention brush up on my high school algebra). I'd like to acknowledge material or moral assists by T_D, EvilOrgan and especially kju; beyond the many high-profile projects he's well-known for he's also always helping, advising and connecting modders and patiently sharing his vast knowledge of the game on numerous endeavours.

 

NOTE: As delivered, this addon will maintain your Shadows Distance (at ~200m). This is a mechanism to communicate real time FOV to the terrain shader (so it knows to lighten the terrain detail when it's viewed through high-powered optics).

 

Version 1.1.1 (2019-05-10)
- Fixed banding in light pools on certain terrains.
- Texture blending; stronger detail.
- Texture blending; saturation control.

 

Version 1.1.0 (2019-05-05)
- Fixed messed up normals/parallax on near detail textures.
- Slightly softened detail blending with colour corrected satmap.
- Altered method of enabling post-processing colour corrections (EOReal3).
- Updated incidentally replaced data with that from the 1.92 release.
- Shader features should now never enable for an unconfigured terrain.
- ALTIS: Minimal tweaks to noise (lighter) and colour curve.
- STRATIS: New 2K noise textures (improves view through optics).
- MALDEN: New 2K noise textures. Terrain colour tweak (deeper).
- TANOA: Added initial configuration.
 

Screenshots

 

Armaholic (Thanks!)

 

Workshop

  • Like 20
  • Thanks 7

Share this post


Link to post
Share on other sites

Looks awesome!

I assume one needs to replace the compiled shaders in the arma installation folder or use a DX wrapper for code injection?

Share this post


Link to post
Share on other sites

Hi Neo. Much like with NoBlur back during the alpha the contained dta\bin.pbo supercedes the default shader cache when the mod is loaded.

  • Like 2

Share this post


Link to post
Share on other sites
Just now, mihal190 said:

It works with any terrain?

As he stated it's for Altis & Stratis for now.Can't wait for Tanoa.Just looked at Altis and the vibrancy is unreal.Just imagining what it will do for the rich tropics of Tanoa!

  • Like 2

Share this post


Link to post
Share on other sites
25 minutes ago, miasdad said:

Just imagining what it will do for the rich tropics of Tanoa!

 

Tanoa running EO Real 3...

Spoiler

IP7JJRA.jpg

X70yxe5.jpg

 

 Lythium running EO Real 3...

Spoiler

4KKPVfT.jpg

fxHBS6H.jpg

 

Nice work Defunkt!

  • Like 7

Share this post


Link to post
Share on other sites

Wow! Seems like you have fixed the bland midrange texture problem :drinking2:

  • Like 1

Share this post


Link to post
Share on other sites

One of my pet peeves since the beginning also, many thanks for this project it looks fantastic.

Share this post


Link to post
Share on other sites
1 hour ago, EO said:

Tanoa running EO Real 3..Real 3...

Didn't know about your mod,EO.Where is it?

Edited by miasdad
spelling

Share this post


Link to post
Share on other sites

Guessing this is client side? In that case could you sign the mod and provide the keys? 

 

It looks really good

Share this post


Link to post
Share on other sites

Yeah, as I suspected....awesome

8CNG5aG.jpg

  • Like 12
  • Thanks 1

Share this post


Link to post
Share on other sites
29 minutes ago, Ateir said:

Guessing this is client side?

 

Having just saved an editor mission then looked at the dependencies, it seems to have created none. So at a quick guess I'd say it's client-side.

Share this post


Link to post
Share on other sites

Hi. Awesome mod, improves a lot.
But have you tried looking at distance textures via binocular/scope? They look awful compared to vanilla - pixelized and degraded.

Share this post


Link to post
Share on other sites

Hey all, thanks for the positive comments, gives me warm fuzzies to think that others enjoy the change also.

 

Jeza it hadn't even occurred to me to look at it from that far (my PC would probably explode), looks great. Would be interested to know what CC B/C/S you use.

 

Yes it is client-side only and comes with signatures and a key.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Only Altis & Stratis as yet. Malden also has a treatment but it's pretty easy to miss (wasn't a lot of scope for changes of this nature).

Share this post


Link to post
Share on other sites

Are you planning non vanilla maps, maybe you could make tutorial how to convert map

Share this post


Link to post
Share on other sites
4 hours ago, Malcain said:


But have you tried looking at distance textures via binocular/scope? They look awful compared to vanilla - pixelized and degraded.

 

Could you backup your statement with a screenshot? As this will help the addon maker identify the issue.

  • Like 3

Share this post


Link to post
Share on other sites

I'm currently not maintaining the dev version of the shader described in this post.

 

Spoiler

 

On 12/18/2018 at 10:34 AM, mihal190 said:

Are you planning non vanilla maps, maybe you could make tutorial how to convert map

 

I do mean to do so and share some insights I've acquired in tweaking this but I'm a little stretched time-wise until after Xmas. I'll attempt to give a quick rundown here for any self-starters who're keen enough to nut it out.

 

Having no way to add new shader parameters it instead looks for its settings in the least significant fractions of other existing parameters. For instance the global satmap colour correction for Altis is configured like;


        class WaterExPars : WaterExPars {
            FogGradientCoefs[] = {0.3545, 1.0045, 1.7030};
        };


With 0.0045, 0.0045, 0.0030 being the relevant digits, these are shifted up 2 places and added to 0.50 yielding an RGB correction/multiplier of 0.95, 0.95, 0.80 (and available range 0.50 (half brightness) - 1.50 (half-again brightness)). So for Altis the satmap is darkened mainly by removing some of the blue.

 

The biggest change is that the middetail texture is no longer treated as an RGB overlay but rather as four monochrome channels (RGBA = 0/1/2/3). These are applied based on the satmap pixel's initial colour with the darkest 3rd of pixels getting an overlay mixed between channels 0 & 1 (R & G), the middle 3rd channels 1 & 2 (G & B) and the lightest 3rd channels 2 & 3 (B & A). The initial light/dark evaluation can also be tweaked by factors that consider how colourful the pixel is and also how specifically green it is. There are a couple of other parameters that influence the curve of the pigment evaluation and the shape of the overall distribution. Also intensity of the overlay over distance and a master enable.


        TerrainBlendMaxDarkenCoef = 0.AABB;
        TerrainBlendMaxBrightenCoef = C.DDEE;

        class WaterExPars : WaterExPars {
            ShoreDarkeningMaxCoef = 0.45FF;
            ShoreDarkeningOffset = 0.36GG;
        };

AA Colour evaluation, controls the curve of the pigment evaluation (combines with the following parameter).
BB Colour evaluation application, decides whether coloured/monochrome areas should be treated as lighter or darker and by how much.
C   Master enable; this digit must be non-zero in the current map config to enable the new features (including debug views).
DD Texture intensity over distance, you probably don't want more than 0.10 (maybe stick to 0.09 in case I snaffle the first digit for something else).
EE Overall spread/shape of the distribution, 0.50 is flat (linear).
FF Green evaluation intensity  (combines with the following parameter).
GG Green evaluation application, decides whether green areas should be treated as lighter or darker and by how much.

 

I told you it was 'crazy'.

 

With the 'dev' bin.pbo you can tweak these things and see some debug views in real time but the only way I found to communicate this stuff to the shader is via the camera position (again, *crazy*). You can use the function ANZINS_Fnc_Terrain from the debug console to set the Eden camera coordinates to something the shader will correctly interpret. This debug view can only be turned on/off if Altis or Stratis are currently loaded (because they have a normal map and the EnableSatNormalOnDetail which is the toggle only works in this case) - after which you can switch to another map with debug views still enabled. I have done a little work on making an Eden plugin/dialog which would allow control via sliders but it's probably a while off (if at all).

 


["View", #, 0.AABB, 0.FFGG, 0.DDEE] Call ANZINS_Fnc_Terrain;

 

Where # is a number from 0-12 to enable the following view (communicated by altitude);

 

-2: Turn off the debug view.

-1: Stay in the current mode (but apply new values).

 0: Show the layer mask.
 1: Show the raw satmap.
 2: Show the vanilla application (no CC, middetail treated as RGB).
 3: Show the colour correction (values in this case are 0.RR-0.50, 0.GG-0.50, 0.BB-0.50)
 4: Show the terrain result (CC is as set in the config, not what was last trialed in the mode above).
 5: Show the applied texture.
 6: Show the weight map.
 7: Show the colour contribution to weighting.
 8: Show the green contribution to weighting.
 9: Show the channel distribution/bands (Blue is 0/1, Green is 1/2, Red is 2/3).
    10/11/12 Show the above separately.

 

In each case, if any of the values are less than or equal to 0 or more than or equal to 1 it will instead show the current config values. The entered values are copied to the clipboard (as config entries).

 

It's really clumsy but the only way I could find to tweak in real time. I should say I found this part at least as hard as (and less fun than) revising the shader. It's hard to make/find textures that work well (repeating patterns are your particular enemy). I will post a zip with the bitmaps I've used so far.

 

EDIT: These are the textures I've used thus far; http://www.mediafire.com/file/w1bmgk5tl5eqxbx/channels.7z/file

 

Early results looked better with more organic textures (moss is good) but you might go insane trying to avoid/fix repeating patterns. Eventually I just decided to use mostly fractal/procedural noise. But on certain terrains this may not be such a problem for some channels. When converting your png to paa I think you need to save it with the _mca suffix to ensure the alpha channel is included/full-quality. Not sure if it then needs to be renamed with the _mco suffix but I did.

 

The number in the file name is its overall brightness. You'd want to nail this down for the last channel fairly early on as this is what will be under your roads and runways and you want it to yield (as an overlay to your colour-corrected satmap) brightness that is as close as possible to the road/runway objects that will appear over top as you get closer.

 

 

 

 

  • Like 3
  • Thanks 5

Share this post


Link to post
Share on other sites
6 hours ago, R0adki11 said:

 

Could you backup your statement with a screenshot? As this will help the addon maker identify the issue.


With Anzis mod on:

20181218204349-1.jpg

Without Anzis mod on:

20181218204051-1.jpg

  • Like 1

Share this post


Link to post
Share on other sites

Honestly as a representation of the real world I prefer the first pic but it is interesting that, light/ineffective as it is, the vanilla one is more defined. Probably the difference is that the vanilla texture is 2048 square and I've only been using 1024 - I think perhaps because I found it near impossible to find a good selection of repeating textures at that size. Since then though I've moved toward procedural noise which means that a nice improvement to resolution may well be possible. I'll have a fiddle.

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×