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!
User avatar
Sovaka
Greenskin
Posts: 109
Joined: Sat Dec 20, 2008 6:26 am
Location: QLD, Australia
Contact:

Re: ROAM Planet rendering

Post by Sovaka » Fri Oct 15, 2010 12:11 am

SpannerMan wrote:So do you guys have a game idea lined up ready to use this tech yet?
Yes we do, but that's all they are at the moment... Ideas.
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Fri Oct 15, 2010 11:10 am

G'day guys,
Sovaka has put up a new video, this time not speed limited, and it gives you an idea of how the mesh works too, Hope you like it.

[youtube]eNfKrmUzuG4[/youtube]
Just testing out the Youtube tag.

P.S. If any of you guys are interested in a more technical video, with me explaining about what's going on with things with regards to the terrain mesh generation, let me know, and I'll put something together for you.

Alex
Last edited by DavlexDesign on Thu Feb 17, 2011 11:28 pm, edited 2 times in total.
0 x

Lord LoriK
Goblin
Posts: 254
Joined: Tue Feb 13, 2007 5:33 am

Re: ROAM Planet rendering

Post by Lord LoriK » Fri Oct 15, 2010 3:02 pm

Thanks for answering my questions, guys. My first one was more about how were you planning to reduce the batch count and not why does a low batch count help rendering efficiency, but you answered both things anyway, so it might help others understand it too.

Watching the video I got a new question: are you planning to apply some sort of vertex morphing to soften the popping caused by detail level changes at low speed?
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Fri Oct 15, 2010 9:11 pm

G'day again Lord Lorik,
There is morphing in there already, vertex positions, vertex normals and uvs, so the popping you are seeing is emphasized by the experimental texturing that Sovaka is playing with at the moment, he's still getting his head around how my current arcane method of dealing with texturing a whole planet of this size works. We are still trying to figure out a nice and simple way, without blowing the memory usage and storage for this thing. I don't want to go by the ways of others and needing gigabytes of data stored on the hard disk drive of the user, or use up all the texture space in the GPU for just the terrain, there is still a ton of stuff we are gonna implement to make this thing look and feel good, but like anything, if you have a weak foundation, anything you put on top to cover it, is gonna fall over in a big heap.

And another thing that emphasizes the popping is the video capture too, the video capture only grabs in between frames of the engine running (15 to 25 frames per second) and if you noticed, Sovaka's machine is clearly running at around 200+ - 400+ frames per second), if you captured every frame for 9 minutes like his video runs for, mate ! , He would need a pretty big HDD to store that, not to mention the time it would take to process that into some form that is up loadable. So I would imagine that the jittery movement and popping is not what he is seeing while flying around, I know that on my machine, the popping is not that pronounced, and mine runs quite a bit slower than his machine. (just some food for thought there).

How I'm gonna implement the reduction of the batch count, well, this one is pretty tricky, but it will all be in my re indexing function I think, I've got that routine pretty tight now for traversing pages, but now I'll make it look at groups of pages, and those groups will be merged to one batch on the fly, I was thinking about it last night, and it is actually going to take less time doing it in groups than doing it one page at a time, all I feed this new routine are the id's of the pages I want grouped in this pass, and it will merge them into one batch, and set the skirting flags accordingly, that way I should be able to have arbitrary shaped batches too, not necessarily nice cubes, but that will only happen out in the distance, I will have to keep some uniformity in there I would imagine for shadowing and things like that, but I won't have to if I don't want, when GPU's get fast enough to do the type of shadowing I'm thinking of, then I won't have to keep the batches uniform at all, but we're not there yet. The interesting part of this is choosing the pages to group and which ones not to group without forcing the system to do huge re indexing runs all the time, because I can merge all of the pages into one batch if I want, but that would be in efficient, because if I want to separate out 1 page for special processing, or modify one page which is in the middle of a large group of pages that where previously merged, then I would have to recreate the outer batch again as well, something I have to ponder on for a short time.

At the moment I'm using 64 pages per unit cube face of the planet, I will be upping that to 1024 pages per unit cube face and having a look at how the pages are covered by the mesh at various distances, and figuring out from there my best plan of attack for the page id assignments and what best way to assemble them into nicely optimized groups for batching, I will imagine that I will have to sort of batch in a fan pattern I think, keep the 4 closest as single pages (1 batch per page) and and then use the view frustum to choose the pages in front of the view to break into 1 or two batches, and then batch the rest into a sort of fan around the camera, so I can split out single pages without too much mucking around, and leave the others alone for a short while.

