Jump to content


Photo

Voxel Graphics


  • This topic is locked This topic is locked
57 replies to this topic

#1 3D2DGAMES

3D2DGAMES

    GMC Member

  • GMC Member
  • 857 posts
  • Version:GM:Studio

Posted 06 December 2007 - 02:22 PM

What is a voxel?
A voxel is basically a 3d sprite.

Whats the whole point?
An actual voxel has some advantages over polygons. however im uncertant that gamemaker can emulate a voxel with the same rendering speed. but if you are trying to make a game that has rough terrain or if you are in a hurry to make a model, and you absolutely stink at making 3d models, a voxel would come in handy. i dont know about you but i can make better sprites than i can 3d models.

i quote wikipidia on the article Outcast (Game) on the section Graphics Engine:

"The game uses a voxel engine to render its objects and textures. This method is purely software-based; it does not rely on any hardware-acceleration via a graphics card. A voxel engine was chosen because there is no performance hit when rendering round or curved surfaces, thus allowing for a much more detailed landscape. Had the same level of detail seen in Outcast been attempted on a hardware-accelerated polygon engine, there would have been a significant drop in performance."

"Voxels offered good picture quality without requiring advanced graphics hardware, a happy medium between software rendering and hardware-acceleration. As a result, the graphics were considered beautiful and well ahead of their time upon Outcast's release, thanks to effects such as depth of field, bump-mapping and anti-aliasing, all of which would have crippled even the most advanced graphics card of that era."

"The disadvantage of this type of CPU-intensive software-rendering was that Outcast required an extremely powerful CPU (nothing but the most powerful Intel Pentium III processors of the time, in the 500-600 MHz range) and massive amounts of RAM (128 megabytes were recommended) to run at full speed and maximum resolution (512x384). However,: these considerations can now be safely ignored, as even low-budget PCs of today fulfill those requirements."

Populer games that use voxels:
Command & Conquer: Tiberium Sun
Command & Conquer: Red Alert 2
Outcast
Master of Orion 3
Comanche
Comanche Gold
Comanche Maximum Overkill:the terrain is voxel based http://www.youtube.c...feature=related
Crysis
Delta Force
Delta Force 2
Sid Meier's Alpha Centauri
Amok
Worms 4 Mayhem uses a "poxel" (polygon and voxel)
Blade Runner


To sum it all up:
The advantages of having voxels in gamemaker are great since gamemaker has a hard time rendering full scale 3d games. also.. the appearence of the terrain isnt that bad and in Delta force 2 you are able to see very far(the terrain is voxel based).

im not completely attacking gamemakers 3d ability. though it is almost impossible to make a fully functional 3d game in gamemaker that is actually worth while it is possible. many of the 3d Dll's and 3d extentions for gamemaker expand its ability even more. however it can be hard for novices to use those abilities to make a game.

the questions:
1--if a programmer could make a 2d sprite and make another and another, ect ect then have those sprites be converted into a voxel(x and y points are on the sprite the subimg is the z value) it would help the novice 3d programmers greatly i think.

2--if it is possible to get a true voxel to work in gamemaker it could speed up its 3d ability

3--the graphics a voxel provides isnt bad. it is actually relatively good. though it doesnt compare to Halo or those really recent games it does have some potential.






note: if i was unclear on something please specify what. i wrote this post in a hurry and i got to go to school.
  • 0

#2 xot

xot

    GMC Dismember

  • GMC Member
  • 4772 posts
  • Version:GM:Studio

Posted 06 December 2007 - 04:52 PM

Creating a real-time marching cubes algorithm in GML is not practical. Just drawing to every pixel in the window with only draw_pixel() should clearly demonstrate that GML is FAR TOO SLOW for anything like voxels.

http://en.wikipedia..../Marching_cubes
  • 0

#3 3D2DGAMES

3D2DGAMES

    GMC Member

  • GMC Member
  • 857 posts
  • Version:GM:Studio

Posted 06 December 2007 - 11:08 PM

