Bengine

"Try it, before deny it!"
Voxel based software rendering 2.5D/3D FPS game engine in C/AS3 for Flash.
"No vertices, no triangles, no OpenGL, and no GPU, only old school pixel buffers!"

Technical Notes - Bengine Voxel Rendering Algorithm
Actually, Bengine's algorithm is rather simple. It's based on the heightmap terrain raycaster:
http://bruce-lab.blogspot.com/2008/10/open-source-as30-voxel-terrain-engine.html

The basic idea(Pseudo Code):
//4df raycasting, can be extended to 6df, 
//but slow so I haven't tried yet.
voxel[256][256][256];//voxel color data as 3D array
...
for each (x,y)//same xy coordinates in the terrain raycaster; 
{
//here is something different but simpler
//draw one column voxels located at (x,y)
for(z=0 to 256)
{
if(voxel[x][y][z]!=0)
project voxel[x][y][z] to screen
}
//move to next position: x+=dx;y+=dy;
}
...

Other tips:
1. voxels have to be scaled to cover the screen(tutorial)
2. check the screen buffer before render the color to avoid overdraw
3. other tricks to speed up(low res, tables, fixed point, bitwise...)

News:

RealBengine Ported to OpenFL:
http://bruce-lab.blogspot.com/2014/12/realbengine-ported-to-openfl.html
 

RealBengine - When Bengine Goes to Real 3D:
http://bruce-lab.blogspot.com/2014/04/realbengine-when-bengine-goes-to-real-3d.html


Bengine Race full source code released! 

Game powered by Bengine - Bengine Race:
Play it here: http://www.mochigames.com/game/_v690/

more about the game:
Video: http://www.youtube.com/watch?v=moAD_s8FlRo

Updates:
PBengine: Molehill+PixelBender+Bengine, 8-Bit build demo, Voxlap .vxl demo, water&reflection demo:
http://bruce-lab.blogspot.com/2011/02/pixel-bender-molehill-updates-and.html

Latest demo:
http://flaswf.googlecode.com/files/Bengine_v01.swf

Controls:
arrow keys:move
page up: look up
page down: look down
Home: go up
End: go down
Enter: create voxels
Space: delete voxels



First test:
http://flaswf.googlecode.com/files/Bengine.swf
Controls:
arrow keys:move

Voxel Resources:
Engines: 
Voxlap: http://www.advsys.net/ken/voxlap.htm
Evaldraw: http://www.advsys.net/ken/download.htm
http://voxrend.sourceforge.net/

Editors:
http://bruce-lab.blogspot.com/2014/11/open-source-and-free-voxel-editors.html

Tutorial:
Voxlap's rendering algorithm explained by Ken: http://www.jonof.id.au/forum/index.php?topic=30
Accurate Cube Intersections: http://www.jonof.id.au/forum/index.php?topic=1338.msg9213;topicseen
VISUALIZATION OF LARGE RLE-ENCODED VOXEL VOLUMES: http://www.gpstraces.com/sven/main/publications.htm
http://graphicsrunner.blogspot.com/search/label/Volume%20Rendering
http://iquilezles.org/www/index.htm
http://voxels.blogspot.com/2009/02/list-of-technologies-to-render-voxels.html
http://0fps.net/category/programming/voxels/
https://software.intel.com/en-us/articles/sparse-procedural-volumetric-rendering 
http://www.whisqu.se/per/docs/graphics85.htm (Voxel Graphics)
http://www.joesfer.com/?p=84(On Mesh Sampling)

Inspirations:
http://unlimiteddetailtechnology.com/
http://www.atomontage.com/
http://thermite3d.org/
http://www.voxelgames.com/
http://liero3d.blogspot.com/
http://advsys.net/ken/voxlap.htm
http://potree.org/

Open Source Voxel Engine/Games:
http://code.google.com/p/pinata-3d/
http://www.sos.gd/games/stuff/furballs.zip
http://furballz.net/engine/
http://www.ludumdare.com/compo/author/jovoc/
http://code.google.com/p/ld48jovoc/source/browse/ld20_TakeThis/
https://github.com/Kjos/TinyVoxel 
http://wurfelengine.net/index.php
http://rearview.sourceforge.net/ (REAl-time Raytracing Voxel Engine)
https://www.youtube.com/watch?v=2vnTtiLrV1w(stb_voxel_render.h programming library)
http://www.volumesoffun.com/cubiquity-is-now-fully-open-source-under-the-mit-license/

Voxel Models:
Doom Voxel Project: http://www.teamhellspawn.com/voxels.htm
https://github.com/ephtracy/voxel-model

Miscellaneous:
Voxlap Forum (archive): http://www.jonof.id.au/forum/index.php?board=9.0
http://raytracey.blogspot.com/
http://mrdoob.com/projects/voxels/
http://as3game.blogspot.com/2011/03/molehill-voxels.html
http://www.reddit.com/r/voxels/
http://www.reddit.com/r/VoxelGameDev

No comments:

Post a Comment

Sponsors