Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Voxel Terrain Engine

Author
Message
Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 6th Jan 2008 01:16 Edited at: 6th Jan 2008 01:17
VOXEL TERRAIN SYSTEM: 2D Lines To Recreate 3D Landscape

For those of you who dont know, voxel terrain is a 3d terrain rendered completely in 2d with nothing more than a simple 2d line system. This system has been used in many games, such as Outcast, perimeter and some atv offroad games for the gba. The benefits of using voxels to render the terrain are:
smoother hills and bumps, no hard polygonal edges allowing for more natural organic look
quick altering of the landscape on the fly down to a texel level
antialiasing
intersting shader effects entirely in software such as realistic water and focal blur

This project was started just yesterday and here are some progress shots, granted this is rendered really slowly as there are no optimizations as of yet, and more is being rendered than needs to be.





all of this is based on a prototype i created in gamemaker some time ago, which is available for you to try here:
http://h1.ripway.com/indecom/GMTerraVox.exe
the controls are pretty simple use the arrow keys to move, or click on the top map to aim the camera where you want. Calculating the terrain and rendering it in GM is incredibly slow, and will be much faster once i get that far in dbpro.
Accoun
18
Years of Service
User Offline
Joined: 9th Jan 2006
Location: The other end of the galaxy...
Posted: 6th Jan 2008 01:29
Impresive... Most impresive...

Make games, not war.
BiggAdd
Retired Moderator
20
Years of Service
User Offline
Joined: 6th Aug 2004
Location: != null
Posted: 6th Jan 2008 01:48
Incredible!! Looking forward to future progress!!!

Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 6th Jan 2008 02:02


This is from the game outcast, what really inspired me to do this in the first place. what i'm aiming for is the terrain and water effects from this game. So essentially, although what i have now is an orthogonal view of terrain, not really 3d, i'll be using a texturemapping/raytracing algorithm to make it 3d, like in that screenshot from outcast.
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 6th Jan 2008 02:37
Looks pretty cool
But you may want to make this more in c++ cuz even with Dark Basic Pro voxel terrains arent running really good speed..

Maybe a plugin?


Click For Details!
Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 6th Jan 2008 02:41
well, i have many optimizations to do, and i'll be using cloggy's d3d dll to render it, since that is supposedly faster. I'm almost certain that the resolution wont go over 320-450 in width to keep the render smoother. I had my voxels in game maker running at about 14 fps, so i should be able to get it at least to 30 fps in dbpro.
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 6th Jan 2008 06:51
Looks Brilliant.

I am Xenocythe. XENOCYTHE!
Please, mods change my name back! I've learned my lesson about the evil name changing capabilities moderators have
jasonhtml
20
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 6th Jan 2008 07:53
amazing! so how do will you be able to get this to work with 3D objects?

Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 6th Jan 2008 08:17
its uber complicated, but that involves special zbuffer pass of the terraing, and figuring out how to mesh the objects into that.
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 6th Jan 2008 08:33 Edited at: 6th Jan 2008 08:36
Incredible!

What calculations are you doing that drop the fps as much as it is?

http://3dfolio.com
Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 6th Jan 2008 08:49 Edited at: 6th Jan 2008 08:51
because it is drawing about 262144 lines, thats why, lol.

thats for the small terrain btw, not the large.

large terrain draws about 1048576 lines, hehe.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 6th Jan 2008 14:49
If you get Cloggy's D3D plugin it should speed up a bit, but not by much I'm guessing... that's alot of lines, heheh.

Great work by the way. Looks fantastic. Are you using a heightmap or something?

Your signature has been erased by a mod
Seppuku Arts
Moderator
20
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 6th Jan 2008 14:59
That looks cool, hope to see more progress.

Click to go to seppuku-arts.co.nr
Mr Z
17
Years of Service
User Offline
Joined: 27th Oct 2007
Location:
Posted: 6th Jan 2008 15:35
It will be nice to see this developing. I like Outcast, and it will be interesting to see if this can recreate an landscape like that. Maybe even better (you can always hope). Anyway, I will keep my eye on this. Good luck!

