Added in some volumetric water. The water is not simply a plane (as is typical in many games) - it consists of a full set of voxels (you can kind of see this in the cutaway view shown below). Right now, the water is also shaded differently based on how close it is to an object, but I want to make it a bit more dramatic. I also need to add some depth to the water so that it is more occluded as it gets deeper. Additionally, I want to add refraction and probably animated waves - so as you can tell, this is still far from complete.

Sorry for annoying question, but can you explain your rendering technique in some details. In the past I`ve experimented with 3d perlin noise + raymarching. My application was running fully on GPU in real-time, but performance was rather poor. http://goo.gl/mUciy

Now I am playing with voxels. Recently I wrote an app that uses 3d textures + combination of raytracer and 3d DDA line algorithm. Now I am trying to find some ways of optimizations of this stuff. Render runs inside pixel shader. http://goo.gl/O8DUx

Yeah I messed with the raytraced stuff a bit, but decided it would be too slow for my needs. My current engine is actually a relatively naive implementation, it just maxes out the CPU cores and GPU to do what they do best. The CPU does all the general processing and preprocessing (and the program is fully threaded), and the GPU only renders colored triangles to the screen, with very little pixel shader code. By optimizing the batches into display lists using as little data as possible, you can pump a lot of triangles out to the screen at a pretty good frame rate. Then to top it off I do 3D mipmapping - it swaps out chunks/pages that are further away for 1/2, 1/4, etc resolution pages/chunks.

Reply

iodiot

2/23/2012 07:44:10 pm

Thanks for your reply. Technical details are the best accompaniment to wonderful screens..

I'm building my own voxel renderer based on rasterization. I've made some progress at https://bitbucket.org/BinarySplit/voxel but am in the process of doing a rewrite to better incorporate SSE, a more memory efficient heterogenous voxel structure, a Z-buffer, dynamic objects, etc., so unfortunately that code hasn't been stable/usable for several revisions. (Yes, I know rewrite = death. Unfortunately I have no other option at this stage.)

My algorithm is purely software, based on doing a front-to-back walk of the octree-based scene, which allows easy occlusion testing, often without a Z-buffer. Furthermore, I switch to using isometric rendering instead of projection for small-scale details, which removes a lot of complexity for voxels that are only a few pixels. The performance varies a lot depending on scene, but I get 10-15FPS on a 1024^3 voxelized version of a reduced detail Sponza scene.

I was wondering, how do you plan to support refraction? Are you going to implement some sort of ray tracing, or just use the same shader hack that modern games use - displace everything behind the water by a certain number of pixels? Or do you have some trick up your sleeve to do refraction in a rasterization-based system?

Rewriting is not always bad, I'm doing it once again (moving my engine to software, it was formerly rendering with quads/polys on the GPU, and it now with isometric perspective instead of traditional projection). Sometimes it is better to rewrite than take the wrong path; my prior solution actually worked alright, but I can do more tricks with software rendering and I am not so limited by GPU memory. I was going to support refraction via screen-space displacement (which I think is the traditional way), but now since my focus is on producing a more pixel-art-oriented engine, I don't think it will be implemented (I may do simple planar reflections though for floors). Anyway, curious to see how your engine turns out, shoot me some screenshots at your convenience. :)

Reply

Lachlan Stuart

8/21/2012 01:33:39 am

My site's looking a bit bleak at the moment as I've just moved to WordPress, but here some screenshots I have available.
http://www.binarysplit.com/voxgl-screenshots-2/

Doesn't look like I'll have much time to spend on it this week, unfortunately.

Lachlan Stuart

8/21/2012 01:33:50 am

My site's looking a bit bleak at the moment as I've just moved to WordPress, but here some screenshots I have available.
http://www.binarysplit.com/voxgl-screenshots-2/

Doesn't look like I'll have much time to spend on it this week, unfortunately.

Not in this version of the engine, however I have rewritten nearly everything over the past few months (yes, I know, I know, but this rewrite was definitely worth it). I have not even implemented water yet but it will almost definitely be dynamic and volumetric, even if slightly crude (I don't want to kill performance).