ROAM Planet rendering

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!
Post Reply
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day again Guys,

Just been dicking around, and wanted to check scales and things, and came across this shot, thought you might like to see it.
A shot with some details in it.
A shot with some details in it.
A little closer to the beach
A little closer to the beach
Real close to the forest
Real close to the forest

I think it makes quite a difference to the whole thing once all this stuff goes in.

Alex
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Re: ROAM Planet rendering

Post by Jabberwocky »

Really awesome to see some trees. Good density too - are you using PagedGeometry?

The light blue water near the shoreline looks ace.
Image
User avatar
Sovaka
Greenskin
Posts: 109
Joined: Sat Dec 20, 2008 6:26 am
Location: QLD, Australia
x 3
Contact:

Re: ROAM Planet rendering

Post by Sovaka »

We aren't using Paged Geometry at the moment.

For the moment we are using just a patch of trees as a test.
What we will end up doing is using our Climate Map system that will dictate what type of trees go where and at what density Planet wide.
The we will use a radial mesh management system.
Where within a 2km radius of the player, the trees will be instanced with lodding.
Outside that radius we will kick in the billboard system.

Depending on where the player is, that 2km radius will probably fluctuate.
For example, if they are on a hill and looking down, the 2km radius will be offset from the player so that the trees uphill will thin out where the player can't see much.
That way we can increase the detail distance looking down the hill.

We have a fair few tricks up our sleeve.
Since we have a strong foundation now, our concentration is to get in all the pretty stuff and really bring the engine up to scratch!

Fun times ahead and there should be a constant roll out of new screenshots hopefully :D
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day again guys,

Been dicking around again, but this time with the terrain texturing, getting the mips right from close to far, it was something that was bothering me for a bit,
Close to far detail in the terrain.
Close to far detail in the terrain.
But I think I am getting closer to the mark now.

I'll be fiddling around with instancing and stuff this weekend, so wish myself and Sovaka luck with this one, dicking around thismorning with the trees made such a difference, we though, what the hell, let's see if we can get it planet wide, and fast. SO here we go.....

Alex
User avatar
aguru
Goblin
Posts: 236
Joined: Tue Feb 26, 2008 5:48 pm
x 3

Re: ROAM Planet rendering

Post by aguru »

I cannot wait to see the vegetation system step in! :) Great work, guys. As usual.
User avatar
Mind Calamity
Ogre Magi
Posts: 1255
Joined: Sat Dec 25, 2010 2:55 pm
Location: Macedonia
x 81

Re: ROAM Planet rendering

Post by Mind Calamity »

I must admit that the trees and vegetation are messy, but for first screenshots of the feature, they are pretty awesome, you guys are progressing really fast, keep it up. :)

Also the water looks impressive, I was kinda expecting Hydrax, but with some good shader-work it should come out nicely, but it's really early to be even thinking of that. :D
BitBucket username changed to iboshkov (from MindCalamity)
Do you need help? What have you tried?
- xavier
---------------------
HkOgre - a Havok Integration for OGRE | Simple SSAO | My Blog | My YouTube | My DeviantArt
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day guys,

I FAILED !!!, well for the time I allocated anyway, there was allot more to this thing than first thought.
Mind Calamity wrote:I must admit that the trees and vegetation are messy
They are I must admit, but what you see in the pics are trees placed at random, not slope checking, and no instancing, also no billboarding either. Also, it was just a test to check out scales and things, not a foliage system test. I must admit though, Ogre did a pretty good job of rendering that amount of trees in its own right. Those scenes fluctuated from 45 - 120 fps while the 5,000 trees are in view.

I noticed that even if the trees and stuff where out of view (distance wise) but inside the angle of view, the traversal of the scenegraph imposed a penalty as well, so I had to dream up a way of dealing with that too. The problem is I can't (well, won't) store tree placements for a whole planet, I will for artist driven areas, but the rest, well, this project is based around the premise of being fully procedural, so that's what I'm doing.

