Rebuilt underwater rendering
Volumetric fog that reads real scene depth through the surface, and god rays from the sun that stay anchored in the world instead of smearing as the camera moves.
Included in Oceanology Pro, Oceanology Lite and Riverology 3.
Underwater used to be a post-process material doing its best impression of fog: an ambient falloff, a refraction distortion, and god rays faked from a radial mask with a hardness and a radius. Oceanology Pro replaces the guessing with data. A scene view extension runs native render passes each frame and publishes what the renderer actually knows, namely the volumetric fog froxel, real light shafts, and the scene depth behind the water surface, into render targets that the underwater post-process material samples. The material stops approximating and starts compositing.
What the native passes publish
- A fog render target holding per-pixel volumetric inscatter in RGB and transmittance in alpha. The pass samples the engine's own froxel at each pixel's scene depth using the engine's own combine function, and writes it linear with pre-exposure removed and non-finite values scrubbed. It is auto-sized to the active view.
- A packed render target: red is scene depth with the water quadtree excluded, stored in metres so distant receivers and the sky do not clamp; green is the engine sun-halo luminance; blue is light-shaft bloom luminance; alpha is the light-shaft sun-occlusion mask.
- Real light shafts. The plugin re-renders the engine's own light-shaft technique, downsampling to a bloom and occlusion seed, running several radial blur passes toward the sun with a growing step, then finishing the occlusion curve, into its own target. It is engine-quality without the engine's temporal history, so there is no one-frame lag and no resolution reset when the view changes.
- Optionally, a Heterogeneous Volumes re-composite after the underwater material, so 3D smoke is not swallowed by the fog.
Seeing past the water surface
The hardest part of underwater fog is that the water surface itself is in the depth buffer, so fog and shafts stop at the surface instead of continuing to the receiver behind it. Pro captures a second depth view with Oceanology's Single Layer Water quadtree hidden, identified by a component tag rather than by CustomDepth or stencil so your water material never has to enter the engine's CustomDepth pass, and resolves the two depths together. Because the main view is temporally jittered and the capture is not, the resolver projects each pixel back through the jitter before comparing, with a tolerance sized to half-float precision so distant geometry is never misread as a water silhouette.
The material side
On the material side the fog is genuinely two-layer, matching a real Exponential Height Fog. The froxel covers the near range up to the volumetric fog max distance; beyond it a full port of the engine's analytic exponential height fog takes over, with the ranges explicitly excluded so the two never double-count. That port honours the same project shader defines the engine does, for sky atmosphere affecting height fog and for exponential fog matching volumetric fog, and covers two fog layers, start and end distance, max opacity, cutoff distance, a directional sun halo with either a cosine lobe or a Henyey-Greenstein phase, sky atmosphere ambient and two directional lights. Each water body still owns its own underwater post-process material and settings, with priority, blend radius, blend weight and a full post-process settings block, so a murky lake and a clear ocean can look completely different without touching the global pipeline.
Controlling it
- Project Settings, under Plugins, Oceanology Underwater Rendering: the master enable, light-shaft quality, the Heterogeneous Volumes recomposite, water-quadtree exclusion and its tag, and editor and PIE diagnostic warnings that never appear in Shipping.
- Blueprint: an Underwater Rendering function library with runtime setters for the master switch, light shafts, volume fog and tag exclusion, plus a reset back to the project settings.
- Console: r.Oceanology.Underwater.Enable, .LightShafts, .VolumeFog and .ExcludeByTag each take -1 for the project setting, 0 to force off and 1 to force on, alongside .LightShaftBloomMaxBrightness and .LightShaftWaterSunSeed.
Compared with Oceanology NextGen
| Feature | Oceanology NextGen | Oceanology Pro |
|---|---|---|
| Fog source | Material-side ambient fog approximation | Engine volumetric froxel sampled per pixel into a linear render target, with an analytic height-fog port beyond the froxel range |
| God rays | Material parameters shaping a radial mask, with knobs like mask radius, mask hardness and god-ray height fade | The engine's light-shaft technique re-rendered natively into a dedicated target, with no temporal history |
| Water surface in the depth buffer | The water quadtree clipped what the underwater effect could see | A tag-excluded depth capture supplies the receiver behind the surface |
| Volumetric smoke | Not handled | Optional Heterogeneous Volumes recomposite after the underwater material |
| Light shaft downsample factor | 1 (range 1 to 8) |
|---|---|
| Light shaft samples | 12 (range 4 to 32) |
| Light shaft blur passes | 3 (range 1 to 4) |
| Light shaft first pass distance | 0.25 (range 0.01 to 1.0) |
| Light shaft bloom max brightness | 6.0 |
| Water exclusion component tag | OceanologyUnderwaterIgnore |
| Heterogeneous Volumes recomposite | Off by default |
| Per-body underwater blend radius | 100 cm by default |