Well, thats what I have in my head at the moment, maybe it will work, maybe not, at the moment I know a zillion different ways NOT to make a nice mesh engine, and currently only ONE way to do it that doesn't require gobs of ram or storage to look nice, so I will just have to see if this idea is gonna be one zillion and one or not, that's the name of this game isn't it, get these stupid machines to do what you want it to do ?

regards

Alex
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Sun Oct 17, 2010 1:47 pm

Guess what guys ?

YEP!!! I found option one zillion and one.
Changing my plan of attack now, but don't worry, I'm still on it.
Sometimes it gets a little dis heartening, but them's the breaks hay !!!

frustrated

Alex
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Thu Oct 21, 2010 6:15 am

G'day again guys,

I have uploaded a new video to my channel on Youtube ....
[youtube]SAdLMsIedhw[/youtube]

This video demonstrates the new Planet wide Coastal flow simulation in action, now this simulation is only really the debug view ( thanks Jabberwocky) of the data that my new water shader will be using. It should enable my shader to create waves of varying sizes and types once I get the shader logic exactly right, but it is getting very close, and hasn't hurt the performance of the engine by any amount at all (which I was really worried about).

Still hard at it,

Alex
Last edited by DavlexDesign on Thu Feb 17, 2011 11:29 pm, edited 1 time in total.
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Thu Oct 21, 2010 9:13 am

G'day guys,
Got cut off short before, had to deal with something.
Anyway, I know the video makes it hard to see the goings on, but that fluid simulation thing actually interacts with the terrain properly, so there is no fixed data at all, so if you enter a new seed for the planets terrain, the oceans will accommodate perfectly, the effect I'm trying to achieve is the normal ocean swell to shore line movement, so when it gets real close to shore, or comes from deep to shallow, the water moves and swells accordingly, and also reseeds appropriately to, so you get that nice wave in, and wash back out, and get the common three sets of smaller waves, and three sets of bigger waves like we see down here in Australian Surf beaches.
At the moment the scale is a little off, but that's just a parameter that I can adjust, but I reckon it looks like it is doing close to what I want, and at pretty much no performance cost to the engine itself.
I am using no GPU code for this data either, so even older hardware can handle this effect (albeit no vertex morphing as such) and I have used no more ram than the last demo used, it's all a little bit of a trick really, but it works perfectly well, and is completely procedural in nature.
The reason I'm going this way with this thing is because the whole idea of this engine in the first place, was to create a system that can generate a planet sized terrain ALMOST completely procedurally, and at interactive frame rates to boot, as well as still be able to be viewed on mediocre hardware as well.
The next phase of this ocean thing is the shader itself, that will actually raise and lower the vertices as well as colour the oceans like the more traditional water shaders out there, so that it interacts with the light like you would expect, refraction and all that guff.

Alex
0 x

User avatar
SpannerMan
Gold Sponsor
Gold Sponsor
Posts: 446
Joined: Fri May 02, 2003 10:05 am
Location: UK
Contact:

Re: ROAM Planet rendering

Post by SpannerMan » Thu Oct 21, 2010 9:59 am

Wow, sounds awesome man! Wish I could watch YouTube vids here at work, but no dice. Will check tonight. Keep it up man, your a machine!
0 x

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

Re: ROAM Planet rendering

Post by aguru » Thu Oct 21, 2010 10:19 am

Alex, what can I say? This is going to be so beautiful :) Checking this thread never fails to amaze!
0 x

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

Re: ROAM Planet rendering

Post by palaslet » Thu Oct 21, 2010 3:02 pm

Hi Alex,

First of all; let me not be the last to say: This is awesome!

I got a couple of comments for the last video.
If you're aiming for real wave motion you should also fix the problem with the waves going into shore from every angel even if the object in the sea is only a couple of feet wide.
Also as I'm sure you know (since you're from surfer country) the water waves will slow down on shallow water, often causing the effect (in large scale) that the wave will turn to be almost linear to the coast line. This is actually what causes all the turbulence around the reefs. I think it would add a lot to the realism of this shader.

You've probably thought of this already, but I just needed to throw it out there because as I sad: It really would add a lot of realism.

