Voxel rendering 10.6 million cubes at 120 fps :)

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
yamashi
Halfling
Posts: 40
Joined: Sat Jan 23, 2010 11:27 pm

Voxel rendering 10.6 million cubes at 120 fps :)

Post by yamashi » Mon Mar 28, 2011 8:29 pm

So today I had an idea, I decided to become a competition to minecraft (yes I know...)
Well in 4 hours here is what I achieved (cosinus) :

Image

few hours later (Perlin noise with caves) :

Image

In this frame you have 16 x 16 x 128 x 18 x 18 cubes = 10.6 million cubes.
As you can see the frame rate is pretty decent !
It runs on a GTX 275.

Milestone :
- ?? Geometry Shaders ??
- Biome generation (1 day)
- Little guy to walk arround (2 hours)
- Ray casting and block placement / Destruction (1 day)

Then who knows ?!
Last edited by yamashi on Mon Mar 28, 2011 11:19 pm, edited 2 times in total.
0 x

User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by _tommo_ » Mon Mar 28, 2011 8:41 pm

Just try to add per-block lighting and textures and see where the framerate goes :D
0 x
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games

yamashi
Halfling
Posts: 40
Joined: Sat Jan 23, 2010 11:27 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by yamashi » Mon Mar 28, 2011 8:56 pm

Remains at 120 fps :)
0 x

User avatar
JamesKilton
Halfling
Posts: 87
Joined: Tue Jun 14, 2005 8:21 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by JamesKilton » Mon Mar 28, 2011 10:07 pm

As long as you don't turn into a gigantic asshole like the FortressCraft guy (his attitude is doing way more harm to his project than the fact that it's a minecraft clone...), there's nothing at all wrong with copying a design for your own project (ignoring patent / copyright issues of course). In terms of programmer art, it's really hard to get simpler than the blocky voxel-world of Minecraft and outside of that voxel worlds open up a lot of possibilities that is prohibitively hard in polygon worlds (namely, geometry creation / destruction).

You going to use geometry shaders to make it less blocky?
0 x
Ogre.rb Project Lead

yamashi
Halfling
Posts: 40
Joined: Sat Jan 23, 2010 11:27 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by yamashi » Mon Mar 28, 2011 10:52 pm

I will be using GS to update chunks and compute visibility because right now the cooking of the mesh has to be asynchronous in order to get a decent frame rate...

EDIT : Added a screenshot with textures !
0 x

TechnoBulldog
Halfling
Posts: 45
Joined: Tue Mar 16, 2010 2:49 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by TechnoBulldog » Mon Mar 28, 2011 11:28 pm

Wow, that looks pretty cool. Somehow I didn't expect OGRE to render that many cubes without a significant loss in FPS. That's pretty awesome.

The concept is pretty nice too :D
0 x
I'm learning. Breezy <- Collection of game components I'm working on.
Wow this was helpful: Quatnerion and Rotation Primer

yamashi
Halfling
Posts: 40
Joined: Sat Jan 23, 2010 11:27 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by yamashi » Mon Mar 28, 2011 11:53 pm

Ogre can't render that many cubes, it's impossible for our current hardware...
It's the algorithm I made to cull away hidden faces, cubes and chunks that makes this possible !
I might explain how it works when I find time to do so ;)

Let's say that the "cubes" that you see aren't cubes !
0 x

TechnoBulldog
Halfling
Posts: 45
Joined: Tue Mar 16, 2010 2:49 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by TechnoBulldog » Tue Mar 29, 2011 12:49 am

yamashi wrote:Ogre can't render that many cubes, it's impossible for our current hardware...
It's the algorithm I made to cull away hidden faces, cubes and chunks that makes this possible !
I might explain how it works when I find time to do so ;)

Let's say that the "cubes" that you see aren't cubes !
So what you're saying is that the only faces rendered are the ones you see? All of the others ones are removed?

That's pretty cool, I would love to learn how you did this :D
0 x
I'm learning. Breezy <- Collection of game components I'm working on.
Wow this was helpful: Quatnerion and Rotation Primer

User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by _tommo_ » Tue Mar 29, 2011 12:59 am

Minecraft also does that, you just have to tesselate only the faces that are in the middle between an empty and an occupied block.
Rendering the actual cubes would be just crazy :D

I'm doing this myself for a simple project of mine:

Image

The screenshot is old, now it runs at ~340 fps with culling on my 8600 GT, but it is not Ogre but plain OpenGL.
0 x
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games

User avatar
Praetorian
Google Summer of Code Student
Google Summer of Code Student
Posts: 171
Joined: Fri Aug 10, 2007 10:37 pm
Location: WA - USA

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by Praetorian » Tue Mar 29, 2011 1:21 am

Haha, I've been playing with something like this on and off as well :) (this is an old shot, I have simple terrain gen and such working now):

Image
0 x
My Google summer of code 2011 topic: Unit Testing Framework
My Google summer of code thread
My Google summer of code wiki page

LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by LBDude » Tue Mar 29, 2011 2:00 am

I'm doing a minecraft game also...

Some recent screenshots. It's not doing "cave" lighting yet (AO), working on that, soon.

