OgrePlanet (or "Oh noes, not another planet engine!")
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
OgrePlanet (or "Oh noes, not another planet engine!")
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...
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...
You do not have the required permissions to view the files attached to this post.
-
- Gnoblar
- Posts: 5
- Joined: Fri Jan 01, 2010 6:30 am
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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
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
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
"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.
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.
-
- Gnoblar
- Posts: 5
- Joined: Fri Jan 01, 2010 6:30 am
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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
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
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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...
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...
You do not have the required permissions to view the files attached to this post.
-
- Gremlin
- Posts: 178
- Joined: Tue Mar 20, 2007 3:29 am
- x 10
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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.
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.
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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.
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.
You do not have the required permissions to view the files attached to this post.
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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...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.
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
Code now available here: http://bitbucket.org/lingfors/ogreplanet
-
- Kobold
- Posts: 30
- Joined: Wed Jul 01, 2009 4:30 pm
Re: OgrePlanet (or "Oh noes, not another planet engine!")
Hey, thanks a lot for the source. will check it out.
U may also want to check this link for some tips:
http://www-evasion.imag.fr/Membres/Eric.Bruneton
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/
-
- Gnome
- Posts: 334
- Joined: Thu Jun 28, 2007 2:12 pm
- Location: Brazil
- x 5
Re: OgrePlanet (or "Oh noes, not another planet engine!")
i cant run the project, many libraries are pointing to your harddisk
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
Are you saying you can't even open the solution in Visual Studio?
-
- Gnome
- Posts: 334
- Joined: Thu Jun 28, 2007 2:12 pm
- Location: Brazil
- x 5
Re: OgrePlanet (or "Oh noes, not another planet engine!")
no, look at .vcproj:
specially at these lines like:<Tool
snipped
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 pathsC:\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
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
But even if it was relative paths, your file structure probably wouldn't match mine... So you would have to fix it yourself anyway.
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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:
(No pictures, because visually there's not much difference from what has been posted previously.)
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.
(No pictures, because visually there's not much difference from what has been posted previously.)
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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.)
Edit: Here it is. (720p recommended.)
-
- Gnoll
- Posts: 699
- Joined: Sun Jan 02, 2005 5:45 pm
- Location: Velbert, Germany
- x 2
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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 .
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
When it looks awesome.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 .
-
- Kobold
- Posts: 29
- Joined: Wed Oct 19, 2005 2:46 pm
- Location: São Paulo, Brazil
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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...
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...
-
- OGRE Community Helper
- Posts: 767
- Joined: Wed Oct 10, 2007 2:36 pm
- Location: Germany
- x 39
Re: OgrePlanet (or "Oh noes, not another planet engine!")
The repository is empty ...lingfors wrote:Code now available here: http://bitbucket.org/lingfors/ogreplanet
Help to add information to the wiki. Also tiny edits will let it grow ...
Add your country to your profile ... it's interesting to know from where of the world you are.
Add your country to your profile ... it's interesting to know from where of the world you are.
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
Re: OgrePlanet (or "Oh noes, not another planet engine!")
It lives...
Some info:
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.
- 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:
- Everything is textured as grass.
- 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).
- 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...
-
- OGRE Team Member
- Posts: 4304
- Joined: Mon Feb 04, 2008 2:02 pm
- Location: Germany
- x 136
Re: OgrePlanet (or "Oh noes, not another planet engine!")
But it is looking damn good .lingfors wrote:[*] All this made it dead slow again...
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...
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
-
- Hobgoblin
- Posts: 525
- Joined: Mon Apr 02, 2007 12:18 am
- Location: Sweden
- x 79
-
- Ogre Magi
- Posts: 1235
- Joined: Fri Oct 26, 2007 12:36 am
- Location: Mountain View, CA
- x 10
Re: OgrePlanet (or "Oh noes, not another planet engine!")
Nice
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
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
-
- Halfling
- Posts: 56
- Joined: Thu Nov 19, 2009 9:39 am
- x 12
Re: OgrePlanet (or "Oh noes, not another planet engine!")
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...
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...