Board index FlightGear Development New features

New Flight Gear Terrain Engine

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Re: New Flight Gear Terrain Engine

Postby mike4lin » Thu Aug 04, 2011 8:36 am

http://www.youtube.com/watch?v=HmeiXEm9hFY&feature=related

Outerra...wowo we should make FGFS use this as default...
mike4lin
 
Posts: 123
Joined: Tue Jul 06, 2010 6:58 am

Re: New Flight Gear Terrain Engine

Postby vitos » Thu Aug 04, 2011 9:47 am

mike4lin wrote in Thu Aug 04, 2011 8:36 am:http://www.youtube.com/watch?v=HmeiXEm9hFY&feature=related

Outerra...wowo we should make FGFS use this as default...


You can not, it's not open source at least now, and even if it will be open then current FG command could not make inclusion work because of it's complexity. To include some easy 3D globe as OsgEarh it's much more simple task, and if there was some will to solve that problem somehow then that task could be solved already. At fact no one really wants to do so between FG core developers. No one really wants it enough to doing something. Because they, I suppose, see FG future as part of hardware small aviation simulators, for sure paid. Not as free space flight simulator at all.

Cessna can not fly to space and do not need global view. Finally it seems what I had wanted to make Vostok out of Cessna. And if there was free or four guys as me we could do that. But no one else really had wanted to do that really. Only me had wanted it.

So I think it will be little bit other way. Outerra already incorporates JSBSim and could incorporate Nasal if it will be needed. It's other level product, You can see that by movie. So more realistic way of events development is creation of some new Outerra based, and probably closed source, multiplatform flight and space simulator, not related to FG much.

My final opinion about FG project as whole You can read here http://www.flightgear.org/forums/viewtopic.php?f=42&t=12881&p=131436#p131436
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 9:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

Re: New Flight Gear Terrain Engine

Postby psadro_gm » Wed Sep 28, 2011 5:57 pm

I was looking at experimenting with the terrain engine a bit. I'm not sure a fractal terrain like Outerra is the best design for something like FG. Notice that Outerra's design goals are to show the earth before the effects of man. Although they are planning on developing other landclass textures, I'll need to see what kind of results they get when trying to model something like suburbs and urban areas.

The biggest problem with FG's terrain system, is the lack of a level of detail algorithm. Looking at the planet from high altitude, or even increasing visibility to get Thorsten's local weather to really shine is going to require using less detailed polys in the distance.

Because FG uses an irregular triangle mesh to represent the scenery, there really isn't any way to mathematically (with acceptable frame rates) lessen the detail for tiles in the distance.

I had started implementing the cdlod implementation http://www.vertexasylum.com/downloads/cdlod/cdlod_latest.pdf in OSG. I was just going to use a single texture, and see if I could get it into a new tile format that was 'wrapped' in the BTG format simgear uses.

This was going to take an enormous amount of effort, and it would need to be done in such a way as to not break the existing scenery. Many people have a large investment in the current engine, so any new engine would need to live side by side, until the merits of a new engine are obvious enough to make a switch. All I was hoping to get out of it was to see how difficult it would be to decouple the terrain engine from the other systems. If it could be done, many other lod algorithms could be tried with a lot less pain.

The problem with regular mesh scenery, is that to get irregular texture landclass, you have to generate textures for each piece of the planet. I was reading up on how FSX handled this with a combination of pre-made very low level of detail textures, and using Anti-Grain to generate the highly detailed textures on the fly.

Interesting stuff, and it could be a lot of fun. But it would take many man months to even get to a proof of concept.
8.50 airport parser, textured roads and streams...
psadro_gm
 
Posts: 751
Joined: Thu Aug 25, 2011 3:23 am
Location: Atlanta, GA USA
IRC name: psadro_*
Version: git
OS: Fedora 21

Re: New Flight Gear Terrain Engine

Postby Zan » Wed Sep 28, 2011 8:10 pm

psadro_gm wrote in Wed Sep 28, 2011 5:57 pm:Because FG uses an irregular triangle mesh to represent the scenery, there really isn't any way to mathematically (with acceptable frame rates) lessen the detail for tiles in the distance.

I have developed a ROAM type http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.14.4771&rep=rep1&type=pdf scheme in my head, that should work with FlightGear's irregular grid approach. It goes like this:

