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.

DarkBASIC Professional Discussion / could darkbasic handle lotsa voxels? voxel terrain?

Author
Message
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 17th Feb 2009 08:58
so, some games like tiberium sun (the vehicles), delta force (the landscape) use voxels rather than polygons

if i wanted my landscapes tiled, so that you can walk literally infinitely far, so aka there are big outdoor environments where you can look at mountains far away... would voxels be better for this? or polygons? or is darkbasic unable to handle it with an average compy?

and, not taking the issue of tiling landscapes into account, would darkbasic even be able to support a voxel array where, say, it represents gas from a gas grenade, and each voxel has fluid/gas properties so that you have a nice explosion of gas from the grenade (in the array) that can look like a nice explosion of fuzzy gas if you show the voxel gas in the right way

which leads to the third question, what would be the best way to get nice looking voxels on darkbasic?

thanks
qwe
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 17th Feb 2009 09:15
DBPro is not really the ideal language for Voxels, especially if considering making a whole game environment with them.

It's just too slow, but then everything is too slow for voxels, so maybe voxels are just plain not a good idea. There are a few tech demos out there, and it would make for a really cool game, but all we ever see is terrains made from voxels, if they did that then let you blow the terrain to bits, tunnel, that sort of thing, then that would be cool. Imagine Fallout3 if you could dig your own tunnels or the ground got blitzed when you use a mini-nuke. Surely we should have these sorts of features in games in this day and age.


Health, Ammo, and bacon and eggs!
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 17th Feb 2009 09:58
okay well how about a small 3d array for a voxel animation of smoke or something? not a whole landscape
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 18th Feb 2009 01:21
Quote: "It's just too slow, but then everything is too slow for voxels"

Take a look at the Delta Force series (at least, the older games, not sure about the latest), they used large voxel landscapes and performance was pretty good.

Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 18th Feb 2009 04:00 Edited at: 18th Feb 2009 08:15
There's nothing wrong with voxel landscapes. DBP can handle them just fine, although I have no idea how to do z-buffering with them.

Here is an example based off of code by xperience2003 on the PureBasic forum using PureGDK.

Attachments

Login to view attachments
Pharoseer
18
Years of Service
User Offline
Joined: 21st Feb 2007
Location: Right behind you
Posted: 18th Feb 2009 09:04 Edited at: 18th Feb 2009 09:05
I've always thought voxels were a cool idea, but not enough to really try to make anything involving them. However, I found a demo ages back by Ken Silverman that's fun to play with. I almost considered trying to translate it to DBPro but figured it was too much work for something I would almost inevitably never use.

The link is here :
Ken Silverman's Voxel Cave Demo

Also, there is a polygon based demo that is very similar to what Silverman did. It was coded by Stan Melax and can be found here:

Stan Melax's GeoMod CSG demo

This idea seemed to me much more practical than voxels.

I hope this helps or at least inspires someone,

-Frank
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Feb 2009 09:10
Purbasic <> DBPro

But that's besides the point, that is not a voxel demo. Just fine?, you think that demo shows that GDK or DBPro can handle them fine? - why not try adding a mesh to the display. That demo is using a custom camera system, the camera can't rotate up and down effectively, and it's using a custom rendering system, so it's incompatible with the rest of the 3D engine.

A voxel is a 3D pixel, that demo uses a heightmap. Any voxel engine by definition should allow overlaps like cliffs and caves, there is no way for that example to do this. Anyone could take that media, and do the same thing in DBPro that's true, but lets call a fish, a fish. In short a voxel is a representation of 3D data, and a 2D heightmap does not qualify.

Delta Forces terrain was pretty good but traditional textured terrain with foliage just looks better. There needs to be something alongside voxel technology to compete, maybe displaying voxels as something other than strips of colour, like little boulders, grass blades and clumps of dirt instead. I just don't think PC's are fully ready for voxel engines, the performance and resolutions need to go up a lot for them to compete with traditional polygon techniques.


Health, Ammo, and bacon and eggs!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 18th Feb 2009 13:07 Edited at: 18th Feb 2009 13:09
Quote: "Purbasic <> DBPro"


Your analogy isn't exactly correct. PureBasic is not DBP but with PureGDK it gains all of the functionality of DBP. So in a sense it can still be used to illustrate a point.

Quote: "But that's besides the point, that is not a voxel demo."


The example I converted to PureGDK is a voxel landscape but it's a very simple representation with limited functionality. Its purpose was to illustrate that you could make one if you really wanted to.