Just out of curiosity:
Do you have plans to implement any physics into this? So you can actually wash ashore? Or get dragged out by the wash back?
0 x
"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
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Thu Oct 21, 2010 11:15 pm

G'day guys,
Thanks for the nice comments by the way, always makes me feel better if people put in their two bobs worth.
with regards to the comment from palaslet ...
.... you should also fix the problem with the waves going into shore from every angel even if the object in the sea is only a couple of feet wide.
Yeah, I see what you mean, and yes I had thought of that, Like I said, this is just the debug data that the GPU will be looking at to control the actual wave simulation, the GPU is what will be modifying the wave formations to suit the local environment around the individual vertices that will actually form the waves.
So the data you are seeing is going to be a sort of guideline for the GPU, because I won't be able to generate waves out to 100s of kms because that will be a waste of resources, so in the near vicinity around the camera, (say out to around 1km I will actually generate vertex morphed waves, and say out to around 4 km I will bother to colour the wash and foam close to properly, and the rest I'll just follow the data) MAYBE, I just have to see what works when I get to that point.

As for the physics side of things, I do have proper buoyancy routines in place for when I need them, but really haven't got that far yet, If it will go well with and play a role in enhancing game play , of course I'll look into it.

regards

Alex
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Sun Oct 24, 2010 12:14 am

G'day Guys,
Just a little update on the wave simulation stuff .....
WaveSimulation_02.jpg
3D Ocean waves 02
WaveSimulation_01.jpg
3D Ocean waves 01
I finally figured out how to get all the scaling and speeds right, now all I have to do is get the coloring right (normal mapped detail waves, transparency, etc), and to take into account the sky and the terrain as reflections.
I was a little worried about the frame rate hit, but it actually hasn't caused any yet ( on my machine ) so I'm pretty happy about that, we'll see what happens when I start playing with the pretty bits of this shader.

Alex
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Sun Oct 24, 2010 1:29 pm

G'day guys,
I listened to palaslet and sort of fixed the issue he was talking about ....
If you're aiming for real wave motion you should also fix the problem with the waves going into shore from every angel even if the object in the sea is only a couple of feet wide.
So now it is more selective in the formation of the waves, well, it's still not quite right, but hell !, having this thing running on my home machine "PLANET WIDE" the way it does, it's better than nothing.
selective_waves.jpg
Selective wave formations Planet wide.
As you can see from that picture, it just adds that little something to the view to make the planet seem just that little bit more alive (In my opinion).
OH yeah, there is actually global ocean swell happening in this shot too, with secondary detail turbulence, it's just very difficult to see until I colour it up properly and add in the refraction and reflection stuff.

Alex
0 x

umpf
Gnoblar
Posts: 17
Joined: Tue Oct 12, 2010 7:08 pm

Re: ROAM Planet rendering

Post by umpf » Sun Oct 24, 2010 1:59 pm

perhaps you can use some water from http://www.youtube.com/watch?v=TeSuNYvXAiA&hd=1

code is readable from http://www.ogre3d.org/forums/viewtopic.php?f=11&t=60363 (I'll make it downloadable soon)
0 x

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

Re: ROAM Planet rendering

Post by palaslet » Sun Oct 24, 2010 7:58 pm

Hi again Alex.

The waves look great! Especially considered you've only worked with them for a few days. It really brings life to the planet. It's amazing how much such small detail does to the whole picture.

This might seem picky, but from following this thread for a number of months now I've come to notice you're sense of details and need for natural looking scenery.
Looking at the last screen shot with the snow covered mountains in the background, something comes to mind. Since I'm from Norway, and that's a pretty rocky and snowy country, I've seen my share of snow covered mountains. There is a couple of things I'd like to bring to your attention.

1. The snow line looks pretty linear. That's actually not always wrong, even if it looks a bit odd. Problem is that I expect that tops with height just above this line could end up with only a couple of feet of snow on top. This would certainly look odd. The sun actually prevents this from happening in real life as the top will bath in sunlight all day. The sides will not have that much sun all day, and will thus preserve the snow better. On high mountains, the temperature is so cold that the sun wont be able to melt the sow on the top, so you'll never see small tops with only a couple of feet of snow.