I have come up with a solution, and I am still working on it now, It involves instancing, a finite count of assets that are movable, and a tightly integrated, on the fly asset placement evaluation system. If what I have penned out on paper pays off, that planet will be as lush as Pandora in that movie, planet wide (of course it won't look as nice). I believe in worst case scenarios, so If I can get this planet heavily populated like that, and keep a descent frame rate to boot, I will be happy in the knowledge that if someone wants to create a planet like that, it can handle it.

Especially when the climate zones kick in proper, Baron areas, Mildly populated areas, and heavily populated areas will all be able to be handled by the engine without a problem then.
Mind Calamity wrote:Also the water looks impressive, I was kinda expecting Hydrax, but with some good shader-work it should come out nicely
Yes, that water shader is a bit of a hack together proof of concept thing as well, I really only wanted to see if I could get planet wide coastal wave motion happening, and It is doable, albeit a little glitchy, but I did write that a while back, and my knowledge of shader language has grown since I wrote that one.

It is on the list for a re write, as are many other things.

I'm happy to say that the system is coming along nicely, and that test foliage thing I did was the first thing that I added, that actually slowed the engine down significantly (I'm working on that too), it always seemed strange to me that the more I added to the engine, the faster it got. I suppose now when I get to the pretty bits, that a slowdown will be inevitable, But I can't have it slow down too much, I want this thing to work in true 3D as well, so I have to (I think) be able to run at double the refresh rate of a display device.

Alex
ultramedia
Halfling
Posts: 62
Joined: Thu Dec 07, 2006 3:02 pm
Location: QLD, Australia
x 2
Contact:

Re: ROAM Planet rendering

Post by ultramedia »

Hi Alex,

Found another cool planet demo, check out the youtube video :
[youtube]aBTOsodAwOc[/youtube]

It's not really a full scale world, but still fairly well done, and when he was flying into his logos 'stars' I was like if he flys into a planet in the middle of that I'll spew chips (then he did).
palaslet
Halfling
Posts: 61
Joined: Tue May 25, 2010 7:52 am
Location: Fredrikstad, Norway

Re: ROAM Planet rendering

Post by palaslet »

Hi Alex,
I have come up with a solution, and I am still working on it now, It involves instancing, a finite count of assets that are movable, and a tightly integrated, on the fly asset placement evaluation system.
Are you planning to have etc 1000 trees instanced in memory, and place them around the player while he moves? So that it acts like a form of instance pool?
Pooling might be good as long as it doesn't make the scene seem repetetive... And that I can find the quad-barrel nuclear rocket launcher I hid behind the oddly shaped oak just north of the pear-shaped rock ;)
"It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away"
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day guys,
ultramedia wrote:Found another cool planet demo, check out the youtube video :
Definitely a nice demo, I really like the idea of the starts placement, very cool, something to think about for peoples custom systems maybe.
palaslet wrote:Pooling might be good as long as it doesn't make the scene seem repetetive... And that I can find the quad-barrel nuclear rocket launcher I hid behind the oddly shaped oak just north of the pear-shaped rock
You are sort of thinking along the right lines with the instance pool, but, the foliage will be built up of various types, and instances don't necessarily have to be the same, the instancing thing I'm toying with will keep a single buffer of different geometries in GPU RAM, for a certain type of zone, sort of like a geometry atlas you might say, (there is no reason I can't have more than one of these geometry atlases, as they are pretty compact), so that will enable me to mix it up a bit, like I intend with the terrain atlases. I know that I have to batch them up by material, but the different materials can still access the same geometry atlas pool, as long as the materials are matched to the geometries being used by this material, it doesn't really matter.

Now for the variations in same species trees, That's quite simple really, seeded vertex morphing (another silly thing I'm playing with) sort of works like wind morphing, but is done before the wind phase of the vertex shader and is static, so the tree is warped and buckled the same way every time for that seed, before the wind routine does it's thing.

This is all theoretical by me, and I'm setting it all up now, to see if it will function like I think it should, The instancing first, then the group placements (so I can place stuff down around the base of certain trees and have certain types of trees grouped in clumps, plus the stuff spread around the base, matches the tree it's placed around). Then I'll get to the warping and wind affect or phase.

Alex
User avatar
aguru
Goblin
Posts: 236
Joined: Tue Feb 26, 2008 5:48 pm
x 3

Re: ROAM Planet rendering

Post by aguru »

Hey guys! Just wanted to ask how things are going. I miss your long informative posts and update images :D
ultramedia
Halfling
Posts: 62
Joined: Thu Dec 07, 2006 3:02 pm
Location: QLD, Australia
x 2
Contact:

Re: ROAM Planet rendering

Post by ultramedia »

One does not simply walk into Mordor mr Frodo...
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day guys,

Sorry about the delays ....
aguru wrote:Hey guys! Just wanted to ask how things are going. I miss your long informative posts and update images
Now that is nice of you to say that, I thought I was probably raving on too much, and boring you guys to tears.
ultramedia wrote:One does not simply walk into Mordor mr Frodo...
LOL, That says allot about how I'm going with this thing.

I'm working on a bunch of stuff all at once right now, namely ....

* Muti Layered fully destructible terrain integration (actually not too far off with this would you believe).
* The full volumetric cloud layers.
* The Ocean Flow and coastal wave simulation (that's coming along nicely).
* The foliage placement and Climate systems (including the full flow simulation of the air streams in the atmosphere).

The reason I am working on all these at the same time, is because they are all tightly integrated (but separate plug-able systems) with the terrain topology of the celestial body they are connected to, and as I am working on one, some ideas work well with other systems, and I make notes in the code for where this stuff should be relevant, then when I deadlock on one system I switch to another, and then work on that, and then that usually opens up doors in the one I was deadlocked in, and the vicious circle just goes on, and on, and on. But, it doesn't stop. This way, I find, I can keep going and it doesn't get boring.

I also pretty much have a whole Galaxy to work with now as well (still buggy though), I have to thank Chris Laurel of Celestia Fame for some of the math for that, and that should be up and running shortly as well.

No pics as of yet, as the system is in a state of flux (not running), I will see if I can upload some pics in the next few days.

Alex
User avatar
aguru
Goblin
Posts: 236
Joined: Tue Feb 26, 2008 5:48 pm
x 3

Re: ROAM Planet rendering

Post by aguru »

DavlexDesign wrote:Now that is nice of you to say that, I thought I was probably raving on too much, and boring you guys to tears.
Hehe, you always say that you fear to bore use. Really, I don't think you do. In fact, I believe it is the other way around :D Plus, those who are not interested can just stay away from this thread.

Great to hear you are still going strong. Some very exciting stuff going on, I can't believe the speed at which you are going at this. Just don't forget to go for a walk and get some sun every once in a while! :D
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day aguru,
DavlexDesign wrote: Just don't forget to go for a walk and get some sun every once in a while!
As a matter of fact, Sovaka just said the same thing the other day.
Don't worry, I get plenty of sunlight, I own one acre of land with my house (we built) on it, and at the moment, with the amount of rain and sunshine we are getting here at the moment, I have to go tend to it nearly every two days. Bloody nightmare actually.

I'm glad I don't bore you guys with my ranting, I know sometimes I get carried away, and dribble on a bit, but I actually enjoy it, makes me think about what I'm doing more thoroughly. While typing, I tend to think up useful stuff while I'm explaining what I'm trying to achieve.

Alex
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Re: ROAM Planet rendering

Post by Jabberwocky »

DavlexDesign wrote: The foliage placement and Climate systems (including the full flow simulation of the air streams in the atmosphere).
Dang! You guys ain't cutting any corners, are you. :shock:
Image
palaslet
Halfling
Posts: 61
Joined: Tue May 25, 2010 7:52 am
Location: Fredrikstad, Norway

Re: ROAM Planet rendering

Post by palaslet »

Dang! You guys ain't cutting any corners, are you.
Well... some corners must be cut for sure, because real life climate simulations is running on super computers or even computer grids; and they don't have to calculate gameplay as well. :wink:

Alex,
This thing must be starting to drain some serious CPU time by now. What's your call about that?
"It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away"
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day Jabberwocky,
Jabberwocky wrote:Dang! You guys ain't cutting any corners, are you.
No, I'm not, Like I mentioned before I think, I want to see if I can get a planet like Pandora in here, then worry about cutting it all back to something more along the lines of Earth, where there are open planes and things.
palaslet wrote:This thing must be starting to drain some serious CPU time by now. What's your call about that?
Actually palaslet, I haven't really had that bad a hit on frame rate at all, when it comes to all of this....
1. The flow simulation stuff is pretty cheap to calculate, even at several distinct layers above the surface of the ocean, and below. I've had this stuff in there all the time ( well from 6 months ago ), just haven't been utilizing it, would you believe. Well, what I actually do at the moment, is build the flow vectors on the fly, so as the mesh of the terrain increases in resolution, so does the flow simulation, and the flow vectors propagate as I traverse the triangles for mesh update in the split and merge functions, so the flows modify themselves really, which should make the whole weather system quite interesting, as it has a life of its own, when it starts. Of course the simulation is reproducible, otherwise it would look silly having stuff blow in one direction on one persons machine, and in another on another persons, but it still is sort of out of my control. So to cut a long story short, the framerates you see in the pics are with that stuff already in there and working.

2. The destructible terrain has been in there all the time nearly ( 6 months again ), well, the layers have been in there, approximately 256 layers, as for the joining of these to form caves and stuff, this should only be an extension of the ROAM algorithm I already have, it's not only usable on height maps, I have made the algorithm fully arbitrary mesh compatible. My current problem is working out the storing of the deformation information, without this information blowing out the RAM usage, as well as causing stalls, when checking to see what weight affect-or is closest to the current vertex, and stuff like that. I would imagine that this will hit the frame rate a little, but with my current internal lodding systems, the stuff in the distance (as long as it isn't real big like a 12 km diameter crater) gets passed over only until it has hit a resolution that really needs to look at it.