would it be possible to emulate a voxel though? say drawing a face that faces the camera? i say this thinking the scale not to be one pixel on the screen but rather 5-20 for one face.
  • 0

#4 Games

Games

    GMC Member

  • Banned Users
  • 2968 posts

Posted 07 December 2007 - 02:08 AM

The only way this would work would be if gm was pre-programmed with this instead of its current method. I did a topic about this a while ago, and I got the same reply. It's a lot better, you don't have depth problems, there are tonnes of benefits, but it's just not how gm is made.

#5 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Member
  • 7352 posts
  • Version:Unknown

Posted 07 December 2007 - 02:21 AM

It's a lot better, you don't have depth problems, there are tonnes of benefits


None of that is true. I would like to know where you came up with this, though. If this was really true, then voxel representations would be the standard method of rendering 3D objects. Seeing as this is overwhelmingly not true, they must not be nearly as good as you seem to think.
  • 0

#6 GearGOD

GearGOD

    Deus Verus

  • GMC Member
  • 2153 posts

Posted 07 December 2007 - 03:11 AM

Gotta admit though, interest in isosurface rendering and other alternatives is increasing because the current approach is not going to be efficient for much longer with the mesh resolution growing as it is.
  • 0

#7 Games

Games

    GMC Member

  • Banned Users
  • 2968 posts

Posted 07 December 2007 - 03:21 AM

It's a lot better, you don't have depth problems, there are tonnes of benefits


None of that is true. I would like to know where you came up with this, though. If this was really true, then voxel representations would be the standard method of rendering 3D objects. Seeing as this is overwhelmingly not true, they must not be nearly as good as you seem to think.

<{POST_SNAPBACK}>


I know I'm going to lose this argument, but here's my thoughts backing up those ones..

There would be no depth problems, because like sprites, you could only have 1 voxel occupying a space. How it is right now, each face of each polygon is drawn. However, if each voxel of space was filled in, then all drawn afterwards, there would be no real overlapping at all, just a bunch of 1x1x1 cubes in space..

Maybe I don't know what Voxels are. Maybe I'm just stupid for arguing with Yourself, whom is obviously a lot smarter than I will ever be.

#8 GearGOD

GearGOD

    Deus Verus

  • GMC Member
  • 2153 posts

Posted 07 December 2007 - 03:24 AM

There would be no depth problems, because like sprites, you could only have 1 voxel occupying a space.

What, you've never seen sprites overlap? Culling is especially important with voxel rendering. Depth sorting is just as much of an issue as it is for any other primitives. Voxels as you said, are just cubes in space. The cubes are rendered using the same rules as any other geometry and have the same issues.
  • 0

#9 Games

Games

    GMC Member

  • Banned Users
  • 2968 posts

Posted 07 December 2007 - 03:29 AM

Yes, but unlike 3d, sprites never combine. They go 1 behind the other. But in a lot of 3d games I see, two walls would be in the same space and do that weird like... scratchy glitchy thing where you can see both of the walls.

Not only that, but if you draw two floors, one smaller than the other, the voxels from the smaller should replace the ones of the bigger. That's how I imagine it...

#10 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Member
  • 7352 posts
  • Version:Unknown

Posted 07 December 2007 - 04:37 AM

Not only that, but if you draw two floors, one smaller than the other, the voxels from the smaller should replace the ones of the bigger. That's how I imagine it...


Why should the size the floor matter at all? If I draw a small sprite on the screen does it appear over all the other sprites?
  • 0

#11 3D2DGAMES

3D2DGAMES

    GMC Member

  • GMC Member
  • 857 posts
  • Version:GM:Studio

Posted 10 December 2007 - 01:17 PM

what if you were able to do a fake voxel in 2d. but were able to make it rotate as if it were 3d? is that possible?
  • 0

#12 xot

xot

    GMC Dismember

  • GMC Member
  • 4772 posts
  • Version:GM:Studio

Posted 10 December 2007 - 03:01 PM

