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!

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

Postby lingfors » Sat Apr 24, 2010 12:29 pm

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
OgrePlanet04242010_132311346.png
Rolling hills and green pastures
OgrePlanet04242010_131510642.png
Looking down on some mountains
OgrePlanet04242010_130811042.png
The planet seen from orbit
User avatar
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby paul kennedy » Sat Apr 24, 2010 1:15 pm

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
paul kennedy
Gnoblar
 
Posts: 5
Kudos: 0
Joined: 01 Jan 2010

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

Postby lingfors » Sat Apr 24, 2010 3:30 pm

"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. ;)
User avatar
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby paul kennedy » Sun Apr 25, 2010 3:05 am

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
paul kennedy
Gnoblar
 
Posts: 5
Kudos: 0
Joined: 01 Jan 2010

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

Postby lingfors » Mon Apr 26, 2010 5:21 am

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
OgrePlanet04262010_063224854.png
Ground level.
OgrePlanet04262010_063238731.png
High up in the atmosphere.
OgrePlanet04262010_063302166.png
Dusk.
User avatar
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby petrocket » Tue May 04, 2010 7:16 pm

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
petrocket
Gremlin
 
Posts: 178
Kudos: 9
Joined: 20 Mar 2007

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

Postby lingfors » Tue May 04, 2010 10:57 pm

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: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby lingfors » Tue May 04, 2010 11:06 pm

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: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby lingfors » Thu May 27, 2010 12:17 pm

User avatar
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby globalsinner » Thu May 27, 2010 2:40 pm

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/
User avatar
globalsinner
Kobold
 
Posts: 30
Kudos: 0
Joined: 01 Jul 2009

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

Postby dudeabot » Fri May 28, 2010 1:17 pm

i cant run the project, many libraries are pointing to your harddisk
dudeabot
Gnome
 
Posts: 334
Kudos: 6
Joined: 28 Jun 2007
Location: Brazil

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

Postby lingfors » Fri May 28, 2010 5:46 pm

Are you saying you can't even open the solution in Visual Studio?
User avatar
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby dudeabot » Sat May 29, 2010 12:31 am

no, look at .vcproj:

<Tool
snipped


specially at these lines like:

C:\Users\Anders\Source\ogre\Dependencies\include;&quot;C:\Users\Anders\Source\noisepp-0.3&quot;;C:\Users\Anders\Source\libnoise\include;C:\Users\Anders\Source\boost_1_42_0;&quot;C:\Users\Anders\Source\ogre-build\include&quot;;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
dudeabot
Gnome
 
Posts: 334
Kudos: 6
Joined: 28 Jun 2007
Location: Brazil

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

Postby lingfors » Sat May 29, 2010 10:28 am

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: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby lingfors » Thu Nov 11, 2010 1:55 am

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: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby lingfors » Fri Nov 12, 2010 6:24 am

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
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby SunSailor » Fri Nov 12, 2010 9:24 am

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
SunSailor
Gnoll
 
Posts: 699
Kudos: 2
Joined: 02 Jan 2005
Location: Velbert, Germany

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

Postby lingfors » Fri Nov 12, 2010 1:00 pm

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
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby Lord Alexion » Fri Jan 21, 2011 3:32 pm

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
Lord Alexion
Kobold
 
Posts: 29
Kudos: 0
Joined: 19 Oct 2005
Location: São Paulo, Brazil

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

Postby Beauty » Thu Jan 27, 2011 1:59 am

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
Beauty
OGRE Community Helper
OGRE Community Helper
 
Posts: 767
Kudos: 40
Joined: 10 Oct 2007
Location: Germany

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

Postby lingfors » Sun May 29, 2011 9:42 pm

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... :(

For this message the author lingfors has received 2 kudos
User avatar
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby spacegaier » Sun May 29, 2011 9:54 pm

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
spacegaier
OGRE Team Member
OGRE Team Member
 
Posts: 4291
Kudos: 126
Joined: 04 Feb 2008
Location: Germany

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

Postby lingfors » Sun May 29, 2011 10:03 pm

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

For this message the author lingfors has received 2 kudos
User avatar
lingfors
Hobgoblin
 
Posts: 505
Kudos: 62
Joined: 02 Apr 2007
Location: Sweden

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

Postby DanielSefton » Sun May 29, 2011 10:08 pm

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
User avatar
DanielSefton
Ogre Magi
 
Posts: 1235
Kudos: 10
Joined: 26 Oct 2007
Location: Mountain View, CA

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

Postby dragutux » Sun May 29, 2011 10:31 pm

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...
dragutux
Halfling
 
Posts: 56
Kudos: 14
Joined: 19 Nov 2009

Next

Return to Showcase

Who is online

Users browsing this forum: Exabot [Bot] and 3 guests