2. The snow line look pretty linear. That's actually not always wrong, but usually it is :? . Since erosion will create small valleys down the mountain side, some of the snow will be preserved in almost constant shadow here. Also the snow tend to pile up in these valleys making it harder for the sun to do it's job even if the valley got much sun. Take a look at the picture linked below for reference. It's taken for my balcony. (Just kidding :) )

Image

Yeah, I know its unfair to compare against this scenery, but that just shows how far you've gotten with this when we can start comparing it with real nature...
0 x
"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
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Sun Oct 24, 2010 11:43 pm

G'day palaslet,
Thanks for the input, I love this constructive criticism, and comparing it with real nature, now that's a bonus, thank's mate.
OK, myself and Sovaka are still working on the whole procedural texturing of this thing, at the moment it's still a pretty basic shader setup, but, with that said, I think the shader is doing quite allot, soon I'll have it picking river (valley) beds and the like, so once I have that, then I'll worry about the snow in the valleys, and snow tops.
I was thinking about all that stuff a while back, when I actually took a drive through Switzerland, Austria and the southern parts of Germany with the family. I have to say the Mountains in those areas are fantastic, and I envy you living amongst mountains like that. I took a ton of reference footage (photos) on my world trip, from desert terrain (Egypt and Dubai), Tropical (Hawaii, Figi), Open planes and canyons (Las Vegas and the Grand Canyon Colorado river region), Farmland and rolling planes(Central Germany and Through country France,Belgium and Holland, not to mention all over Australia), temperate zones (Italy), Mountains (Swiss and Austrian Alps, Canadian Rockies).
So I will get to that side of things shortly, I needed to get the diversity in the terrain, as well as get the look right so that my other algorithms will actually have the correct features to look for when it comes to putting this stuff in the mix. The hard part was getting all this stuff to be consistent to a seed value so that every machine looking at the planet actually saw the same thing, no good having an MMO game where you are standing on a hill, or hiding behind a ledge, and your opponent sees you ducking down in the middle of a paddock, that wouldn't be fun.
I'll keep plugging away at this thing for as long as it takes, I'm pretty new to this shader stuff and still getting my head around it.
Have you ever looked at some of those white papers out there ?
Talk about double dutch !
Can anyone read those stupid symbolic formulas and understand what the hell they mean ? REALLY !!!
So I have to make my own stuff (simple as they are) that sort of works.
Don't get me wrong, those white papers are brilliant for conceptual ideas, but actually implementing those formulas, I should have stayed in school longer.

Alex
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Sun Oct 31, 2010 3:13 am

G'day guys,
with reference to the comment about the snow line being too straight by palaslet, I thought I'd have a go at fixing it ......
Snowdrift.jpg
Snow line of the mountains now
This is the result so far, I think it's getting there, what do you guys think ?
Anyway, progress is a little slow at the moment, just got back to it now, as I've been a little under the weather over the past week, but I'm starting to get back into it now.

Alex
0 x

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
Contact:

Re: ROAM Planet rendering

Post by jacmoe » Sun Oct 31, 2010 4:00 am

Definitely getting there! Thumbs up. :)
0 x
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

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

Re: ROAM Planet rendering

Post by palaslet » Sun Oct 31, 2010 1:12 pm

That's exactly why I commented it! I knew you'd solve it with style. :)
0 x
"It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away"

umpf
Gnoblar
Posts: 17
Joined: Tue Oct 12, 2010 7:08 pm

Re: ROAM Planet rendering

Post by umpf » Mon Nov 01, 2010 11:26 am

that's looking convincingly good!
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Wed Nov 17, 2010 2:02 am

G'day guys,
Just a post to let you know where we are at the moment with this thing, and what we've been doing.

OK, Myself and Sovaka where getting ticked off with the popping that was sowing up, even though it wasn't that bad, so we decided to have a go at fixing it, and I think we have, I ended up transferring the Mesh vertex morphing to the GPU, and it works a treat, very smooth indeed. One thing that was interesting to solve though, was the fact that with this Hybrid ROAM algorithm, a new pair of triangles could come up anywhere on the map at any time in the transition phase of the current vertexes, so I had to sort of do a prediction algorithm to figure out where the GPU will have transitioned the other two vertices by the time this vertex get sent to the GPU for processing by the shader, and because I'm using a smoothstep function in the shader (looks allot better than a straight lerp transition) and that added another level of fun to the prediction, it's not perfect, but it is so close, I'm actually happy with it. You can now come in from space and the morphing is so smooth, that it really only looks like fading in detail right down to ground level, OH yeah, to get it that nice, I had to morph the normals at the same time too.

