Planet Rendering Engine preview (released Jul/20/2009)

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!
User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Planet Rendering Engine preview (released Jul/20/2009)

Postby JohnJ » Wed Feb 20, 2008 10:59 pm

Ever since I started 3D programming, I've always wanted to be able to make a futuristic game where you could seamlessly enter/exit planets, and explore everywhere (among other things :) ).

I considered working with Hexidave's OgrePlanet project and getting that all working, but decided I'd try making my own planet rendering engine from scratch would be more fun (and I'd learn more, since I've never created an LOD terrain system before).

I just recently started this little project, a planet rendering engine, and after about a week of work I think it's turning out very well. Everything is dynamically paged (thread-ready, although I haven't threaded it yet), has an practically infinitely scalable LOD system, and is very fast. Here's a preview:

Image
Image
Image
Image
Image

There's still a bit more to do though (dynamic lighting, further optimization), so it'll probably be a while longer before I release anything.

Feel free to post any questions or comments you may have :).
Last edited by JohnJ on Tue Jul 21, 2009 6:04 am, edited 1 time in total.
0 x

Seregvan
Gremlin
Posts: 167
Joined: Sat Dec 15, 2007 11:44 pm

Postby Seregvan » Wed Feb 20, 2008 11:54 pm

looks nice :D especially fps =) can you capture a video?
0 x

User avatar
CaseyB
OGRE Contributor
OGRE Contributor
Posts: 1335
Joined: Sun Nov 20, 2005 2:42 pm
Location: Columbus, Ohio
Contact:

Postby CaseyB » Thu Feb 21, 2008 12:02 am

How is the terrain being created? Heightmap?
0 x
Image
Image

User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Postby JohnJ » Thu Feb 21, 2008 12:08 am

CaseyB wrote:How is the terrain being created? Heightmap?

Yes, for now, although the engine uses a flexible loader system similar to PagedGeometry's so it can be modified to load from any source you want. A planet is basically a cube mapped onto a sphere, so you can apply 6 heightmaps currently (the planet in the screenshots above uses the same heightmap+texture for all 6 faces of the cube).

Seregvan wrote:can you capture a video?

Here: PlanetEngine Video (3 MB)
0 x

User avatar
Klaim
Old One
Posts: 2565
Joined: Sun Sep 11, 2005 1:04 am
Location: Paris, France
Contact:

Postby Klaim » Thu Feb 21, 2008 12:10 am

Wow that's interesting O__O
0 x

User avatar
skullfire
Gremlin
Posts: 150
Joined: Sat Mar 19, 2005 7:51 pm
Location: San Jose, Costa Rica
Contact:

Postby skullfire » Thu Feb 21, 2008 12:20 am

Really interesting. This could really be used on a game I was designing....

Just a question, does mapping the cube with a sphere generate seams or general uv problems?
0 x
I may have alzheimer, but at least I dont have alzheimer.

User avatar
RedEyeCoder
Gnome
Posts: 344
Joined: Sat Jun 16, 2007 7:29 am
Location: Brisbane, Australia

Postby RedEyeCoder » Thu Feb 21, 2008 12:23 am

This is really nice JohnJ, can't wait to see where this goes!
0 x

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

Postby betajaen » Thu Feb 21, 2008 12:25 am

Damn nice!

Now will somebody use this and create a clone of Frontier Elite II for me. ;)
0 x

draxd2007
Kobold
Posts: 31
Joined: Sat Jul 07, 2007 2:30 pm

Postby draxd2007 » Thu Feb 21, 2008 1:01 am

betajaen : check this http://www.a-astra.com/
To bad is not opensource
0 x

User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Postby JohnJ » Thu Feb 21, 2008 1:01 am

Just a question, does mapping the cube with a sphere generate seams or general uv problems?

Not really. There's no distortion of the mesh of UVs near the seams as you would if you simply normalized a vector to convert to a sphere - this uses a special formula to uniformly map the polygons onto a sphere. There are seams in the planet in the screenshots above though, but only because the texture doesn't tile seamlessly (I tried it with one that does and it looks fine).

BTW, here's what I mean when I say "practically infinitely scalable LOD system": PlanetEngine Video 2 (2.5 MB)

I basically tiled the heightmap and texturemap in that video several times to make the planet 64 times larger than the 1024x1024x6 planet in the previous screenshots. Of course, it doesn't look nice when tiled like that, but it demonstrates the scalability of the LOD system.

The planet in this video, unoptimized, would have 805 million polygons. It runs at 500 - 1300 FPS in my engine.

