PND3D Demo and Source Code

The PND3D engine is something I started, really in response to the hype of Unlimited Detail. Initially my goal was to figure out their algorithm. I started my first prototype in August 2008. It wasn't until December 2009 that I found a rendering algorithm I was happy with (and by that I mean a fast enough worst case). Then in 2011, Ace of Spades happened, and so I shifted my goal to making a successor to the Voxlap engine. Voxlap's main feature is the ability to support unlimited modification to voxels on the grid. Note that this design goal is in conflict to tricks like instancing, which can save greatly on memory.

Some major improvements over Voxlap are:

Texture mapping

Support up to 4096^3 grids (higher than that works but with artifacts due to an optimization of structure size)

Support multiple voxel grids; world and sprites are handled the same

Fast, voxel-accurate collision detection

More compact file format: *.KVO (Ken's Voxel Octree)

Some less noticable improvements:

Ability to quickly double or halve voxel grid size if necessary

Ability to safely travel inside solid (Voxlap would crash if you tried!)

Ability to render from any viewpoint (Voxlap required you to be inside or above map!)

Fewer visual artifacts (no jagged edges; no artifacts when looking up or down; no mip-mapping required)

Multithread support

Some GPU acceleration

Effects such as transparency and entire sprite shading offset

Built-in drawsph() and drawcone() functions - handy for debugging

Faster / more accurate normal estimation

PND3D.ZIP (669,942 bytes, 09/10/2018) Includes demo and source code (mouse code now works on Windows 10!).

Note: The GLSL shaders have not been tested extensively on all video cards! I have an NVidia card so that tends to work best. If you have an old ATI or Intel based video card, you may need to override the default rendering mode with one of the following:

"pnd3d /arbasm" is still full GPU acceleration and quality, but older style shader code. It may work in some cases.

"pnd3d /cpu" is CPU-based emulation code. It should work on all machines. The CPU code is actually not too slow, but it does lack the highest quality texture-mapping (i.e. nearest+mipmap instead of trilinear filtering).

