Topic:   AbsurdEngine Voxels   (Read 29346 times)


0 Members and 1 Guest are viewing this topic.

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
AbsurdEngine Voxels
« on: July 30, 2012, 12:45:32 AM »
I'd like to share my progress with the voxel renderer that I started in SilverCreator two years ago and then ported to .NET and Mono. I've expanded the basic height map rendering algorithm with the ability to render arbitrary 3d scenes built with voxels.

A voxel is a 3d pixel. Voxel renders therefore do not render polygons built out of triangles like most 3d renderers, but instead render lots of little cubes. Games like Minecraft use a voxel data structure to store their world, but convert the world into polygons and render it conventionally. On the other hand, renderers like mine draw the voxels directly.

Voxels are interesting because they easily solve problems that are extremely complicated in polygon renderers such as modifying the environment at runtime and rendering fine details and rough surfaces. In my engine, it only takes a few lines of code to blast a shockwave from under the player that ripples the world dramatically. I think that a world built of voxels has the potential to feel much more dynamic and malleable than one built of polygons, which intrigues my artistic side.

Nightmare test land.



No graphics test is complete without shaded cubes.



The world is stored as a 2d array of linked lists of vertical voxel spans. I use raycasting to project spans of voxels to the screen one vertical scanline at a time with no overdraw. The major limitation of this technique is that the camera is restricted to four degrees of freedom: translation along the three axes and rotation around the vertical. I use a perspective distortion hack to achieve tilting and haven't yet implemented rolling. It is possible to achieve six degrees of mathematically correct freedom in a renderer like this, but in my opinion if it looks right, then it is.

The next step for this project is adding voxel-built models to the scene and transforming them. Then optimization. Then maybe a game.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: AbsurdEngine Voxels
« Reply #1 on: July 30, 2012, 12:49:14 AM »
That looks epic!

I'd love to play with a nice â„¢WarHampster Voxel Game Engine.

Circuit


  • GMG-er

  • **


  • Posts: 299

  • blast from the past
Re: AbsurdEngine Voxels
« Reply #2 on: July 30, 2012, 03:16:56 AM »
That's awesome!  I wish I could see it in action.  The shockwave effect sounds intriguing.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: AbsurdEngine Voxels
« Reply #3 on: July 31, 2012, 10:36:00 PM »
Ace of Spades uses both kinds of voxel rendering! The world has polygons and the models are rendered with squares.
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: AbsurdEngine Voxels
« Reply #4 on: August 01, 2012, 11:12:16 AM »
Actually Ace of Spades uses the Voxlap engine, which is an old school voxel render that uses a similar algorithm to mine! The world boxes are made of lots of little boxes I believe.

Zoo


  • GMG Extraordinaire

  • ***


  • Posts: 1686
    • My Bandcamp
Re: AbsurdEngine Voxels
« Reply #5 on: August 01, 2012, 01:43:02 PM »
That game was kindof fun. but it got boring because people are idiots
Kirby, your pudgy buddy from dream land, is back again on the game boy®!

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: AbsurdEngine Voxels
« Reply #6 on: August 02, 2012, 04:59:26 PM »
Sometimes flag caps it that game are too easy.
I just tunnel all the way underneath the thing and dig up, it literally falls down into your hole and then you just run.
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: AbsurdEngine Voxels
« Reply #7 on: August 08, 2012, 01:35:24 PM »
I played exactly one fun game of Ace of Spades, then everything turned to shit. It was one really fun game though.

I've been experimenting with different methods of representing the camera. Originally I used euclidean angles: rotationX = x degrees, fov = x degrees, etc. Then I could cast rays within the view frustum formed by the field of view angle at the camera's current orientation. I tried switching everything to vectors: I stored a vector representing the direction of the camera and cast rays along a plane perpendicular to it, the field of view being implicit according to the length of the plane. This worked but required more calculations per ray (linear algebra to calculate the vector representation of each ray). On the other hand, working with vectors is much more natural when it comes to perspective projection of models, which is what I'm working on next. I'll probably settle for a hybrid approach.

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: AbsurdEngine Voxels
« Reply #8 on: August 12, 2012, 02:55:06 PM »
Finished changing the camera data to vectors. Going to work on projecting objects: first step is 2d Doom style sprites, then 3d voxel models.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: AbsurdEngine Voxels
« Reply #9 on: August 12, 2012, 04:18:21 PM »
Sweet!

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: AbsurdEngine Voxels
« Reply #10 on: August 19, 2012, 12:13:08 PM »
Sprites are in:


Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: AbsurdEngine Voxels
« Reply #11 on: August 19, 2012, 03:13:18 PM »
Hahahahahha. I like them sprites.

Circuit


  • GMG-er

  • **


  • Posts: 299

  • blast from the past
Re: AbsurdEngine Voxels
« Reply #12 on: August 19, 2012, 04:01:40 PM »
My word.  It looks like an anthropomorphic Pikachu with the lower half of its body shaved.   This is 10 times more horrifying than Doom.  :o

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: AbsurdEngine Voxels
« Reply #13 on: August 19, 2012, 07:05:00 PM »
Er, um, Circuit said it for me. ???
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: AbsurdEngine Voxels
« Reply #14 on: August 19, 2012, 07:21:02 PM »
You're scared? ...

Not scared enough.