Wet Surface Effects (Release 5) - LGhassen/EnvironmentalVisualEnhancements GitHub Wiki

Overview

Starting in release 5 it is now possible to make layers apply a wet surface effect to surfaces, this includes a shiny/wet look, puddles and animated rain ripples.

alt

These work like deferred decals, making surface albedo darker and increasing smoothness, and requires Deferred to work, if Deferred is not installed, the effects won't load at all.

The effect is handled differently for Terrain surfaces, Scenery surfaces (buildings and statics) and parts. Parts only get a wet effect while static surfaces also get puddles and ripples. Terrain and scenery also get different accumulation speeds and limits to avoid the terrain looking flooded while giving tarmac surfaces a properly wet look. The surfaces are distinguished via the stencil values set by Deferred, when using custom part/static shaders they need to use the correct stencil values.

The puddles only apply on horizontal surfaces. The non-puddle wet smoothness effect is applied more strongly on matte non-shiny materials, to emulate how more porous rough materials look when wet, although this is subtle in-game.

Wet surfaces are handled per-planet and are simulated in the background, wetness and puddles will accumulate and dry off-screen at different locations, they also work in time warp and when loading save games to load/simulate the correct state.

alt

Configuration

A single wet surfaces config is added per-planet, cloud layers then define (per-type) how much the current cloud type "feeds" the wet surfaces via a wet surfaces intensity setting in the cloud type. The intensity will also be modulated by the coverage and the time fade settings. No need for the cloud layer to reference the wet surfaces config used, it will automatically find the wet surfaces config that is set for the current planet.

To get started add an EVE_WET_SURFACES_CONFIG object or create one via the wet surfaces manager.

Settings

  • name: The wet surfaces config name.

  • body: The name of the planet to apply this config to (cloud layer on said planet still need to define the wet surfaces intensity).

  • minCoverageThreshold: The coverage value of the cloud layer below which no wet/puddle effects will accumulate.

  • maxCoverageThreshold: The coverage value of the cloud layer where wet/puddle effects will reach max accumulation speed.

  • puddlesTexture: The texture to use for puddles, this should have smooth gradients to allow the puddles to naturally grow and shrink when the puddles accumulate. Note that this texture also gets applied with anti-tiling so it's not tiled in a repeating grid.

  • puddleTextureScale: The scale of the puddles texture.

  • rippleScale: Animated ripples are generated at runtime, this is the scale the entire ripples texture is applied at, not the size of individual ripples.

  • rippleSpeed: Ripple animation speed, default value of 1 feels natural but feel free to adjust.

  • scenery: Settings controlling how the effect is applied on static scenery surfaces (buildings, KSC etc)

    • wetnessAccumulationSpeed: Accumulation speed for the wet effect (darkening+smoothness, applied to all surface orientations)
    • wetnessDryingSpeed: Drying speed for the wet effect, should be lower than accumulation speed.
    • wetDiffuse: The albedo multiplier to darken objects when they get wet, the more shiny the object is the less this is applied.
    • wetSmoothness: The smoothness value to apply to objects when they get wet, the more shiny the object is the less this is applied.
    • puddleAccumulationSpeed: Accumulation speed for the puddle effect, this is only applied to surfaces that are horizontal or very close to perfectly horizontal.
    • puddleDryingSpeed: Drying speed of puddle effect, should be lower than accumulation speed.
    • maxPuddleAccumulation: Max puddle accumulation value, keep below 1 so that the final puddles will still have gaps in them instead of making all surfaces perfectly flooded and wet.
  • terrain: Exact same as above but controlling the effect on terrain surfaces

    • wetnessAccumulationSpeed
    • wetnessDryingSpeed
    • wetDiffuse
    • wetSmoothness
    • puddleAccumulationSpeed
    • puddleDryingSpeed
    • maxPuddleAccumulation
  • craft: Similar settings to the above but wetness only applied on vessels, diffuse and smoothness here should be kept down otherwise crafts become very shiny.

    • wetnessAccumulationSpeed
    • wetnessDryingSpeed
    • wetDiffuse
    • wetSmoothness