[Graphical pass] Sky-mapped environmental (cube) maps and under-water reflections.

BoffBoff Sweden Join Date: 2018-08-12 Member: 242804Members Posts: 34 Advanced user
Probably already on your agenda list or in the back of a dev's mind somewhere for the (intended) polish pass later on.
And it's been a while since I've messed around with Unity (and when I did, it's definitely wasn't AAA game publishing), so please accept my amateur perspective with several pinches of salt (each the size of a mountain).

Specular highlights
These are the shiny reflections that can come from Point / direct lights and player flashlights and are views from the players perspective.

Then there are the environmental cube maps, which "generally" can be defaulted to the sky-map.
Unity provides a real-time mirroring from the "players perspective" now, but there is a variable - a texture that just doesn't fit.

The skymap
The skymap is a global environmental cube-map (for the old renderers) and was an issue for "day-night" cycles as cube-maps were pre-calculated at various points in the geometry prior to run-time as where the light maps and giving the lightmaps we all know an love....

Day-night cycles had two sets of Skymaps to "pick from" with lights on/off render, and the specular highlights from the direct Sunlight sold the effect.

Below Zero Weather-Cycle

Below Zero has this amazing weather cycle (combines with Fog and particle effects this is amazing work by-the-way).
But it's breaking the reflections a bit.
Hey it's wip and a beta.

So naturally, the dynamic weather layers an overlayer(?) and not part of the render at the moment.

But it's giving some odd effects,

When under-water, the texture renders a bright day (as that's the default skymap but also with regards to the day-night-cycle in the original Subnautica)
But when you come up it's overcast and stormy.

Dynamic reflections in the vehicles and bases don't take in the sky-terms so well.
Props and entities, shiny items like Crystal and salt deposits are super-bright under the base-"daylight" component

soooooo..... fixing these issues with the same solution.

You need a dynamically updating cube maps which constantly recompiles, recomputes and updates in real-time
or
Ray-trace the whole thing might be easier
or
Create Pre-rendered sequential lists of Cube-maps of each Weather Cycles. Like a sprite map but for the sky-box cube-map.

So as the weather changes, for the animated weather overlay, then the appropriate pre-baked weather cube-map is picked automatically by the renderer giving the illusion of a real-time environmental texture.
Giving a more consistent look.

If you want to get "REALLY AMBITIOUS" - you might need to chat to Unity rendering team.
An Alpha component to sprite-map-textures for the cube-maps.
This gives the engine possibility to mix multiple transparent textures (for the cube maps) on the fly, like we would do with other texture based shaders, as long as we had a default "solid" colour/texture as a backup.
So you could mix/tint on the fly.
- Multiple local "environmental" cube maps for geometry (with transparency for the sky) - This which would have to be tinted for the direct light condition to approximate, sunset/daytime/moonlight.
- A global The weather effect alpha'd spritemap so the original skymap can show through
- Base-Day-night Cycle Sky-map/cube map.

Time to grab some interns and geniuses.


Comments

Sign In or Register to comment.