3. The Ocean flow stuff is already in there, and the coastal wave simulation stuff is working, but still a little too glitchy for my liking, don't get me wrong, it looks and works quite nice, I just need to do a little more on the way the waves move and flow around static smaller land masses.

4. Climate zones are sort of in there already, just need to setup my shader to use it. It's not perfect in it's procedural choices of where the zones go, but it's pretty close (for an Earth like Planet that is).

5. Foliage placement, well this one is fun, it's the big hit at the moment, but I have some experimenting to do with this one.

6. The fully volumetric cloud simulation, I have some real interesting stuff in store for this one, it will almost be a voxel simulation, but not. I will have to explain this one more, when I get it to actually not look like shit. But I will tell you one thing, to speed the whole thing up, I have incorporated a sort of accumulative alpha routine, so what it does, is not have to draw from back to front for transparency, it's sort of hard to explain, but it allows me to reduce overdraw by a shit load when it comes to rendering semi transparent volumes that actually are dense enough to go opaque over a distance , I can early out by utilizing the GPU hardware while still maintaining the correct semitransparent coloring. Like I said, this one is tricky, but looks promising.

Hope I haven't bored you too much with all this jibberish, but I like inventing new ways of doing things, instead of just re inventing the wheel all the time.

Alex
User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: ROAM Planet rendering

Post by amigoface »

but I like inventing new ways of doing things, instead of just re inventing the wheel all the time.
are you sure that is what you wanted to say ? :mrgreen:
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: ROAM Planet rendering

Post by Zonder »

amigoface wrote:
but I like inventing new ways of doing things, instead of just re inventing the wheel all the time.
are you sure that is what you wanted to say ? :mrgreen:
I read that as he is inventing new ways not reinventing the same thing ;)
There are 10 types of people in the world: Those who understand binary, and those who don't...
User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: ROAM Planet rendering

Post by amigoface »

Zonder wrote: I read that as he is inventing new ways not reinventing the same thing ;)
it's quite philosofical :mrgreen: , but wheels can be made in several ways ;)

anyway it's a great project, definitively to follow !,
palaslet
Halfling
Posts: 61
Joined: Tue May 25, 2010 7:52 am
Location: Fredrikstad, Norway

Re: ROAM Planet rendering

Post by palaslet »

this should only be an extension of the ROAM algorithm I already have, it's not only usable on height maps, I have made the algorithm fully arbitrary mesh compatible
Say what???

I've done height map ROAM and I've read and understood the basic principles for spherical ROAM, but ROAM that is able to handle donut meshes and meshes with internal cavities?

Please bore me with more jibberish about how you achieved that :)
"It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away"
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day palaslet,
palaslet wrote:I've done height map ROAM and I've read and understood the basic principles for spherical ROAM, but ROAM that is able to handle donut meshes and meshes with internal cavities?

Please bore me with more jibberish about how you achieved that
LOL, I like that, OK, here we go, I'm going to bore you to tears with this one.