With that problem solved, we then noticed another one, the texturing of the terrain (because all the texturing is sort of procedural in nature) was the problem now, because I morph the uvs too, so I moved that to the GPU as well, and it looked allot better, sort of made the detail grow instead of jump into view. But that being said, we decided to experiment a little, and had a go at fading in the texture transitions over the top of the morphing, and it works pretty much perfectly now, no sudden jolting or popping anywhere, and still only using a small amount of memory, no streaming necessary YET!!!.

Anyway, I'll keep you up to date as I go, the new demo is nearly ready to get bagged out.

Alex
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Wed Nov 24, 2010 4:39 am

G'day guys,
Just another quick update, Sovaka and I have sort of got most of the bugs out of the terrain now, it seems to be holding up quite well, you can zoom around now at cloud height ( anything up to around 1000 kph), and the map keeps up better now, you can still overtake the detail, but it recovers beautifully now.

I'm currently trying to get the river picking system right, it is semi functional, but now I have to get it to cull the correct small arms (if you get what I mean), the thing is picking some gullies that don't go all the way to a major arm, they just lead to nowhere, it's an interesting problem to solve, as it has to find the rivers on the fly predictably, so that the rivers are the same across the board on other computers as well, for the MMO side of things. It is getting there.

Another one is the clouds / weather system, I have some really really new stuff for this one, true volumetric clouds that interact with the terrain and oceans to form and dicipate like they should, I think you guys will like this when it's released.

We are still hard at it, so don't give up on us just yet.

Alex
0 x

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

Re: ROAM Planet rendering

Post by aguru » Wed Nov 24, 2010 8:11 am

We aren't! Believe me :shock: :D
0 x

Lord LoriK
Goblin
Posts: 254
Joined: Tue Feb 13, 2007 5:33 am

Re: ROAM Planet rendering

Post by Lord LoriK » Wed Nov 24, 2010 2:46 pm

Good news! We'll wait as long as you need.
0 x

User avatar
DavlexDesign
Gnome
Posts: 397
Joined: Thu Apr 23, 2009 7:23 am
Location: Australia
Contact:

Re: ROAM Planet rendering

Post by DavlexDesign » Wed Dec 01, 2010 2:25 am

G'day guys,
Just an update on what we are working on now.

I've been concentrating allot of my efforts on the river and terrain climate control systems lately, and the only way I can get the rivers consistent is through a sort of property map for the faces of the unit cube (blown out to a sphere). I've managed to get pixel perfect mapping from terrain mesh to property map (at any resolution we choose for the property map), this has the side effect of allowing me to generate a high resolution colour map to coat the planet from outer space, and only fade in the shader at a certain distance from the camera, this also enhances the look as well as reduces(EVEN FURTHER) the texture changes, I gradually bring in the shader from approximately 5km away, so it looks really ace.

I'm currently trying to figure out how to get the slope of the terrain calculations on the CPU the same as the GPU, so from outer space the terrain already has cliff face colour and stuff like that, I sort of have to do a bilinear filter on the height formula, and actually calculate the destination pixels' colour from a higher res formula than the texture actually is, so then the texture will actually look higher res than it actually is.

Another little side effect of all this, is that I can link groups of triangles to Property pixels, making the lookup for the physics system lightning quick, as well as simplifying the river calculations by an exponential amount, not to mention making them consistent across the waves (NET). Also This system will allow me to control the weather allot easier now too, and give me an easier path to get the clouds and weather to properly interact with the underlying terrain, and it's climate conditions at that location on the planet.

OH and all this stuff can be cached out to hdd, so it is a one of calculation. At the moment each face of the planet uses 16mb of this data (uncompressed) at a resolution of 2048 x 2048 points of data, this may grow with all the data in there, but it's allot less than most systems I've seen. I may go with the TBMP (Tiled Bitmap) format for this data later, as I can synchronize the pages of the terrain to the tiles, and that way the data will take up less conventional memory as I can stream in pieces rather than whole-less bow-less per Cube Face.

Anyway, just thought I'll keep you up to date on this thing, we are still here.

Alex
0 x

Post Reply