Each tile is a "square", that consists of 4 little triangles. I say "square" because it might not be square in the mapping space (i.e. lat/lon or similar), but a 4 corner "squaroid". Tips of the 4 little triangles are always at the center of the "square".

Going one level higher, we change one of these small triangles to a more defined version, and do the same to it's neighbour tile's triangle. These 2 changed triangles now form a new tile, which is 4 small triangles again.

This way, every triangle's neighbours are always one level up or down, or the same level. The LOD level borders are always 45 degrees to each other, so when creating the tiles, we need to match just two LOD level tiles boundaries.

I'ts a bit hard to explain. I've done little experiments with the system, but I've not yet got it to work properly. And making it support all our terrain generation tools and sources (elevation and features etc) would be difficult too.

No proper LOD scheme for FlightGear will be done any day soon, but there is some work going on behind the scenes all the time!

Zan
Zan
 
Posts: 123
Joined: Tue Oct 20, 2009 11:28 am

Re: New Flight Gear Terrain Engine

Postby psadro_gm » Wed Sep 28, 2011 10:16 pm

Hi Zan,

Took me a few pencil and paper diagrams to see where you were going, but I think I get the gist of it. I like it. I'll also play around with it and see how it develops. The biggest reason I didn't want to go down the regular mesh route was I though it was too radical a change. This is a much better way to start.
8.50 airport parser, textured roads and streams...
psadro_gm
 
Posts: 751
Joined: Thu Aug 25, 2011 3:23 am
Location: Atlanta, GA USA
IRC name: psadro_*
Version: git
OS: Fedora 21

Re: New Flight Gear Terrain Engine

Postby Zan » Fri Sep 30, 2011 7:53 am

I drew some poor images to explain the method a bit:
Image
Lowest LOD level. All tiles are squares that consist of 4 triangle sub tiles.
Image
Making one tile LOD1. Two sub tiles are splitted to create the green tile, which again consists of 4 triangle sub tiles.
Image
Dividing once more. Now there would come a LOD0-LOD2 border, so we need to create one more green LOD1 tile. 4 sub tiles, and all tile borders are only 1 LOD level up.
Image
Final division for now. LOD3 is the yellow tile. We need to subdivide the newer LOD1 tile to LOD2, which requires us to also create one more LOD1 tile.

The main idea is that the borders between higher LOD levels are always inside the square tiles, so I assume the border shouldn't be too visible. And subdividing one place quickly propagates the subdivision around it, we get quite smooth transition from high LOD to low.

Another idea is that we can start with a cube around earth (LOD0) and subdivide it to create a more spherical shape in higher LOD levels. Then we map the tile boundaries to lat/lon and create the real tiles from those areas. I'm not sure how this would work with GRASS or other tools, but it would be a pretty simple yet powerful LOD scheme.

Zan
Zan
 
Posts: 123
Joined: Tue Oct 20, 2009 11:28 am

Re: New Flight Gear Terrain Engine

Postby adrian » Thu Oct 06, 2011 3:28 pm

Doesn't this method work precisely because of the regular grid? How can it be applied to an irregular mesh?
adrian
 
Posts: 362
Joined: Wed Sep 15, 2010 3:15 pm

Re: New Flight Gear Terrain Engine

Postby Zan » Thu Oct 06, 2011 8:36 pm

My idea is to use that method to define terrain tile boundaries, and then inside of those use the irregular triangular network. Only the tile borders need to be shared between two LOD levels. But as we already somehow handle tile boundaries, I'm sure it can be extended to work with different LODs too.
Zan
 
Posts: 123
Joined: Tue Oct 20, 2009 11:28 am

Re: New Flight Gear Terrain Engine

Postby psadro_gm » Thu Oct 06, 2011 9:03 pm

hmm, but then we would have to precompute each tile at multiple levels of detail, wouldn't we?
8.50 airport parser, textured roads and streams...
psadro_gm
 
Posts: 751
Joined: Thu Aug 25, 2011 3:23 am
Location: Atlanta, GA USA
IRC name: psadro_*
Version: git
OS: Fedora 21

Re: New Flight Gear Terrain Engine

Postby Zan » Sat Oct 08, 2011 9:44 am

psadro_gm wrote in Thu Oct 06, 2011 9:03 pm:hmm, but then we would have to precompute each tile at multiple levels of detail, wouldn't we?