Only possible in realtime for a small number of "voxels". Doing it in D3D with a bunch of cube primitives or camera-facing sprites would be much, much faster.
  • 0

#13 WarriorArtiste

WarriorArtiste

    3d Creator

  • New Member
  • 1032 posts

Posted 10 December 2007 - 04:52 PM

Voxels just aren't practical. GM is very slow at processing trigonometric operations (ie. sine and cosine) and with say, a smallish environment with about 30,000 voxels, that's an enormous burden on the CPU. Not to mention the GPU (d3d_pr_pointlist isn't that fast.) Secondly, voxel graphics aren't that great (unless you consider Delta Force 2 having cutting edge graphics.) And I don't think Crysis uses voxels (though I could be mistaken.)

Edited by WarriorArtiste, 10 December 2007 - 04:55 PM.

  • 0

#14 3D2DGAMES

3D2DGAMES

    GMC Member

  • GMC Member
  • 857 posts
  • Version:GM:Studio

Posted 10 December 2007 - 07:56 PM

although my next question eliminates the easy factor. do you think that gamemaker could handle voxels with the help of Xtreme3D or Ultimate3D?
  • 0

#15 WarriorArtiste

WarriorArtiste

    3d Creator

  • New Member
  • 1032 posts

Posted 10 December 2007 - 08:24 PM

although my next question eliminates the easy factor. do you think that gamemaker could handle voxels with the help of Xtreme3D or Ultimate3D?

<{POST_SNAPBACK}>


Even with those DLLS, voxels would still remain a tremendous waste of CPU. Maybe someone should make a GM DLL entitled: "Voxel3d"? (It would most likely still be much slower than built in d3d.)

Edited by WarriorArtiste, 10 December 2007 - 08:26 PM.

  • 0

#16 Torthane

Torthane

    GMC Member

  • New Member
  • 164 posts

Posted 02 January 2008 - 04:58 AM

(unless you consider Delta Force 2 having cutting edge graphics.)

<{POST_SNAPBACK}>


It's true that Delta force 2 doesn't have incredible graphics for modern standards, but consider that its an old game and with modern processers, it could have beautiful terrain graphics.

For a better example, look at Outcast. It was made in 1999 and has better grapics and larger levels than some games that were made three years after. If you were to take the same engine and put it on the top end systems today, you could have some breath taking graphics.

The last thing to take into consideration (although this can't be taken advantage of right now) is hardware that's designed for rendering voxels. Like videocards with built in environment mapping sustems and such.
  • 0

#17 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 02 January 2008 - 11:52 AM

Yeah, voxels can make some good graphics relative to bad hardware. For example, Outcast ran on 600mhz CPU with 128mb of ram and without hardware accelerated video. And it had bloom, bump mapping, real time shadows, reflective water and high quality terrain. It had things that was not in games till 2003. And the games in 2003 didn't run on that quality on 600mhz, 128ram PC. Even half-life had much worse graphics but the requirements were the same. I agree that is can't be used in todays games because of the optimizations made just for polygon drawing and that higher quality models would ask higher number of voxels, but still, its a lot better than GM can do now.
  • 0

#18 Kirfew

Kirfew

    GMC Member

  • New Member
  • 27 posts

Posted 02 January 2008 - 01:13 PM

The 97 computer game Blood also used voxels to render certain objects such as pickups and tombstones. Maybe you can combine the two like in Blood to balance the load on the CPU and GPU
  • 0

#19 Torthane

Torthane

    GMC Member

  • New Member
  • 164 posts

Posted 03 January 2008 - 06:49 AM

In most voxel engines, there's one object (the map) that contains all the information and has a single array. But in 2D engines, there are multiple objects each with a position and an image (or put in the same terms as voxels, an individual array that contains all the information about the 2D voxels, or pixels.) And (of course) in a 2D game, the pixels for each object are drawn relative to that object's position and rotation, whereas in a voxel engine, it's one object, so every voxel has it's position relative to the same location and has the same direction as all the other voxels do.

To make more than 1 voxel object would be more taxing, but could fix many of the graphical issues (especially with straight lines that aren't at a right angle), making them even a little bit more powerful than they currently are.

Although I don't think that voxels are a practical method of drawing things in 3D for Game Maker, I do believe that they could be made more practical than polygons, if some work was put into it, and some time was given for it to catch on.
  • 0

#20 3D2DGAMES

3D2DGAMES

    GMC Member

  • GMC Member
  • 857 posts
  • Version:GM:Studio

Posted 26 February 2008 - 08:31 PM

holy cow look what i found! someone has made a voxel engine in gamemaker. unfortunately its an exe. if you were to shrink the view scale im sure you could speed it up a little. it only got 1 frame a second on my comp :).

http://forum.thegame...ew&t=121363&b=8

thats the link. NOTE: the screenshots arent from the gm version however the gm version is pretty nice
  • 0

#21 Solidus

Solidus

    GMC Member

  • GMC Member
  • 554 posts
  • Version:GM:Studio

Posted 27 February 2008 - 03:40 AM

There's no way you could get voxel graphics to run fast enough in GM to utilize them effectively. I think that kind of ends the discussion, unless you can find a way to make them run quickly...

Edited by Solidus, 28 February 2008 - 03:20 AM.

  • 0

#22 Yourself

Yourself

    The Ultimate Pronoun

  • GMC Member
  • 7352 posts
  • Version:Unknown

Posted 27 February 2008 - 03:58 AM

There's very few places where using voxels would actually ever be a good idea. What voxels allow you to do is describe how some scalar quantity varies over space. For example, temperature, pressure, or density. Using it to represent 3D models or terrain is usually a waste since you don't care about what's "inside" the model, which voxels tell you about. What you care about with a model is its boundary.

For the same quality of a model, a voxel representation will always take up more memory and processing (since graphics hardware is not optimized for them) than its polygonal counterpart.

The only place I can imagine them actually being a good idea is for things like volumetric fog. Voxels could store the density (and various other properties perhaps) throughout space. A voxel representation is ideal here because fog doesn't really have any sort of boundary.

Voxels are not this great new thing that will open up new possibilities for your games. Their uses are limited.
  • 0

#23 xot

xot

    GMC Dismember

  • GMC Member
  • 4772 posts
  • Version:GM:Studio

Posted 27 February 2008 - 07:15 AM

Fez, GDC winner for Excellence in Visual Art, uses voxels in a fresh and utterly gorgeous way. Because the game is 3D, but is designed to look like 2D pixel art, they developed something they call Trixels. The 3D elements were designed with voxels and then processed into polygonal models for use inside the game. They don't use a typical isosurface approach, but more of an orthogonal wrapping that preserves the shape and look of 2D pixel art when viewed with an orthogonal camera.

You can get a much better idea of the gameplay and Trixels from the 1Up.com GDC / IGF coverage starting at around the 13:30 mark:
http://www.1up.com/d...ite?cId=3145462

Stay tuned for a brief appearance by GMC's own cactus, who was an IGF finalist with his game Clean Asia!.

Edited by xot, 27 February 2008 - 07:28 AM.

  • 0

#24 Solidus

Solidus

    GMC Member

  • GMC Member
  • 554 posts
  • Version:GM:Studio

Posted 28 February 2008 - 03:19 AM

It's less about how you can use voxels and more about how they appear in-game. They give the appearance of intricate pixel art. It would be incredibly difficult and time consuming to create the art that the previous executable showed.
  • 0

#25 yellowsix

yellowsix

    GMC Member

  • New Member
  • 315 posts

Posted 29 February 2008 - 07:36 PM

Aw, darn. I spent half an hour trying to use sprites in combination with surfaces and surface_getpixel() in D3D to be remembered of the fact surfaces don't work in D3D mode. :( One of the typical stupid mistakes I always make.
I think I'm going to make my own voxel file format right now to try again... ;)
Would be a heck of a lot work to make proper looking files, but I can't come up with a better solution right now.
Anyway, I'm planning to make a small "Fez"-clone. Platform mixed with 3D has always been one of my biggest game-making fantasies.
It makes a platformer WAY more challenging. ;)

Anyway, thanks for the resources. I'll stay tuned! A voxel platformer in Game Maker would be really awesome. I like the simple style of it.

Yellowsix

PS: Don't Pokémon Pearl and Diamond use voxels? All the 'models' look pretty jaggy sometimes. The simple structure of voxel graphics is perfect for RPGs, so who knows?

[EDIT]

I was thinking: wouldn't be voxels the ultimate solution for all the collision problems in Game Maker? I mean, they're just pixels with a new dimension. That's way less difficult to check than polygons. Just an idea. :D

@Solidus: C&C Tiberian Sun and Red Alert 2 use voxels, and still they look pretty decent. (always a matter of taste, of course)

Edited by yellowsix, 29 February 2008 - 08:09 PM.

  • 0

#26 xot

xot

    GMC Dismember

  • GMC Member
  • 4772 posts
  • Version:GM:Studio

Posted 01 March 2008 - 02:00 AM

No, Pokemon games just use scaling tricks as part of the animation. That's why they look jaggy. Most games that use voxels only use them for terrain, in which case they are not usually voxels, but rather are height-maps which much lower memory requirements and much less flexibility (only surface data with no overhanging terrain). There are some notable exceptions, such as C&C and other games. Voxel rendering can be made very fast through highly optimized assembly and highly constrained specs, but I'm afraid doing them GML is going to be slow no matter how you approach it. I think the layered sprite technique is the only viable cheat.

http://gmc.yoyogames...howtopic=349959
http://gmc.yoyogames...howtopic=268526
http://gmc.yoyogames...dpost&p=1860718
  • 0

#27 yellowsix

yellowsix

    GMC Member

  • New Member
  • 315 posts

Posted 01 March 2008 - 10:55 AM

@xot: I meant only the 4th generation games. They have lots of 3d elements like terrain and buildings.
I assure you: those are NOT sprites. Their angles tilt a bit when you walk. Since its an RPG, and everything looks so jaggy, I got the idea that they use voxels.
But, like I said, just an idea. ^_^

[EDIT]

I'm writing a C&C vxl Dll right now. There are some pretty decent vxl editors around, so using this format spares a little time.

[EDIT]
^^^^^^^^^^^^^^^

Forget about that. Game Maker is throwing "Unexpected errors" all the time, and debugging in Visual Studio didn't help a lot.
I guess I'll have to do with standard binary functions or a fast IO dll.

Edited by yellowsix, 01 March 2008 - 05:37 PM.

  • 0

#28 xot

xot

    GMC Dismember

  • GMC Member
  • 4772 posts
  • Version:GM:Studio

Posted 01 March 2008 - 05:35 PM

Yeah, you are right, the DS games Pokemon Diamond and Pearl use 3D, but not voxels. Buildings, sign posts, and many props are 3D polygonal constructions, while characters, trees, grass, and some objects are 2D billboard sprites in a 3D world. Stuff looks jaggy because of the low resolution display and lack of antialiasing.
  • 0

#29 yellowsix

yellowsix

    GMC Member

  • New Member
  • 315 posts

Posted 01 March 2008 - 10:31 PM

Yeah, I justed played for a few minutes and realized everything has way too much detail to exist from voxels. Still a nice render engine, though. I like the thin grey outlines models have. Nintendo really knows how to get the max out of their system.
  • 0

#30 apegomp

apegomp

    GMC Member

  • New Member
  • 2 posts

Posted 04 March 2008 - 05:54 PM

BUMP FOR GREAT JUSTICE.
Voxels render polygons obsolete.
Try my voxel map, powered by Ken Silverman's awesome voxel engine:
http://voxelstein3d.blogspot.com/

DEATH TO POLYS!! >:lol: >:)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users