Gavan Woolery
  • News
  • About
  • Contact
  • Screenshots
  • Videos

Water

2/24/2012

14 Comments

 
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.

Picture
Picture
14 Comments
iodiot
2/23/2012 07:20:40 pm

Hello.

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

Thanks.

Reply
Gavan Woolery link
2/23/2012 07:34:33 pm

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..

Reply
bigbadwofl link
2/26/2012 01:21:15 pm

This is all kinds of awesome. Well done. I'm really interested to see how waves would look.

Reply
Gavan Woolery link
2/26/2012 08:00:54 pm

Thanks!

Reply
Lachlan Stuart
8/17/2012 11:20:55 pm

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?

Reply
Gavan Woolery link
8/18/2012 06:46:38 am

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.

Lachlan Stuart link
8/21/2012 01:34:46 am

My site's looking a bit bleak at the moment as I've just moved to WordPress, but here are 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 link
8/21/2012 01:35:34 am

My site's looking a bit bleak at the moment as I've just moved to WordPress, but here are 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. I'm slowly putting together a page of algorithms & ideas. I'll let you know when it's online.

Lachlan Stuart
8/21/2012 01:36:20 am

Whoops, sorry for posting so many times. I kept getting error messages >_<

Reply
Loki
11/9/2012 11:59:13 pm

Does your water also flow in if you remove terrin?

Reply
Gavan Woolery link
11/10/2012 12:07:25 am

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).

Reply



Leave a Reply.

    Interesting Games, Sites, and Projects

    Atomontage

    0 fps
    Voxatron
    King Arthur's Gold
    Minecraft
    Dwarf Fortress
    Braid
    Mysterious Castle
    The Humble Indie Bundle(s)
    Project Zomboid
    Retro City Rampage
    Star Command
    Proc World
    Volumes of Fun
    Big Bad Wofl
    Tom Dobrowolski
    Ken Silverman
    Inigo Quilez
    Moving Blocks
    CodeFlow
    Merlin3D
    Sea of Memes
    Twenty Sided


    Twitter Me: @gavanw
    Facebook Me: gavanw

    Insult Me: (sorry, no link)

    RSS Feed