Yeah. I know that usually the LODs are calculated on the fly, but I'd rather precompute them. I don't think the footprint would be that much larger (probably we need like 3-4 LOD levels?), and we only need to load the tiles currently visible.

Of course it might turn out to be a bad solution, but to me it seems worth trying. If you have other methods, let's discuss those too :)

Zan
Zan
 
Posts: 123
Joined: Tue Oct 20, 2009 11:28 am

Re: New Flight Gear Terrain Engine

Postby vitos » Sat Oct 08, 2011 7:15 pm

Zan wrote in Sat Oct 08, 2011 9:44 am:Of course it might turn out to be a bad solution, but to me it seems worth trying. If you have other methods, let's discuss those too :)


Why idea of "current engine+simple textured globe" seems inappropriate to You? Actually there is not so much crafts what flies on <10km with >3Mach or >10km with <3Mach. It's easy and fast solution. To be exact, first step is to _switch_off_ current engine anyway because it laggy and tends to dropdown on high altitude and speed. Can You make it off on speed>10Mach and altitude>50km for beginning?
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 9:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

Re: New Flight Gear Terrain Engine

Postby Zan » Sat Oct 08, 2011 8:38 pm

That could work for the time before we get a proper system.

Though there are issues on the scale, since the model would need to be huge, we would get precision issues in the rendering. Maybe some smaller model + scaling on the shader could work. I can try it when I get home and have some free time...

Zan
Zan
 
Posts: 123
Joined: Tue Oct 20, 2009 11:28 am

Re: New Flight Gear Terrain Engine

Postby vitos » Sat Oct 08, 2011 10:07 pm

Nice to hear it. I mean, I had heard from some developers what it could be "very hard" to even switch current engine off. If You would make it it could be very nice.

Gijs: Ha, I see some censorship here already? :) Well, I suppose You will never go to space by that that way. And, BTW, You reap what You sow.
Last edited by Gijs on Sat Oct 08, 2011 10:35 pm, edited 1 time in total.
Reason: No useless quoting please.
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 9:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

Re: New Flight Gear Terrain Engine

Postby SiriusGrey » Thu Jan 19, 2012 11:37 am

Hi all,

I've been interested in extending Flightgear to low earth orbit and beyond for quite some time (my last crude attempt was at version 1.9...) , and agree with psadro_gm and Zan that a LoD-Terrain engine is one of the crucial steps to this goal.

Vitos, fixing the immediate rendering issues (i think Thorstens shaders might just do that) will not give you more than a foggy sphere. Loading as many tiles as you could see even from LEO in full detail is probably prohibitively memory-expensive, so a LoD system would be necessary. Putting a textured sphere under the geometry would work in first approximation, but i think it would lead to very harsh transitions between it and the detailed normal terrain.

My dream would be extending the terrain engine to work seamlessly from ground to geostationary, and produce beautiful views at every step. I realize that this is a multi-year effort. However, looking at the recent improvement in graphics and consolidation, both with the weather shaders and Rembrandt, i have now hope that it can be achieved eventually. I am particularly happy with Rembrandt, since I feel that several shader issues that would lead to horrible problems at high altitudes have now been decoupled from each other.

I'll try to get up to speed by testing out the Rembrandt branch and Thorstens shader changes, and maybe see if I can rudimentarily make them work together - the faster these two projects get into mainline, the less effort is wasted by duplicating or fixing old shaders. Next, I'd like to help with the terrain engine - trying to reach the south pole in flight gear has left me frustrated recently :/ .

I have quite some professional C++ experience and working knowledge of OpenGL, so I hope I will be able to contribute. On the other hand, I should really finish my thesis, so i might only really get fully into development for some months.
SiriusGrey
 
Posts: 4
Joined: Thu Jan 19, 2012 10:23 am

Re: New Flight Gear Terrain Engine

Postby iinRez » Sun Mar 30, 2014 10:09 am

Have you seen GEFS? http://www.gefs-online.com/ it utilizes Google earth maps to load detailed scenery continuously, I haven't the slightest technical clue of the feasibility of this but could a similar system be utilized for Flight-gear? I would love to ascend out to space, that would be excellent, if you've used 'Celestia' imagine flight-gear mixed with that.
iinRez
 
Posts: 5
Joined: Sun Mar 09, 2014 10:47 pm

PreviousNext

Return to New features

Who is online

Users browsing this forum: No registered users and 2 guests