As you know already, ROAM is based on a diamond data structure, and uses an error metric to denote when one of it's triangles needs splitting along one of the triangles edges, when enough of those have been split, then the base diamond gets broken up into 2, 3 or 4 new diamonds, and sometimes when this is happening you end up with triangles that actually don't have a parent diamond (degenerate triangles I think they call them), well that's the usual way. I don't have that problem really, as I can have a diamond where one of its corners can be split out into its own base diamond, and the parent that it was split from actually takes on an L shape. GOD !!!, I'm dribbling, you already know this crap.

Anyway, the secret is keeping the triangles edges pointing to its correct neighbor, so splitting becomes a trivial matter, but only splitting when the error metric says you can, or when another triangle needs to split, and to keep the T junctions from happening, the neighboring triangle forces you to split. I know, I know, you already know all this crap, but some people might not.

Once all that mechanic is in place, it's actually pretty automatic really, as when you add in details to the mesh, the error metric just tells the triangle to split because the deviation is greater than what you want to allow, and a new pair of triangles are created to reduce the error in the deviation of the middle point between the two vertices of that edge in question. So caves and stuff just grow deeper the closer you get to them, stuff like that, great automatic lodding system I reccon.

The fun part is setting up all the triangle neighbor connections lists at the start, and taking into account vertex counts, I tend to try and keep one piece under the 65535 vertices, so that I can just use 16 bit indexes instead of 32 bit, but maybe even that isn't really necessary now with newer hardware being the norm,you have to have all this correct before you can have the ROAM system start looking at it, or else "Garbage in, Garbage out", you'll end up with a mess. The drawback with all of this crap is that you need to be able to re order your data that you send to the GPU properly, to make it more GPU cache friendly, this is possibly where you could create triangle strips for optimization maybe, but I haven't needed to worry about that, as indexed triangle primitives seems to work fine.

So if you already have an implementation of ROAM (spherical) that has no holes in it, then you shouldn't have a problem, just set it up right at the start, and it should take care of itself. It's really not that hard.

Alex
palaslet
Halfling
Posts: 61
Joined: Tue May 25, 2010 7:52 am
Location: Fredrikstad, Norway

Re: ROAM Planet rendering

Post by palaslet »

So if you already have an implementation of ROAM (spherical) that has no holes in it, then you shouldn't have a problem
The only spherical implementation I've seen is from this Gamasutra post. This implementation is basically a heightmap implementation using a spherical heightmap instead of a flat one, and I don't see that this can handle overhangs as illustrated by the hollow sphere bellow.

Image

Might be possible to adjust the triangles using normals from the mesh... :?: But that would hit the CPU I think. Needing to search for the correct normal to follow... :? Am I being plain stupid here?

Anyway... I'm the kind of person that can't have unresolved questions laying all around, so this evening will be a hectic one, getting this one to work.
"It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away"
User avatar
DavlexDesign
Orc
Posts: 400
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
x 19
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign »

G'day palaslet,

Well that article pretty much nailed the vertex and edge ordering down pat. The only thing I could suggest is that you will need to have destination places to get the new vertices to go to (hence the layers of positions I was talking about), and if you can get the placements right for the splits, then the ROAM algorithm will take care of the rest, adding vertices where the error (down to a threshold) between the vertices is greater than what you set as the maximum. The normals are easily calculated from the neighboring vertices of the attached edges, just do a run on all the edges attached to this vertex, adding the old normals as you go, then just divide the resulting vector by the number counted, that will give you the new destination normal to morph to. This might sound slow, but it's not, I do this allot in my split merge routines, and it doesn't hurt much. I also work out the starting normal of the actual split position as well, trying to take into account the time as well, so that I can create the beginning normals close to what the GPU would be at at that time, and reset that vertexes counter. I suppose there could be a better way to do it maybe, but it works for me (most of the time).

When it works right, on approach to the planet, the terrain just seems to increase in detail in front of your eyes, without any popping, I do still get some popping, but nowhere near what I used to. Looks pretty nice actually when it all comes together right, especially where the terrain is reasonably flat, and has smaller differences, like small cutaways and gullies, the detail just seems to fade into existence, almost like a really good mip map transition.

Alex
Post Reply