OgrePlanet (or "Oh noes, not another planet engine!")

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
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

Yep, yet another planet engine...

Still quite some bit to go before I'm happy, though... Need texturing (all coloring done in shader atm), better water, better atmosphere, better lighting...
Attachments
Rolling hills and green pastures
Rolling hills and green pastures
Looking down on some mountains
Looking down on some mountains
The planet seen from orbit
The planet seen from orbit
paul kennedy
Gnoblar
Posts: 5
Joined: Fri Jan 01, 2010 6:30 am

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by paul kennedy »

Hi
looks good. Any more details available?
what LOD engine?
what features?
based on the terrain engine in 1.7?
when?
indeed, I am about to make yet another one, unless I can see a clear way fwd.

regards
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

"LOD-engine" is basically a homegrown solution based on 6 quad-trees put together to form a cube, then transformed into a sphere.

Features - well, not many yet. I'm trying to work proper water into it (with proper, I mean transparent water that moves and refracts and reflects light ina believable way), as well as a good atmosphere shader. Also, I have encapsulated the actual height value generation into it's own class. This means you can generate the height values in any way you like. Currently, only a procedural generation class based on the libnoise planet example is fully functional, but I'm working on another that will use the SRTM data from NASA to generate the Earth. You could also write loaders for different kind of data sources, like greyscale heightmaps or streaming over the internet (although that would probably be quite slow...).

Not using the 1.7 terrain engine at all.

When what? When will it be released? When It's Done. ;)
paul kennedy
Gnoblar
Posts: 5
Joined: Fri Jan 01, 2010 6:30 am

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by paul kennedy »

hi
sounds interesting. Cant quite get my head around how to use 6 quad trees for a cube (1 per side I guess) is the idea to chop the planet into 6 equal chunks?
SRTM is a good test data set. great for stress testing, but is gets a bit dodgy near the interface of land and water.
As I mentioned, we are looking down the barrel of writing yet another planet engine starting in a month or so. Perhaps we could find a way to avoid this and work together?
Our start point was to be the terrain in 1.7, and modifying it for use with planets. We were planning to use ECEF's for this.
regards
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

Been spending most of my day trying to implement a priority system for the LOD engine. Got some good results (terrain close to camera loads faster), and some bad results (long freezes when moving fast, random crashes).

Long freezes is probably due to either main (rendering) thread waiting for a lock to be released when adding new terrain patches to the terrain patch buffer, or trying to delete deep quad tree branches as we get further away from the corresponding terrain. Might be both. But I have some ideas on how to fix them.

Random crashes is most likely due to not cleaning up properly when deleting terrain patches that is waiting for the mesh to be prepared on a separate thread. (Multi-threading 4tw?)

I don't think it was visible in the pictures, but stitching isn't in yet either, mostly because I had no idea of how I would stitch the edges along two different quad tree faces (such as the front face and the top face). I had a great idea on how to solve it a couple of hours ago though.

Spent a few hours during the night playing around with an atmospheric shader, and got some interesting results... Still no atmospheric scattering though, but at least I have some pics to share. Terrain LOD turned off, since it's causing crashes otherwise...
Attachments
Ground level.
Ground level.
High up in the atmosphere.
High up in the atmosphere.
Dusk.
Dusk.
User avatar
petrocket
Gremlin
Posts: 178
Joined: Tue Mar 20, 2007 3:29 am
x 10
Contact:

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by petrocket »

Good luck with your planet code, looks like it is coming along nicely!

You can see how I'm doing atmosphere shaders for my planet plugin on my blog:
http://petrocket.blogspot.com

It has hlsl shader code for the latest version and also hlsl shader for my tri-planar water used for oceans.
Ogre API & Manual | Ogre Wiki

blog | website | work

Follow me on twitter @ twitter.com/petrocket
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

Small update: I seem to have been able to fix any stuttering I had previously. Terrain meshes and textures are now prepared smoothly in their own thread, and then loaded on the main thread. Also added normal mapping and some specular for the water. Small sample of the planet rendered from space attached.

