Thursday, December 12, 2013

OpenCL up to Speed, and 4K Voxelisation Has Been Attained

As you can see there are still plenty of graphical errors, but I have finally cracked that magical 1024 voxel dimension limits I have had for all this time. 2k isn't that impressive these days, so I jumped straight to 4k, which is needed to see pretty much all of the little patterns on the inside and outside edges of the Stargate. Amusingly, that 16 fold increase in detail didn't noticeably impact performance at all, at least on the rendering side of things (brick creation on the other hand...). Also the OpenCL renderer has been brought up to speed, and currently works at least as well as the OpenGL renderer. Sadly the same can not be for OpenCL's performance, which is really quite poor, at least on my GTX680 it appears to be roughly a quarter of the frame rate of the GLSL version. The Stargate model comes from here. Source code for the current progress as always is available from GitHub.

Thursday, December 5, 2013

Success! We Have Voxels!

Here's the code. Finally, the current implementation matches the original in terms of capability. It also significantly exceeds the original in terms of performance, and contains a version of the LRU allocation scheme (even if in its current state it isn't doing anything). This is almost a complete implementation of Cyril CrassinGigaVoxel method, albeit missing the spatial mipmapping, and about a thousand visual tweaks, most of which depend on the mipmapping. I can almost taste the Global Illumination.

Tuesday, December 3, 2013

Underwhelming Screenshot 5: Gelatinous Cube Eats Bunny

Significantly more whelm than previous entries, still lacking that whole voxel thing I set out to accomplish. As far as I can tell, the only thing that's not working is for some reason the voxel rendering shader can't get brick id's, which is curious as the brick creation shader is most certainly writing to the brick texture (I checked). The really amazing part about this, is how fast it runs. This is *very* real-time. This Octtree is 7 levels deep, and it took 7 frames to generate. Frame rate appeared to stay well above 40fps. It's quite mesmerising watching a bunny form out of blocky nothingness. Even though it doesn't completely work, I'm still quite chuffed, as building the Octtree and associated 3D texture took tens of seconds in the old version, where as this does it's job tens of times per second. Source for the adventurous.