• Register

Brahma is a 3D game engine with a rather retrofuturistic design, intended for small studios and solo developers. It's being written from scratch in C++ using standard Windows API and no third-party libraries. This technology introduces an entirely new class of low-latency real-time engines that make special timing requirements, treating frames as video fields with a target time budget of 2-4 ms each, down from 16-33 ms frame budgets normally seen in game engines. It evolves in a different way than other modern engines, rejecting conventional BSP, Z-buffer, floating-point coordinates, and most of the lame screen-space effects in favor of innovative and efficient techniques. The engine is non-Euclidean capable to some degree; also it supports true displacement mapping for sectors as a means to virtualize geometry that affects collisions. The engine is also carefully designed to be easy and convenient to develop for, yet versatile and adaptive to any needs.

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Add media Report RSS Realistic refractive water effect (view original)
Realistic refractive water effect
embed
share
view previous next
Share Image
Share on Facebook Post Email a friend
Embed Image
Post comment Comments
Perro Seco
Perro Seco - - 36 comments

After five months or so, it's great to see new updates on the engine. Everything looks great, but I have to say I always found water too reflective, almost like a mirror! It's a cool effect, but I wonder how it'll look on a river or the sea, since in those cases water seems to be very little reflective.

Another question; to represent liquid surfaces in your engine, would be necessary to have animated textures like Duke's tile 336? I ask because I can't see it on the screenshot.

Reply Good karma Bad karma+1 vote
punpcklbw Author
punpcklbw - - 42 comments

Hey Pablo! Thanks for the feedback.

I understand that point, I think that the current issue is that all reflective surfaces in the engine are perfectly smooth and clean, while even very calm water has some ripple and surface objects present, and rougher stuff like sea waves may render any reflection obscure.

Otherwise, any smooth surface is very reflective when viewed almost edge-on, that's the nature of light. However, the rougher we go, the less prominent this effect gets. Since Brahma supports heightfields that are perfect fit for simulating waves and ripple, I shall look into an efficient way to combine heightfields with reflectitity, applying some warp according to the surface normals, that would make any water look more natural, of course.

As for the "water tile" texture, this is rather a stylistic choice, as you could ditch reflections altogether and keep just the vanilla textures if you prefer the look. However, such animated textures are meant to imitate underwater caustics (or fake a reflection in Shadow Warrior's translucent water) without actually rendering anything. This is why I disable the water "tile" for water that is both translucent and reflective--the only texture to fit here would be a dynamic heightmap that could warp the actual reflection and refraction you see on the screenshot.

See you on Discord, I've got something to talk about on my server.

Reply Good karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account:

Description

Trying to render realtime refraction of light, here's the results so far. This was achieved by the use of tiled rendering, not raytracing, with some heuristic to split a frame into small portions that may possess distinct projection and lighting. The goal is to implement a fast software-based planar refraction effect that doesn't require expensive hardware to accelerate raytracing.

In fact, the screenshot showcases several new features at once, such as automatic translucent water, Fresnel reflection with a hack to approximate the correct (circular!) falloff, adaptive refraction obeying Snell's law, and horizontal non-Euclidean portals.

There's an option to generate translucent water automatically from the original Duke3D maps, with no manual tweaks required, and all underwater sectors remaining in place.

The feature still needs some troubleshooting and optimizations, but the preliminary results look promising, and the sampling artifacts may be treated a part of visual style, as they make the underwater portion appear slightly blurry (as the error averages out over several consecutive frames).