Next, I will try to implement a data source class using Noise++ instead of libnoise (libnoise is slooow), and see if I can get textures and meshes to generate faster. Above screenshot was actually taken after letting the app work for a couple of minutes - not quite acceptable if I will ever release a demo. Terrain is also quite slow to load... If all else fail, I guess I will have to get my hands dirty and try to implement my own noise library, although I doubt I will be able to make it will outperform any other library out there...

Detail texturing for when you're close to the surface is also on the list...

Oh, and integration with my other project, OgreUniversal.

All of this will have to wait until after exams though... So don't expect many updates (if any) before June.
Attachments
OgrePlanet05042010_231149330.png
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

petrocket wrote:Good luck with your planet code, looks like it is coming along nicely!

You can see how I'm doing atmosphere shaders for my planet plugin on my blog:
http://petrocket.blogspot.com

It has hlsl shader code for the latest version and also hlsl shader for my tri-planar water used for oceans.
Thanks for your nice comments, Pete. I'll have a look at your latest blog entry when I have some more time. I must say, implementing a good atmosphere shader is high on my "wish list" right now, and even though there are some good looking resources out there (like the GPU Gems article, and now your latest blog entry), getting it all to work in a shader has turned out to be really hard. But then again, I never really got tangent space normal mapping to work properly either...
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

User avatar
globalsinner
Kobold
Posts: 30
Joined: Wed Jul 01, 2009 4:30 pm

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by globalsinner »

Hey, thanks a lot for the source. will check it out. :D

U may also want to check this link for some tips:
http://www-evasion.imag.fr/Membres/Eric.Bruneton
your life was ended by mermaids... \m/
dudeabot
Gnome
Posts: 334
Joined: Thu Jun 28, 2007 2:12 pm
Location: Brazil
x 5
Contact:

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by dudeabot »

i cant run the project, many libraries are pointing to your harddisk
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

Are you saying you can't even open the solution in Visual Studio?
dudeabot
Gnome
Posts: 334
Joined: Thu Jun 28, 2007 2:12 pm
Location: Brazil
x 5
Contact:

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by dudeabot »

no, look at .vcproj:
<Tool
snipped
specially at these lines like:
C:\Users\Anders\Source\ogre\Dependencies\include;"C:\Users\Anders\Source\noisepp-0.3";C:\Users\Anders\Source\libnoise\include;C:\Users\Anders\Source\boost_1_42_0;"C:\Users\Anders\Source\ogre-build\include";C:\Users\Anders\Source\ogre\OgreMain\include
i know an obvious fix is to install ogresdk and point ogre-build to the sdk path, but noiseapp, libnoise etc doesnt come with it (afaik), and it become very tedious to download one by one or to fix it, when it should havebeen relative not absolute paths
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

But even if it was relative paths, your file structure probably wouldn't match mine... So you would have to fix it yourself anyway.
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

Some updates about this project...

I finally got around to fixing the seams. Apart from a few barely noticable corner cases involving corners, the edges (including surface normals) are now stitched together quite nicely.

I also fixed some problems with near/far clipping planes, plus some very nasty z fighting between the water mesh and the land mesh. There is now barely any noticeable z fighting at all, which I think is quite a feat considering the fact that the visibility goes from as close as 1 meter up to the horizon.

I'm still not happy with a lot of things:
  • Speed of terrain generation - thinking about experimenting with noise generation on the GPU.
  • Texturing.
  • Water.
If anyone likes this project, knows a little something about the topics above and want to lend a hand... ;)

(No pictures, because visually there's not much difference from what has been posted previously.)
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

Got noise on the GPU up and running, based on the GPU Gems 2 article. Looks pretty cool, especially when animated. Video coming soon (as soon as YouTube is done processing the file).

Edit: Here it is. :) (720p recommended.)

User avatar
SunSailor
Gnoll
Posts: 699
Joined: Sun Jan 02, 2005 5:45 pm
Location: Velbert, Germany
x 2
Contact:

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by SunSailor »

Hehe, nice, as usual. When does one start to build a cool game around this type of engine? I would *love* to see something like Rescue on Fractalus or The Arche of Captain Blood done with such approach :).
Online-Distribution with Jade-DS, Ogre-Wrapper included.
Follow me on Twitter for updates!
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

