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!

Voxel rendering 10.6 million cubes at 120 fps :)

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

For this message the author yamashi has received kudos
yamashi
Halfling
 
Posts: 40
Kudos: 2
Joined: 23 Jan 2010

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

Postby _tommo_ » Mon Mar 28, 2011 8:41 pm

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
User avatar
_tommo_
Gnoll
 
Posts: 677
Kudos: 3
Joined: 19 Sep 2006

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

Postby yamashi » Mon Mar 28, 2011 8:56 pm

Remains at 120 fps :)
yamashi
Halfling
 
Posts: 40
Kudos: 2
Joined: 23 Jan 2010

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

Postby 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?
Ogre.rb Project Lead
User avatar
JamesKilton
Halfling
 
Posts: 87
Kudos: 1
Joined: 14 Jun 2005

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

Postby 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 !
yamashi
Halfling
 
Posts: 40
Kudos: 2
Joined: 23 Jan 2010

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

Postby 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
I'm learning. Breezy <- Collection of game components I'm working on.
Wow this was helpful: Quatnerion and Rotation Primer
TechnoBulldog
Halfling
 
Posts: 45
Kudos: 3
Joined: 16 Mar 2010

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

Postby 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 !
yamashi
Halfling
 
Posts: 40
Kudos: 2
Joined: 23 Jan 2010

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

Postby 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
I'm learning. Breezy <- Collection of game components I'm working on.
Wow this was helpful: Quatnerion and Rotation Primer
TechnoBulldog
Halfling
 
Posts: 45
Kudos: 3
Joined: 16 Mar 2010

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

Postby _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.
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games
User avatar
_tommo_
Gnoll
 
Posts: 677
Kudos: 3
Joined: 19 Sep 2006

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

Postby 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
My Google summer of code 2011 topic: Unit Testing Framework
My Google summer of code thread
My Google summer of code wiki page
User avatar
Praetorian
Google Summer of Code Student
Google Summer of Code Student
 
Posts: 171
Kudos: 5
Joined: 10 Aug 2007
Location: WA - USA

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

Postby 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
My blog here.
Game twitter here
LBDude
Gnome
 
Posts: 389
Kudos: 22
Joined: 26 Jul 2010

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

Postby _tommo_ » Tue Mar 29, 2011 9:48 am

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
_tommo_
Gnoll
 
Posts: 677
Kudos: 3
Joined: 19 Sep 2006

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

Postby spacegaier » Tue Mar 29, 2011 9:59 am

[OT]
ME :D ! If any, then I am currently cloning "Freelancer"...
[/OT]
Ogre Admin [DevTeamMember, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your sparetime? Help the Ogre wiki grow!
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
 
Posts: 3971
Kudos: 95
Joined: 04 Feb 2008
Location: Germany

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

Postby 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 !
yamashi
Halfling
 
Posts: 40
Kudos: 2
Joined: 23 Jan 2010

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

Postby 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:
OgreProcedural - Procedural Geometry for Ogre3D
User avatar
Mikachu
Gnoll
 
Posts: 602
Kudos: 36
Joined: 28 Jul 2005
Location: Nice, France

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

Postby 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?
Sgw32
Halfling
 
Posts: 82
Kudos: 4
Joined: 30 Aug 2010

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

Postby 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. ;)
User avatar
betajaen
OGRE Moderator
OGRE Moderator
 
Posts: 3446
Kudos: 57
Joined: 18 Jul 2005
Location: Wales, UK

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

Postby 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.
User avatar
Herb
Goblin
 
Posts: 262
Kudos: 20
Joined: 04 Jun 2009
Location: Kalamazoo,MI

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

Postby _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:
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games
User avatar
_tommo_
Gnoll
 
Posts: 677
Kudos: 3
Joined: 19 Sep 2006

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

Postby 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. ;)
User avatar
betajaen
OGRE Moderator
OGRE Moderator
 
Posts: 3446
Kudos: 57
Joined: 18 Jul 2005
Location: Wales, UK

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

Postby 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.
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1316
Kudos: 18
Joined: 21 Nov 2006
Location: Groningen, The Netherlands

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

Postby 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.
My blog here.
Game twitter here
LBDude
Gnome
 
Posts: 389
Kudos: 22
Joined: 26 Jul 2010

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

Postby 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.
Ph.D. student in game development
User avatar
Lee04
Gargoyle
 
Posts: 1014
Kudos: 2
Joined: 05 Jul 2004
Location: Sweden

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

Postby 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
videl
Halfling
 
Posts: 54
Kudos: 0
Joined: 26 Oct 2009
Location: Switzerland

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

Postby 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.php?f=11&t=27394&start=225#p364552

Of course building a game from it is more work... :wink:
User avatar
PolyVox
OGRE Contributor
OGRE Contributor
 
Posts: 1316
Kudos: 18
Joined: 21 Nov 2006
Location: Groningen, The Netherlands

Next

Return to Showcase

Who is online

Users browsing this forum: Bing [Bot], Nauk and 10 guests