http://imgur.com/a/SfEhR#G1ekM

Earlier I was doing 1078x1078x256 dimension for terrain. I'm running total 512x512x256 currently to work on things. Maybe eventually I will up the dimensions again. Anyways, I'm not really going to do a carbon copy of Minecraft. It's more DF than MC. Also have my own things planned.

Also some videos:

http://www.youtube.com/user/Beyznd?feat ... ke_KJIk5bs

follow my blog:

http://fdastero.tumblr.com/
twitter:
http://twitter.com/fdastero
0 x
My blog here.
Game twitter here

User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by _tommo_ » Tue Mar 29, 2011 9:48 am

Is there someone that ISN'T making a minecraft clone? :P
0 x
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by spacegaier » Tue Mar 29, 2011 9:59 am

[OT]
ME :D ! If any, then I am currently cloning "Freelancer"...
[/OT]
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

yamashi
Halfling
Posts: 40
Joined: Sat Jan 23, 2010 11:27 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by yamashi » Tue Mar 29, 2011 10:23 am

Update !

I have been doing some testing, I multithreaded the whole thing and now I get about 200 FPS with 20 x 20 chunks : 13.1 million cubes.
I will probably be adding lighting this afternoon !
0 x

User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by Mikachu » Tue Mar 29, 2011 10:36 am

_tommo_ wrote:Is there someone that ISN'T making a minecraft clone? :P
Cool! 8)
It means less people trying to create a World of Warcraft clone... :lol:
0 x
OgreProcedural - Procedural Geometry for Ogre3D

Sgw32
Halfling
Posts: 98
Joined: Mon Aug 30, 2010 9:35 am

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by Sgw32 » Tue Mar 29, 2011 4:13 pm

Just a question, do you use static geometry or just 10.6 million of Ogre Nodes? :D
Also, has your project any lighting?
0 x

User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by betajaen » Tue Mar 29, 2011 6:01 pm

_tommo_ wrote:Is there someone that ISN'T making a minecraft clone? :P
Image

Well look at that. ;)
0 x

User avatar
Herb
Gnome
Posts: 397
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by Herb » Tue Mar 29, 2011 6:47 pm

Is anyone willing to open up some source for this voxel rendering? :D I'm curious on how some of you are implementing this within Ogre.
0 x
Creator of TreeStudio - An Ogre project to create 3D tree models, check out the blog. (Project still early in development)

User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by _tommo_ » Tue Mar 29, 2011 7:26 pm

My code is open source but unfortunately it is not Ogre-based :roll:
But it should be easy to use "ManualObject" instead of "Mesh" :wink:
0 x
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games

User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by betajaen » Tue Mar 29, 2011 7:30 pm

Mine isn't voxels. It's just 5 sides of a cube rendered towards the camera. It isn't even a Minecraft clone, it was intended to be a blocky version of Virus.

I did pinch the textures from a Minecraft texture pack though. ;)
0 x

User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by PolyVox » Tue Mar 29, 2011 7:34 pm

Herb wrote:Is anyone willing to open up some source for this voxel rendering? :D I'm curious on how some of you are implementing this within Ogre.
I have an open source library available here: http://www.thermite3d.org

The library is called PolyVox, and the engine which combines it with Ogre is called Thermite3D. The main features of PolyVox are:
  • Storage of very large (paged) volumes
  • Surface extraction of both smooth and Minecraft style terrain,
  • Level of detail,
  • Ambient occlusion,
  • A* pathfinding,
  • Picking
  • Various other things.
Several people are using it with Ogre, including myself (Ogre3D forum thread is here).

It's written in C++ and is under the zlib license.
Last edited by PolyVox on Tue Mar 29, 2011 8:23 pm, edited 1 time in total.
0 x

LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by LBDude » Tue Mar 29, 2011 7:44 pm

Hey I use PolyVox.

My source is not opened *right* now... sorry :( and I don't think it's a good idea to use what I'm doing as an example either.

It's really easy to implement with PolyVox though, I'm also willing to share insights on implementation, lighting, rendering, etc.
0 x
My blog here.
Game twitter here

User avatar
Lee04
Minaton
Posts: 944
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by Lee04 » Wed Mar 30, 2011 10:49 am

Anyone looking for the "next" thing in blocky world games, contact me I have some nifty ideas that will transform the blocky world to the next level.
0 x
Ph.D. student in game development

videl
Halfling
Posts: 54
Joined: Mon Oct 26, 2009 7:40 pm
Location: Switzerland
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by videl » Wed Mar 30, 2011 6:40 pm

Waiting for a "smoothcraft" with a smooth terrain and detailled objects :D

Looks great what you did so far
0 x

User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
Contact:

Re: Voxel rendering 10.6 million cubes at 120 fps :)

Post by PolyVox » Wed Mar 30, 2011 6:50 pm

videl wrote:Waiting for a "smoothcraft" with a smooth terrain and detailled objects :D
I haven't added any objects (though you can insert any Ogre mesh) but smooth voxel terrain is not difficult. See http://www.ogre3d.org/forums/viewtopic. ... 25#p364552

Of course building a game from it is more work... :wink:
0 x

Post Reply