SunSailor wrote:Hehe, nice, as usual. When does one start to build a cool game around this type of engine? I would *love* to see something like Rescue on Fractalus or The Arche of Captain Blood done with such approach :).
When it looks awesome. ;)
User avatar
Lord Alexion
Kobold
Posts: 29
Joined: Wed Oct 19, 2005 2:46 pm
Location: São Paulo, Brazil
Contact:

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by Lord Alexion »

I have a NOCTIS-like project I've been cooking up for quite some time now (a few years actually), but I have to admit real life keeps me for pursuing it at such a low-level as to make a planetary engine =\

So, for now, I'm waiting on something I could use on this regard. This one seems promising =)

EDIT: datailing my project a bit more, the idea is to have a proceduraly-generated universe which players could roam and explore freely in a sandbox-type environment. there would be a social network integrated to the game where players could share pictures, starmaps, name stars and planets, etc, etc. The universe would be expandable, so as players keep pushing the boundaries of the explored universe, more and more star systems and galaxies would be generated and integrated to the system. That's the general idea...
User avatar
Beauty
OGRE Community Helper
OGRE Community Helper
Posts: 767
Joined: Wed Oct 10, 2007 2:36 pm
Location: Germany
x 39
Contact:

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by Beauty »

lingfors wrote:Code now available here: http://bitbucket.org/lingfors/ogreplanet
The repository is empty ... :cry:
Help to add information to the wiki. Also tiny edits will let it grow ... :idea:
Add your country to your profile ... it's interesting to know from where of the world you are.
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

It lives...

Image

Some info:
  • I played around with the code a bit, and suddenly the terrain was generated much faster. I don't know why, but I'm happy. :lol:
  • Implemented atmospheric scattering from this paper: http://developer.amd.com/media/gpu_asse ... tering.pdf. It assumes that the atmosphere has constant density, so it's far from perfect. But still better than anything else I've managed to accomplish. Will attemt to tame the beast that is Sean O'Neil's atmospheric scattering shader later.
  • Terrain is textured in three layers:
    1. Everything is textured as grass.
    2. Pixels with a slope over a certain angle is textured as rock (the brown part, looking for a better, gray-ish rock texture). The slope angle starts at 30 degrees at sea level, and gets lower as the terrain gets higher (so basically everything is rock over a certain altitude).
    3. Over a certain altitude, everything with less than a certain slope is textured as snow. Both the altitude and slope limits are modified by fBm (Perlin noise), to get a more natural look.
  • All this made it dead slow again... :(
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: OgrePlanet (or "Oh noes, not another planet engine!")

Post by spacegaier »

lingfors wrote:[*] All this made it dead slow again... :(
But it is looking damn good :) .
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...
User avatar
lingfors
Hobgoblin
Posts: 525
Joined: Mon Apr 02, 2007 12:18 am
Location: Sweden
x 79

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by lingfors »

spacegaier wrote:
lingfors wrote:[*] All this made it dead slow again... :(
But it is looking damn good :) .
Because you're so nice, here's a screenshot of a sunset on an alien planet.

Image
User avatar
DanielSefton
Ogre Magi
Posts: 1235
Joined: Fri Oct 26, 2007 12:36 am
Location: Mountain View, CA
x 10
Contact:

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by DanielSefton »

Nice :shock:

No disrespect to the ROAM guys, this looks a lot better. I don't understand why their textures are so low resolution.

I hope you use this as a reference, you're already on the right track! http://www.infinity-universe.com/Infini ... 4&PageNo=1 :D
dragutux
Halfling
Posts: 56
Joined: Thu Nov 19, 2009 9:39 am
x 12

Re: OgrePlanet (or "Oh noes, not another planet engine!")

Post by dragutux »

No disrespect either here .. yet i have to admit i'm pissed off a lil
i mean, there are like a gazillion planetary engines made in the last
years (ok i'm exagerating numbers)but yet, none out ..
if it wasn't from lingfors, i would still have no idea how LOD systems
were working on a sphere...
Post Reply