Isometric (2.5D) Voxel Engine (Destructible Terrain & Platform)

Started by
5 comments, last by SimanQzia 11 years, 11 months ago

Greetings Forum,



[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]To begin with, recently I decided to work on[/font][color=#000000][font=Verdana, Arial, Helvetica, sans-serif] [/font][color=#000000]Isometric engine[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

. However, it was simply too boring.[/font]


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]So, I came up with an idea to make [/font][color=#000000]Voxel[color=#000000] [color=#000000][font=Verdana, Arial, Helvetica, sans-serif]based isometric terrain for the game.[/font]



[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]Before the main post, the programming language I use is BlitzMax which is rather slow.
However the code I have written can be simply rewritten in C++, since the syntax is only thing that differs.
I have attached the files to the thread, Terrain demo's works on OpenGL, in case you have some problems, tell me. Tile system demo works on DirectX.[/font]
[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

I may compile it for DirectX or vise versa in a minute.[/font]


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

1. Voxel Based Terrain[/font]


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif][size=2]

Note: Demo Applications Are Attached To The Post[/font]

[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]At first, I made isometric tile based terrain which supported some height values [/font](1st part)[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

.[/font]


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]Secondly, I used [/font][color=#000000]Cubic Spline Interpolation [color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

for both, X and Z axis to create smooth edges for the terrain.[/font]

[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]That way I created prime voxels. [/font](2st part)


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]Later, I found a solution to draw voxels properly [/font](3rd part)[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

, though the method is rather too slow for real time rendering.[/font]


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]4th part shows how I implemented texture displaying on the terrain.[/font]


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]Terrain collisions already have been implemented.
In the end of terrain development I also implemented lighting + map bumping.[/font]



[font=Verdana, Arial, Helvetica, sans-serif][color=#000000]The practical use of engine's terrain would have been:[/font][color=#000000][font=Verdana, Arial, Helvetica, sans-serif] export the voxel [/font][color=#000000][font=Verdana, Arial, Helvetica, sans-serif]terrain as image tiles and use it in the game.
That was the progress with voxel terrain:[/font]
isovoxel3dengine.png

Real-Time Lighting Implementation:
voxellighting1.png


voxellighting2.png

[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

2. Voxel Based 3D Tile System + Destructible Terrain[/font]
[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

Note: Demo Applications Are Attached To The Post.[/font]



[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]Well, to play with voxel engine was quite fun![/font]
[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]I have accomplished terrain system in just couple of hours and wanted to try something more complex.[/font]
[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]The next step was to create 3D tile system. I did it and implemented[/font][font=Verdana, Arial, Helvetica, sans-serif][color=#000000] [color=#000000]Destructible Environment[/font][color=#000000][font=Verdana, Arial, Helvetica, sans-serif] as well.[/font]
[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]I found a lot of optimization methods, but I had one simple problem to which I still do not have a solution.[/font]
[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]Unfortunately, I didn't found any proper way to create fast real time 3D voxel bumping/day lighting.[/font]


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

My results so far
normalmap.png[/font]


[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

hugeterrain.png[/font]




[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

3. Voxel Engine Basic Platform & Physics (OpenGL)[/font]
I've also attached demo file so you can check it out :}
Controls: Space and Arrow keys.

My achievements:

  1. Fast voxels drawing with depth
  2. Simple and basic lighting
  3. 256 colors for voxels
  4. Create or move loaded voxel objects

Screenshot
voxelphysics.png

[color=#000000][font=Verdana, Arial, Helvetica, sans-serif]

Enjoy, I hope you find this interesting!
Waiting for feedback :}[/font]

Advertisement
looking good! would like to see something more than just a small section, like a whole area would be nice.
Yeah, sure.

I've just attached Voxel Destructible Tile Engine Demo V2.rar


It has voxel map of the size 1024*224*1024 and needs about 235MB Ram.


You can notice that there is no initialization time.

Probably that's where my journey with engine development ends.
I have no further ideas to implement, except to rewrite it in C++ and improve speed like 2-3x times.

PS: If there will be requests, I might share some of the source or make a tutorial ;}

A tutorial would be great!

A tutorial would be great!

Thank you for the interest. However, in my opinion that would be quite much of work for nothing :}
I don't really wanna spend a few days on article/tutorial which won't be read.
I would also like too see this tutorial, and im sure there are many more, but if you dont want too its very understanable It would probably be a lot of work.

***UPDATE*** Voxel Engine Basic Platform & Physics (OpenGL)

I forgot to mention that I was working on Voxel Based Real-Time Platform Engine.
I've also attached demo file so you can check it out :}
Controls: Space and Arrow keys.
[attachment=8993:Real Time Voxel Platform Demo.rar]

My achievements:

  1. Fast voxels drawing with depth
  2. Simple and basic lighting
  3. 256 colors for voxels
  4. Create or move loaded voxel objects


Screenshot

voxelphysics.png

This topic is closed to new replies.

Advertisement