Jump to content

  • You cannot edit this iotd

OpenCL Voxel Splatting  by spacerat    -----


Time Spent: 10 days
Date Added: Aug 18 2012 09:04 PM

Since there are still lots of rumors around about unlimited detail, I wanted to give point based rendering at try and see how well it works in OpenCL.

It turned out that the performance is much better than basic point rendering in OpenGL. While OpenGL allowed me to render around 630M pts / sec, OpenCL reached 3-4 times the speed with ~2 Billion points per second on a GTX580M GPU.

Just rendering points does not lead to a smooth surface however. For that, a post-processing filter is required. It increases the size of the points and fills the holes. I have implemented a very simple one, to show that it works. As for the culling, only frustum culling is implemented. More advanced hierarchic occlusion culling might give extra frames especially in indoor scenes. Also a hierarchic depth buffer is not been used - it might further give additional performance when adapted to point based rendering.

Main challenge for the implementation was to find a data structure that allows parallel access by stil keeping the size per voxel reasonable. Rendering the points works pretty much straight forward.

In the image, you can see the render stages:
Right : Z buffer
Middle : Colored Points
Left : Including post processing


Render Resolution: 1024x768
Framerate: 30-40 fps

Scene Dimension: 20k x 1k x 20k voxels
Dataset : 1024x1024x1024 Voxels (single instance)
Data size per voxel: 4 bytes / voxel at each LOD, total ~5 bytes, seen over all LODs

The Demo is attached - not sure it works on all cards however.
Attached File  OpenCL.Voxel-Splatting.zip   9.3MB   2921 downloads

Alternative Download : http://www.2shared.c...-Splatting.html

Visual Studio Express

  • You cannot edit this iotd


Aug 28 2012 09:41 PM
seems after gamedev relaunch there're less comments.
update: ok changed already ;)
/ Guest
Sep 05 2012 09:51 AM
on my R6950/Cat.12.4 this demo shows nothing but a white window both in GPU and CPU mode, it doesn't report any errors in the console window
Sep 06 2012 02:34 AM
@guest: I would like to solve this issue - however that is difficult if there was no error shown
/ Guest
Sep 06 2012 09:38 AM
Can we expect to play with source code? I would like to fix AMD errors also as is my GPU Brand..
Sep 06 2012 06:24 PM
I dont have released the code so far.
If you have some time, you can help me testing & fixing it on ATI/AMD however
/ Guest
Sep 06 2012 08:24 PM
On my AMD 7770, I also just see a white window with no errors in both GPU and CPU modes.
/ Guest
Sep 09 2012 06:02 AM
not working on AMD FX + HD 7770 (blank window)
/ Guest
Sep 09 2012 04:12 PM
"For that, a post-processing filter is required. It increases the size of the points and fills the holes."
Please could explain this or attach some source code for reference of the weighted functions you choose? I'd like to try this, it sounds really cool.
Sep 09 2012 06:20 PM
The post-processing filter is actually similar to the one presented in this paper : http://wwwcg.in.tum.de/fileadmin/user_upload/Lehrstuehle/Lehrstuhl_XV/Persons/Kraus/pbg07.pdf
Sep 20 2012 10:49 AM
I love the look, so organic and anti-polygonized!

The demo runs fine but none of the controls work, including Esc...
Sep 21 2012 07:28 AM
yes it suits very well for high detailed organic stuff.
controls are not implemented - its a pure tech demo