Edit: Wow. I just increased the resolution again as a test, and a 32768x32768x6 planet renders at 300 - 1300 FPS. That would be 12.8 billion polygons unoptimized.

Edit #2: Fixed broken link to video (sorry about that).
0 x

User avatar
RedEyeCoder
Gnome
Posts: 344
Joined: Sat Jun 16, 2007 7:29 am
Location: Brisbane, Australia

Postby RedEyeCoder » Thu Feb 21, 2008 3:01 am

Is it possible to see a shot from the perspective of a human standing on the ground?
0 x

mr. iknoweverything
Halfling
Posts: 72
Joined: Thu Jul 12, 2007 5:39 pm
Location: berlin

Postby mr. iknoweverything » Thu Feb 21, 2008 4:06 am

Tryin to rain on Hexidave's parade?

Funky Framerates though. Any special tricks involved?
0 x

User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Postby JohnJ » Thu Feb 21, 2008 4:41 am

Is it possible to see a shot from the perspective of a human standing on the ground?

It's possible, but currently the ground looks pretty blurry, since I only have basic texturing working right now (I could show you a screenshot if you want though). Once I get more advanced texturing (like splatting) and shading (like normal maps) working, it'll look just like any other terrain engine, except it's a spherical planet of course.

Also, you may have noticed that the terrain in the screenshots/videos suffers from the "stairstep effect", due to the fact I'm using a 8-bit greyscale heightmap. Increasing to 16-bit .RAW heightmaps will solve this problem.

Tryin to rain on Hexidave's parade?

Funky Framerates though. Any special tricks involved?

Well from what I can tell HexiDave's OgrePlanet uses an algorithm somewhat different from mine. My engine is basically an implementation of the "Chunked LOD" technique by Thatcher Ulrich, only it's adapted to be spherical (for planets).

The Chunked LOD algorithm is very CPU efficient and extremely batch-friendly, which is why I think the frame rates are as high as they are (also keep in mind that it's running on a GeForce 7800 GT and that this is rendering the planet only - there's no sky, grass, trees, etc. yet, as you can see). Also, in my implementation, my Planet class derives from the MovableObject class, which means I was free to implement the culling, LOD, etc. at a very low level, and therefore allowed me to optimize it quite well in terms of CPU usage. Before it occurred to me that I could define a MovableObject this way, I thought it wasn't going to be possible, since adding and removing Ogre's SceneNode's from the scene is actually suprisingly slow, as I discovered when trying to implement a dynamically paging entity system for PagedGeoemtry. But fortunately, Ogre gives you many levels of customization, so implementing just about anything possible :)

Also, I chose to create my own planet engine rather than start with HexiDave's not only because his was incomplete, but because this way I can more easily provide a tight integration between the planet rendering library and a planetary vegetation rendering library.
0 x

User avatar
HexiDave
OGRE Expert User
OGRE Expert User
Posts: 1538
Joined: Sat Jan 14, 2006 8:00 pm

Postby HexiDave » Thu Feb 21, 2008 6:14 am

Hey, power to ya - I'll eventually pick work back up on mine, but at least now people will have something to use rather than waiting for me to get to work again. Plus, as you said, you're learning something that you enjoy, so bonus points.
0 x

User avatar
RedEyeCoder
Gnome
Posts: 344
Joined: Sat Jun 16, 2007 7:29 am
Location: Brisbane, Australia

Postby RedEyeCoder » Thu Feb 21, 2008 7:00 am

It's possible, but currently the ground looks pretty blurry, since I only have basic texturing working right now (I could show you a screenshot if you want though). Once I get more advanced texturing (like splatting) and shading (like normal maps) working, it'll look just like any other terrain engine, except it's a spherical planet of course.


I am more interested in the geometry than how fancy your material is :)
0 x

User avatar
Alexander
Gremlin
Posts: 175
Joined: Sat Aug 05, 2006 3:55 am

Postby Alexander » Thu Feb 21, 2008 7:41 am

This looks kick-ass!
0 x

User avatar
lf3thn4d
Orc
Posts: 478
Joined: Mon Apr 10, 2006 9:12 pm

Postby lf3thn4d » Thu Feb 21, 2008 8:10 am

Cool! Paging geometry support as well? :P
The planet must have tress and grass! Hehe. Great work! :)
0 x

User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2701
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia

Postby syedhs » Thu Feb 21, 2008 8:50 am

Yes JohnJ is kicking ass as usual! :) I think JohnJ is getting slightly bored developing PagedGeometry, so this maybe his new focus.. :wink:

On a serious note, do you intend to develop this code further toward Planetary sceneries or something like PLSM (or better, both! :) ). I prefer the latter much better hehe.
0 x