Darkness, you haunt me. If I give in, I would be an monster beyond imagining. Light, you guide me. Thanks to you, I see past the nothingness. Life, I choose to live in the light.
zzz
19
Years of Service
User Offline
Joined: 13th Nov 2005
Location: Sweden
Posted: 6th Jan 2008 16:07
Really cool indeed, that´s really advanced stuff.

WII number: 8220 5043 6939 7393
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 6th Jan 2008 18:16
Indecom if you use Cloggy's D3D lines to draw it you might consider using BATCH commands - this will allow you to draw many many lines in one batch process which will speed up this process many times. I dont know maybe you are already doing this. Just thought you should know this. Nice project by the way.

Cheers,
Olby


ACER Aspire 5920G: Intel Core2Duo T7500 (2.20GHZ), 2GB RAM, NVIDIA GeForce 8600M GT 1280MB Total, DirectX10, DBPro 6.6b
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Jan 2008 19:07
Is the demo supposed to do anything? After a long wait I got the attached image - but couldn't get anything to change by pressing keys, etc.

The other images look impressive though.

Attachments

Login to view attachments
Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 6th Jan 2008 19:59
yea, the demo is supposed play like a first person terrain exploration thing, but its really really slow since it was made in game maker. yea, i think it could have been unresponsive maybe. anyways, in dbpro, unoptimized, it already runs faster than that demo, so it should be much much better. I havent made any progress since yesterday, except for a simple random height code to show how easy it is to alter the height on the fly, and see hoe fast it really runs since its hard to tell when the terraing doesnt do anything.

At the moment i'm doing a lot of for loops to get the terrain rendered. I'm fairly new to dbpro, though i've had it for a while i'm out of practice. What exactly are these batch commands? I havent actually started with cloggy's dll yet, i'm just getting the core coding done, and i couildnt really find any sort of tutorials on cloggy's at the moment. Anyways, if you think you can help me find some, or maybe describe what you mean, that would be greatly appreciate. Never done anything like that in Game maker since its so simple, lol.
Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 6th Jan 2008 21:36
Congratulations, it looks nice, though It ran slow on this comp, like -7FPS, but this is just my backup-computer so I cant wait to see your new one, seems very interesting!


Making dreams possible, one line at a time...
Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 7th Jan 2008 00:08
thanks, that exe is only for prototyping purposes, a proof of concept that was easier to work with at the time due to me already being fluent in gml. I decided to try dbpro because its easier than c++ and i already have some knowledge in it from using dbc a lot as a child.

anyways, i need to know the best ways to perform ray tracing calculations, i know i can use an object, set it to the camera position, aim it and move it a certain distance and check for the height at the new location, but is there some sort of built in function for doing these kinds of things, enter a length and a direction and it gives you new coordinates based on the starting position, or do i need to revert to using standard trig?
Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 7th Jan 2008 07:53
I got it to run faster with some standard optimizations, nothing fancy yet. I reversed the drawing order, starting at the front and working back, and only drawing what can be seen by the camera, and it runs at twice the speed. I can only introduce other optimizations once i start going into raytracing with it. But, this is very very promising, in game maker, this far gave me way under 0 frames per second. Cant wait to get into raytracing, lol.
Indecom
17
Years of Service
User Offline
Joined: 23rd May 2007
Location:
Posted: 8th Jan 2008 21:33
Whelp, i started using Cloggy's d3d dll to render the lines needed and the frame rate went from 6 to 2, sooo, i dunno. I'll take a look at the batch rendering functions but i'm not sure that will help much either when what i need to draw changes nearly every frame, but like i said, i will look into it.

Login to post a reply

Server time is: 2024-11-24 04:32:25
Your offset time is: 2024-11-24 04:32:25