Jump to content


Destructible Terrain Prototype


10 replies to this topic

#1 LukasBoersma

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationAachen, Germany

Posted 22 February 2013 - 03:15 PM

Hi,

some months ago, some friends and I had the idea to create a Minecraft-like game with destructible terrain, but without blocks. We made a prototype and it worked pretty well. It features an infinitely large procedural world and correct physics interaction with the terrain. Everything is written from scratch in plain OpenGL, currently supporting Linux and Windows. Here is some footage:



For an overview of the technical details, have a look at this post on our blog.

We are currently rewriting the whole engine, with a long-term goal to create a game engine that allows easy creation of mods and games based on our terrain technology. The mid-term goal for the next year is to release a sandbox game with Minecraft-like gameplay.

We recently set up a blog where you will find regular updates on our progress and some technical devblog articles that might be interesting to you: http://upvoid.com

We are working on this for some time now, so we are grateful for any feedback. Let us hear what you think!

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationBellevue, WA

Posted 22 February 2013 - 06:15 PM

Neat! Looks very pretty. The procedural texturing and grass planting on the terrain is quite nice. I noticed there weren't any shadows in the demo though. :) If you can get some proper lighting with shadows and GI (would have to be realtime GI given the dynamic terrain, maybe using VPLs or light propagation volumes), then it would be really awesome. :)
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 TheNut

    Senior Member

  • Moderators
  • 1699 posts
  • LocationThornhill, ON

Posted 22 February 2013 - 06:19 PM

Hi Lukas,

Nice work you've done. It's not often I see devs reference academic material, nice :) I only heard very little about dual contouring, but marching cubes I would say is not that complex. You just need to wrap your head around the idea of 256 possible combinations and how that can be condensed into 15 sets with their own variations in rotation. I've had quite good success with the algorithm, but it's good to see alternatives being used out there. Are you still able to get good data compression with that algorithm?

The grass is nicely done too, but by using a geometry shader you are requiring your users to support OGL 3.X. You will also run into fillrate issues, so if not already it's a good idea to set a maximum range and limit the number of grass blades (billboards) you render.

Nonetheless, nice stuff.
http://www.nutty.ca - Being a nut has its advantages.

#4 LukasBoersma

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationAachen, Germany

Posted 23 February 2013 - 12:21 AM

Thanks for the positive feedback! It's motivating to hear that.

View PostReedbeta, on 22 February 2013 - 06:15 PM, said:

Neat! Looks very pretty. The procedural texturing and grass planting on the terrain is quite nice. I noticed there weren't any shadows in the demo though. :) If you can get some proper lighting with shadows and GI (would have to be realtime GI given the dynamic terrain, maybe using VPLs or light propagation volumes), then it would be really awesome. :)

Yup, our new engine already contains soft, dynamic shadows. Expect some screenshots soon. We'll probably also add some kind of SSGI or at least SSAO, but at the moment we are focusing on the terrain and the overall architecture of our engine.

View PostTheNut, on 22 February 2013 - 06:19 PM, said:

Nice work you've done. It's not often I see devs reference academic material, nice :) I only heard very little about dual contouring, but marching cubes I would say is not that complex. You just need to wrap your head around the idea of 256 possible combinations and how that can be condensed into 15 sets with their own variations in rotation. I've had quite good success with the algorithm, but it's good to see alternatives being used out there.

While the idea behind marching cubes is simple (and of course it has proven to work well in many situations), I think it's not as elegant to implement when it comes to all the cases you have to handle. With dual contouring, we only have two possible cases in each cell.

View PostTheNut, on 22 February 2013 - 06:19 PM, said:

Are you still able to get good data compression with that algorithm?

In the prototype you see here, absolutely no data compression is used, we simply have chunks of float arrays containing density values. In our new system, we have a more sophisticated approach for the terrain data, allowing sharp edges and shapes like arbitrarily rotated cubes by directly saving intersection planes btween different materials. We'll post a devblog article about this soon.

View PostTheNut, on 22 February 2013 - 06:19 PM, said:

The grass is nicely done too, but by using a geometry shader you are requiring your users to support OGL 3.X. You will also run into fillrate issues, so if not already it's a good idea to set a maximum range and limit the number of grass blades (billboards) you render.