bharling
Gremlin
Posts: 166
Joined: Fri Jun 30, 2006 1:04 pm

Postby bharling » Thu Feb 21, 2008 10:54 am

Thats looking absolutely great.

As a short term solution for texturing and lighting, I have a modified version of the Triplanar texturing shader that incorporates perpixel lighting that you could use if you want. I can PM it to you. It means you'd only have to worry about the heightmap as the texture map would be automatically calculated.
0 x
Was here

User avatar
ghoulsblade
Halfling
Posts: 83
Joined: Sun Mar 05, 2006 2:55 pm
Location: Munich, Bavaria, Germany
Contact:

Postby ghoulsblade » Thu Feb 21, 2008 2:47 pm

uuuh, sweeet =D
0 x
ogre+lua= http://lugre.sf.net spacegame: http://sfz.sf.net ultima-online 3d client : http://iris2.de

eLunir
Gremlin
Posts: 181
Joined: Thu Jan 17, 2008 10:04 pm

Postby eLunir » Thu Feb 21, 2008 3:07 pm

Great work, JohnJ! Congrats on another epic project!

But are you planning to develop further though, or was just fun & some learning?
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Postby sinbad » Thu Feb 21, 2008 6:03 pm

Excellent work!
0 x

User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Postby JohnJ » Thu Feb 21, 2008 6:05 pm

Plus, as you said, you're learning something that you enjoy, so bonus points.

Yeah, terrain rendering's one area of 3D programming I've neglected learning so far, so I'm glad I'm learning about it now. Plus it's fun :)

am more interested in the geometry than how fancy your material is :)

Ok, here's a picture from ground level:
Image
As you can see, the ground is very jagged due to the 8-bit heightmap.

Also, here's a shot demonstrating the quadtree-based LOD system:
Image
Here I moved to a point on the ground, froze the LOD state, then backed off into space where you can see the effect. The LOD parameters were also modified to make the effect more visible.

Cool! Paging geometry support as well? :P
The planet must have tress and grass! Hehe. Great work! :)

Thanks. Yeah, I definitely plan on implementing something like PagedGeometry for planetary terrains, but I haven't even started on that yet.

On a serious note, do you intend to develop this code further toward Planetary sceneries or something like PLSM (or better, both! :)). I prefer the latter much better hehe.

I'm not sure what you mean. I intend to continue development on it to the point where you can render very nice looking, huge planets. I probably won't make it a flat terrain system if that's what you mean.

As a short term solution for texturing and lighting, I have a modified version of the Triplanar texturing shader that incorporates perpixel lighting that you could use if you want. I can PM it to you. It means you'd only have to worry about the heightmap as the texture map would be automatically calculated.

Well texture mapping is pretty much solved already (although I guess it can't hurt to try other method), but lighting could be helpful. I hope to implement some sort of normal-map & ambient-occlusion, based on the sun's position of course. I think nVidia FX composer has a CG shader that does ambient occlusion so I already have something to work with.

But are you planning to develop further though, or was just fun & some learning?

Yeah, I definitely plan on further developing this into something usable in a real game - not just a planet renderer, but integrated atmosphere/sky, clouds, vegetation, physics, possibly procedural planet generation tools, and maybe more.

Edit:
Sinbad wrote:Excellent work!

Thanks :). It seems the more I try to do in Ogre, the more Ogre surprises me with it's great flexibility :D.
0 x

User avatar
Evak
Orc Shaman
Posts: 707
Joined: Sun Apr 02, 2006 7:51 pm
Location: Sacramento, CA
Contact:

Postby Evak » Thu Feb 21, 2008 7:41 pm

Damn, I always wanted to make something like a Elite game with planet landings. Nice to see someone tackling the problem with planets :)
0 x

User avatar
Lord Alexion
Kobold
Posts: 29
Joined: Wed Oct 19, 2005 2:46 pm
Location: São Paulo, Brazil
Contact:

Postby Lord Alexion » Thu Feb 21, 2008 8:21 pm

Seems like I'm not the only one with the idea of making the next ELITE-like space sim huh?

I've been toying with that idea for quite a while now, however never had the time necessary to actually implement some solution for it (unfortunately my job takes up all my time... *sigh*). I've been reading some materials about planetary LOD geometry and trying to implement some things (nothing concrete so far) and I must say, WOW. I'm mesmerized.

Maybe you're interested in releasing the source for this? :) would LOVE to see how this goes with some atmospheric scattering shaders
0 x


Return to “Showcase”

Who is online

Users browsing this forum: No registered users and 4 guests