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
x 2

Voxel rendering 10.6 million cubes at 120 fps :)

Post by yamashi »

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.
User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
x 5
Contact:

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

Post by _tommo_ »

Just try to add per-block lighting and textures and see where the framerate goes :D
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
x 2

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

Post by yamashi »

Remains at 120 fps :)
User avatar
JamesKilton
Halfling
Posts: 87
Joined: Tue Jun 14, 2005 8:21 pm
x 1

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

Post by JamesKilton »

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?
Ogre.rb Project Lead
yamashi
Halfling
Posts: 40
Joined: Sat Jan 23, 2010 11:27 pm
x 2

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

Post by yamashi »

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 !
TechnoBulldog
Halfling
Posts: 45
Joined: Tue Mar 16, 2010 2:49 pm
x 3

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

Post by TechnoBulldog »

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
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
x 2

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

Post by yamashi »

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 !
TechnoBulldog
Halfling
Posts: 45
Joined: Tue Mar 16, 2010 2:49 pm
x 3

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

Post by TechnoBulldog »

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
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
x 5
Contact:

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

Post by _tommo_ »

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.
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
x 5

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

Post by Praetorian »

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
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
x 22

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

Post by LBDude »

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
My blog here.
Game twitter here
User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
x 5
Contact:

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

Post by _tommo_ »

Is there someone that ISN'T making a minecraft clone? :P
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

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

Post by spacegaier »

[OT]
ME :D ! If any, then I am currently cloning "Freelancer"...
[/OT]
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
x 2

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

Post by yamashi »

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 !
User avatar
Mikachu
Gnoll
Posts: 603
Joined: Thu Jul 28, 2005 4:11 pm
Location: Nice, France
x 35

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

Post by Mikachu »

_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:
OgreProcedural - Procedural Geometry for Ogre3D
Sgw32
Greenskin
Posts: 100
Joined: Mon Aug 30, 2010 9:35 am
x 11

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

Post by Sgw32 »

Just a question, do you use static geometry or just 10.6 million of Ogre Nodes? :D
Also, has your project any lighting?
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58
Contact:

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

Post by betajaen »

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

Well look at that. ;)
User avatar
Herb
Orc
Posts: 412
Joined: Thu Jun 04, 2009 3:21 am
Location: Kalamazoo,MI
x 38

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

Post by Herb »

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.
User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
x 5
Contact:

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

Post by _tommo_ »

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:
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
x 58
Contact:

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

Post by betajaen »

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. ;)
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

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

Post by PolyVox »

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.
LBDude
Gnome
Posts: 389
Joined: Mon Jul 26, 2010 10:53 pm
x 22

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

Post by LBDude »

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.
My blog here.
Game twitter here
User avatar
Lee04
Minaton
Posts: 945
Joined: Mon Jul 05, 2004 4:06 pm
Location: Sweden
x 1

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

Post by Lee04 »

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.
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 »

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

Looks great what you did so far
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
Posts: 1316
Joined: Tue Nov 21, 2006 11:28 am
Location: Groningen, The Netherlands
x 18
Contact:

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

Post by PolyVox »

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:
Post Reply