Saturday, October 25, 2008

Z-Ground Terrain demo

This demo was just to test my way of rendering terrain in z-ground engine. It is half-finished, not smooth, doesn't 'looks right', and the code is a mess. All in all the result is not very satisfactory but at least it prove that my way works!After some optimization it will be usable, I think.

It looks like some kind of voxel rendering effect but actually not.(I also write one 3D Voxel Terrain engine using as3.0, if you are interested, here it is(with code))
I use nothing but some basic ideas of z-ground to create it. Again, this swf was created by pure code, the textures were generated by my texture generator engine on the fly.
By the way, my next demo of z-ground, which is almost done, is about lighting and shadow, water reflection effect of z-ground engine.

Demo:HERE(arrow key to move)
(BE CAREFUL! It needs lots of time for pre-rendering,to avoid crashing you computer,download it and use a flash player to view. )
Code:UNDER OPTIMIZATION

Saturday, October 18, 2008

open-source as3.0 Voxel terrain engine v0.1 released

New Version: http://flaswf.googlecode.com/svn/trunk/VoxelTerrain_v0.15

as3.0开源三维Voxel地形引擎v0.1(单击展开中文)

Interested in generating terrains, I wanted to create a real-time terrain engine on flash. I'm trying to write one using action script 3.0 using some 3D classes and perlin noise but it's not finished yet.
Not long before I found Andrea "6502" Griffini's old demo of his voxel terrain (NEWVOX.C). The original C code is really clear and the final work is impressive. So I decided to write another voxel terrain engine using his code.
This is the first step, I just 'translate' his C code into action script 3.0. What I want to do is add textures of terrain, sky and the background, and maybe some lighting effect as well. It's far from being finished.


Demo: 
HERE (use arrow keys to move)
Latest
Source Code:
C(by Andrea "6502" Griffini): thanks to FengYun
C/SDL
AS3.0: HERE Latest

Links: 
http://simulationcorner.net/index.php?page=comanche (JS&Java demo with texture)
http://www.playfuljs.com/realistic-terrain-in-130-lines/ (html5) 

Update on 2012-12-11:
lizhi posted the modified code on wonderfl: http://wonderfl.net/c/9v5N (AS3)

Update on 2019-Feb-11:
Voxel terrain rendering algorithm in less than 20 lines of code:
https://github.com/s-macke/VoxelSpace  (Python, JavaScript)

Sponsors