Forum archive
spherical voxlap
- Recently I began researching some of the possibilities of accelerating voxel engines by using today's graphics card capabilities.
- One way to "accelerate" the rendering of voxels with a graphics card is to turn them into polygons. I'm not really interested in this solution since it seems pretty useless.
- Another way to "accelerate" voxels is to use the programmable vertex and pixel shaders. There are several ways to do this though.
I've written an experimental splatter engine before that used GL_POINTS (OpenGL points) together with some shaders to project/raycast models that consisted of "splats" (3D flat circles) instead of polygons.
It should be possible to let your shaders raycast axis-aligned box-shaped voxels.. raycasting axis-aligned boxes isnt that expensive.. I guess. I haven't looked into this yet. Does voxlap work with axis-aligned boxes?
But besides box intersections, sphere intersection should also be possible. I know sphere intersection calculations are really simple and can be highly optimized, if I'm not mistaking (can't test right now). So why not build some voxel engine that is accelerated by shaders that raycast sphere-shaped voxels.
Just another one of those crazy ideas of mine. Any suggestions, objections? :P - Your enthusiasm is nice, but have you actually compared the speed of your OpenGL splatter to a properly optimized software-based splatter? I've tried GL_POINTS and rendering as spheres in the past. Nothing comes close to the speed of my software-based "bounded cubes" method. A good example of optimized bounded cubes code is in EVALDRAW, when using the drawkv6() function. Here's a test script for you:
() t = klock(); cls(0x808080); clz(1e32);
for(x=-.5;x<=.5;x++)
for(y=-.5;y<=.5;y++)
for(z=-.5;z<=.5;z++)
drawkv6("caco.kv6",.4,x*32,y*32,z*32+64,t+x+y+z,t+x+y+z);
moveto(0,yres-16); printf("%.1ffps",numframes/t); - My splatter is based off these PBG documents: High-Quality Surface Splatting on Today