You can inspect the code for yourself. It is a voxel demo (it's just not a very good one):



Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 18th Feb 2009 14:54 Edited at: 18th Feb 2009 14:54
Quote: "Delta Forces terrain was pretty good but traditional textured terrain with foliage just looks better."

Well do tell me when you've managed to make something that looks better than this with traditional terrain, while running just as fast:



Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Feb 2009 15:26
It's a matter of taste, but I'd say this terrain looks better, in fact most games look better than your screenshot.

http://i34.tinypic.com/2ikqnsy.jpg

But what you have to remember is that Delta Force uses quite an advanced voxel system, for one thing it's a lot more variable than the usual grid system. A hill in Delta Force might be represented by 100 points, or maybe just 1 - it uses varying sized voxel points to create the terrain, which is why it can have more detail than a grid based terrain. That is the core benefit, not looks, but actually giving more detail on PC's that couldn't really handle it. It allows for long view distances without killing the processor as well of course.

Put this way, if Voxels were a viable terrain solution on modern hardware, wouldn't we see a lot more of them?


Health, Ammo, and bacon and eggs!
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 18th Feb 2009 15:35
Quote: "It's a matter of taste, but I'd say this terrain looks better, in fact most games look better than your screenshot."

Most games you're thinking of aren't 9 years old.

I agree though, the system used must be pretty advanced, and we're unlikely to see anything comparable in DBP (although it would be so awesome if we did), but then we're unlikely to see any Fallout 3 terrain in DBP either.

Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Feb 2009 16:21
That's what I'm saying though - Delta Force is 9 years old and it rocked, the terrain was the best at the time, draw distances we great, really no other FPS came close to it.

And 9 years later... Everyone uses polygons!.

That's my whole point, nobody has pushed voxels enough to compete with polygons. Voxels solve several modern day terrain problems, like destructibility, file size (not sure how a voxel size compares to a heightmap though), and detail. As I said, how cool would it be to have proper destructible terrain, to the point where you could dig a tunnel any way you want - imagine a modern day Dungeon Keeper, instead of removing blocks of dirt all these critters could be digging your dungeon out for you. Imagine being able to dig under a fence to sneak into a compound in Battlefield.


Health, Ammo, and bacon and eggs!
qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 18th Feb 2009 17:36
Quote: "There needs to be something alongside voxel technology to compete, maybe displaying voxels as something other than strips of colour, like little boulders, grass blades and clumps of dirt instead"

yeah. i am planning on having voxel (3d grid of data) for things, like clouds, but representing the 3d dataset will not be done by "a cube at each ON and no cube at each OFF". it'll be a lot more fluffy, and the grid will be able to be lower res.

could be useful for clouds (make things clump in the grid, dynamically move values with wind, and generate more noise at cloud edges so as they move they wisp)
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 18th Feb 2009 18:08 Edited at: 18th Feb 2009 18:21
I know what you're saying Van B, it's just that 9 years later and we can't even do large, decent-looking landscapes in DBPro with the same kind of frame rate these things could manage.

I think the reason modern games don't use voxel terrains is that they are probably harder to manage (I'm not an expert on the subject so I don't know much about this) rather than intensive to render. Besides, nowadays they just generally aren't needed as we have the processing capabilities to use polygon terrains.

qwe
21
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 18th Feb 2009 18:35 Edited at: 18th Feb 2009 18:37
>>

that is not a voxel demo. Just fine?, you think that demo shows that GDK or DBPro can handle them fine? - why not try adding a mesh to the display. That demo is using a custom camera system, the camera can't rotate up and down effectively, and it's using a custom rendering system, so it's incompatible with the rest of the 3D engine.

A voxel is a 3D pixel, that demo uses a heightmap. Any voxel engine by definition should allow overlaps like cliffs and caves, there is no way for that example to do this. Anyone could take that media, and do the same thing in DBPro that's true, but lets call a fish, a fish. In short a voxel is a representation of 3D data, and a 2D heightmap does not qualify.

>>

hey! are we even talking about the same demo!?

i could gracefully use the camera controls once i realized that they are probably making a flight engine out of it - the WASD controls are local, causing Z axis tilt when you turn, but it turns you back upright at a constant rate. R and F go down and up, locally

the levels are 3D grid based, not heightmaps. that's why there are overhangs and caves, and when you click, you shoot a little yellow thing that bounces off of things ricocheting, and when you hit something enough times, it blows (hence, you can dig tunnels and such). if you find the "red cannon", you shoot big red blobs that destroy whatever they hit with greater power. pieces of terrain that have had their connections to the rest of hte terrain blown away, fall down

i don't know what you mean by "independent camera", but the camera is truly a part of that environment. there ARE meshes in the environment--the bullets fired, the letters at the start, and the particle effects representing the red gun

and they're DEFINITELY true voxels. there are no triangles, it's all squares, and it looks just like how delta force terrain looks

by the way, that delta force terrain image is of a newer game. that game doesn't use voxel terrain. i'll hyperlink an image to older delta force terrain later, i have the game myself so i can take a screenshot

it's amazing actually. amazing demo! thanks a lot for the link, they can do great things with that engine, i'm going to read about their plans once i get to class (instead of pay attention of course)
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 18th Feb 2009 19:33
I was looking at Mistrels PureGDK demo.

I'm sure I've seen the demo your talking about before, spent quite a bit of time messing around with it, and your right, it could easily feature traditional 3D geometry, but that's because it's more like a 3D engine. Mistrels demo is cool, but it's 2D, so not really compatible with objects.

There was a demo ages ago by Kevin Verbeek (Kevil) that used a 3D grid of points and created a voxel cave. You could fire and destroy bits of it, far short of the other demo but it was done in DBPro.


Health, Ammo, and bacon and eggs!
Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 18th Feb 2009 19:42 Edited at: 18th Feb 2009 21:24
lol... thanks for that cave demo link... I just waisted my morning playing with that. Got a bit addicting there. Very inspiring and makes me think of a voxel/polygon hybrid.

EDIT:

Doesnt a voxel engine still need some kind of mipmapping scheme like textures when the voxels go farther away from the camera to prevent pixelization?

Current Specs: Intel Core2Quad 2.66 GHz, 8 GB RAM, NVidia Geforce 9800 GX2, Vista Ultimate 64-bit
Pharoseer
18
Years of Service
User Offline
Joined: 21st Feb 2007
Location: Right behind you
Posted: 18th Feb 2009 22:50
Hey Todd,

Glad I could help you waste your morning. After playing with the cave demo and Melax's CSG stuff I almost want to make my own hybrid.

As to your question, I've never even thought about it. I always assumed that a voxel was a voxel no matter how near or far. Maybe that's a naive assumption on my part. It makes sense that you'd want to lower the detail the further away the voxel is. From what others have said Delta Force did something like that even if no other voxel app does it.

I'm sure someone else can answer your question better than I.

-Frank

Oh, and here's some more voxel based links to waste time on:

Voxelstein
-- Very addicting. I play this one fairly frequently.

HVox
-- Gorgeous, but runs at about 2 frames a minute on my PC
Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 18th Feb 2009 23:33 Edited at: 18th Feb 2009 23:37
Yeah, thanks for the additional links there

Well, The problem I'm seeing is with using polygons to represent the voxels. So the question is probably totally irrelevant to a 100% voxel engine.

I was thinking more on the lines of colored vertex points that represents voxels. The outside layer of a voxel mesh is skinned with polygons. Without using textures, moving a mesh away from the camera, the renderer is going to start to pick what colored vertices you can see causing the (what I call) pixelization. Mabie I got the term wrong there.

* I'm still trying to get my gui dll finished so I can jump into this "fun'r" stuff...

Current Specs: Intel Core2Quad 2.66 GHz, 8 GB RAM, NVidia Geforce 9800 GX2, Vista Ultimate 64-bit
Pharoseer
18
Years of Service
User Offline
Joined: 21st Feb 2007
Location: Right behind you
Posted: 19th Feb 2009 02:00
There's a tech demo called Thermite using "PolyVox Technology" that might be trying to do what you're talking about. I'm downloading it now to play with.

Thermite

I think I'll stop distracting you though. Anybody that's making plugins has my full support.

-Frank
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 19th Feb 2009 03:45 Edited at: 19th Feb 2009 03:46
Quote: "by the way, that delta force terrain image is of a newer game. that game doesn't use voxel terrain"

It's the 3rd Delta Force game, Land Warrior, released in 2000. While the Wikipedia article on it doesn't explicitly state that it uses voxels, if you look at the earlier games that are known to have used voxels, the terrains are very similar looking, for example:



(Delta Force 2)

Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 19th Feb 2009 03:50 Edited at: 19th Feb 2009 03:53
Quote: "Extract surface: An algorithm (known as Marching Cubes) is used to convert the volumetric representation into a conventional polygon mesh. This can then be rendered in the same way as any other geometry in the scene.

Needless to say, there are many trade offs to be considered when choosing one of these approaches. PolyVox uses the surface extraction approach which allows it to integrate easily with existing 3D engines. When the world is first created PolyVox generates an initial mesh. When the world is then modified, the 3D engine simply requests new geometry for the appropriate region. "


Thats sort of what I basically had in mind... except for the marching cube stuff. Well, I'm thinking more of a simplified polygonal CSG technique(ie: minus the BSP stuff).

Current Specs: Intel Core2Quad 2.66 GHz, 8 GB RAM, NVidia Geforce 9800 GX2, Vista Ultimate 64-bit
Mono
19
Years of Service
User Offline
Joined: 23rd May 2005
Location:
Posted: 19th Feb 2009 06:13 Edited at: 19th Feb 2009 06:14
Quote: "

That's what I'm saying though - Delta Force is 9 years old and it rocked, the terrain was the best at the time, draw distances we great, really no other FPS came close to it.

And 9 years later... Everyone uses polygons!.

That's my whole point, nobody has pushed voxels enough to compete with polygons.
"



You should read this:
http://digitalmarketingdigest.com/2008/08/20/the-truth-behind-liveplace%E2%80%99s-photo-realistic-3d-world-and-otoy%E2%80%99s-rendering-engine/

and watch this:
http://a13.video2.blip.tv/1310000168192/Ubergizmo-AMDR700RubyDemo193.mov

Login to post a reply

Server time is: 2025-05-08 13:28:49
Your offset time is: 2025-05-08 13:28:49