Yes, we require OpenGL 3.1 plus geometry shaders. The Intel HD3000 card is the minimum configuration we currently plan to support. If there ever will be enough users with older cards, writing fallback solutions for those geometry shaders might be an option.

The grass is currently a very primitive implementation. Of course, when you have a really high viewing distance, you don't want to render grass billboards everywhere. We are currently experimenting with blending into grass textures smoothly. Turned out to not be that easy.

I'll post updates here whenever we have something new to show. If you have any further questions, don't hesitate to ask. We also try to post technical articles in our devblog section on a regular basis, so if there is anything you would like to hear about in detail, we are open to suggestions!

#5 Reedbeta

    DevMaster Staff

  • Administrators
  • 5307 posts
  • LocationBellevue, WA

Posted 23 February 2013 - 12:29 AM

View PostLukasBoersma, on 23 February 2013 - 12:21 AM, said:

We are currently experimenting with blending into grass textures smoothly. Turned out to not be that easy.

In case you're not already aware, there is some academic work on this - Kevin Boulanger's thesis talks in detail about blending seamlessly between mesh and texture versions of grass.
reedbeta.com - developer blog, OpenGL demos, and other projects

#6 Stainless

    Member

  • Members
  • PipPipPipPip
  • 578 posts
  • LocationSouthampton

Posted 23 February 2013 - 10:00 AM

I'm very jealous.

I can only use Opengles 2, so I don't have the ability to use geometry shaders or render to texture.

I like the idea of the dual contouring approach though, time to play.

#7 LukasBoersma

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationAachen, Germany

Posted 27 February 2013 - 06:33 PM

View PostReedbeta, on 23 February 2013 - 12:29 AM, said:

In case you're not already aware, there is some academic work on this - Kevin Boulanger's thesis talks in detail about blending seamlessly between mesh and texture versions of grass.

Thanks, that will come in handy. In case anybody is interested, we wrote an article about the grass rendering in our prototype: http://upvoid.com/de...rototype-grass/

#8 Indecom

    New Member

  • Members
  • Pip
  • 7 posts

Posted 27 February 2013 - 11:00 PM

Hey that's looking pretty cool. the only suggestion i can think of is for implementation of terrain damage to simulate actual destruction, right now its more like terrain sculpting. To simulate damage, you could merely use a dirt texture for any changed voxels while retaining the grass and plant textures/meshes for the unchanged voxels. Looks super slick so far though dude :)
Posted Image

#9 LukasBoersma

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationAachen, Germany

Posted 15 March 2013 - 08:24 AM

We just published a new video showing our completely rewritten terrain engine. Things are becoming pretty again, but of course, everything is still in a very early stage. Especially the jaggy material intersections and normals still have to be fixed. And of course there will be no grass in holes you just created in the final game :)



#10 Stainless

    Member

  • Members
  • PipPipPipPip
  • 578 posts
  • LocationSouthampton

Posted 15 March 2013 - 09:49 AM

How big can your worlds be? The demo makes the terrain look a little small.

Also at 43 seconds in there seems to be a glitch at the top left corner, looks like you have a thin terrain section that hasn't been erased properly.

Otherwise looking interesting, I would like to see a world created with alien textures. Blue grass, purple water, green sky.

Think the sculpted look you already have will look beautiful as an alien world

#11 LukasBoersma

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationAachen, Germany

Posted 15 March 2013 - 11:11 AM

View PostStainless, on 15 March 2013 - 09:49 AM, said:

How big can your worlds be? The demo makes the terrain look a little small.

The world is infinitely big. The mountains in the background are actually quite far away from the camera. I think this will become better visible when there will be more details in the scene (trees and other stuff).

View PostStainless, on 15 March 2013 - 09:49 AM, said:

Also at 43 seconds in there seems to be a glitch at the top left corner, looks like you have a thin terrain section that hasn't been erased properly.

I think what you mean are the transparent debug boxes that show up whenever the geometry has changed. Everything is still so work in progress that we didn't remove them for the video.

The alien world sounds like a cool idea, I will try this.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users