Board index FlightGear Development Spaceflight

Earthview - an orbital terrain rendering engine [v2.0]

Discussion about development and usage of spacecraft

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby galvedro » Fri May 02, 2014 8:05 am

Ok. If you prefer, I can also send a merge request. The data is already up in Gitorious after all.
galvedro
 
Posts: 145
Joined: Mon Oct 07, 2013 1:55 pm
Location: Sweden

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Fri May 02, 2014 10:47 am

I think it's easier if I just fetch and merge, test and push - I need to adapt some of my files as well for your texture naming conventions...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Sat May 03, 2014 10:54 am

Some flight tests... I wonder if JSBSim version drift has made this more difficult - I don't remember Vostok being that unstable on the launch, directly after liftoff the rocket tumbled 30 degrees off the vertical and I almost crashed. In the event, I lost control after stage 2 separation and had to abort, doing a ballistic hop across the US.

Image

Image
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby galvedro » Sat May 03, 2014 12:11 pm

I have added another earth sphere with UV maps that extend to the border of the object. I have called it earth_unitscale_rawuv.ac. You can find it here: https://gitorious.org/fg/galvedros-fgdata/source/ee0a0155e91be24ab80b4a7a0315c446baa08cd8:Models/Astro
galvedro
 
Posts: 145
Joined: Mon Oct 07, 2013 1:55 pm
Location: Sweden

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Mon Sep 29, 2014 3:16 pm

First: I'm sorry, if I overread it in this rather lengthy thread! Wiki didn't show no useful results either...
Second: Great compliments on this! I saw some vids and pictures and I am completely stunned! Yet another great step towards adding more realism!

Here's my problem:
Yesterday I took a trip with the blackbird and ended up playing around with Earthview. What I got was rather disappointing, some blueish world with a resolution of maybe one pixel per 100km.

What am I missing here?

I remember having read about it in some newsletter or sth, that the standard image for this was rather bad resolution, with the option to get a better image from Nasa. I was looking all over the place, but couldn't find any file with a complete world image, only parts of it. Reading this thread, I get the feeling, I'd have to do this on my own, meaning, getting these huge files, try to merge them manually (if my computer can handle that much data) etc. But even, if I manage to do that right, where would I put this file to show up in EarthView?

Thanks people, for any help and hints - and of course, for your great work!
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
Retired
 
Posts: 1577
Joined: Mon May 03, 2010 2:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby wlbragg » Mon Sep 29, 2014 6:54 pm

The textures that are supplied by default work reasonably well at altitudes over 300,000 ft.
Below that , no they need to be higher-res.
To get a higher res texture, yes you have to create them yourself.
Try an altitude +300,000 ft and see what you think.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Mon Sep 29, 2014 10:27 pm

I'll do that next chance I get! 300.000ft? Nothing what the Bluebird couldn't handle, but with Blackbird....
Thanks!

About creating these textures mayself... I think I gotta read the first pages once again, how to do that.... :)

Edit:
Maybe worth a Wiki-page? I'd volunteer to help on that, but I'm not sure, how much time I can afford these days... but count me in!

-----

What kinds of workload for my computer does it bring, if I were to put in the highest possible resolution of these images? I mean, I know, there's some kind of workload for every texture I get to see in FG, but what parameters are we talking about? If I were to make a texture of these many ~400 Megabyte-sized files, how much of it would be actually used? All of it at once? only a small part?
You see, I didn't understand it. Though I'm quite sure, creating these huge texture files will bring my computer to it's knees, but on the FG side of things, how much computing power will it take to load these huge files?
I'm dreaming, if this was to work for this high altitude scenery breakdown thing, it would be just great, to have some huge earthview-file, but only excerpts are being loaded in runtime... I believe, even my machine could handle that!

On the other hand, I saw some video on youtube about OSGearthview yesterday, doing some kind of photorealistic-scenery stuff. Though it's loading times was way too slow, I thought, man, this is a beginning! Great! I love it already!
Is this the same technology, were talking about, or is this some completely different animal? is this tile-concept applying here, or am I completely off track?

To bring my dreaming to a close; I was a long time annoyed by the simulated world, flying in an airliner at, say FL300, and wasn't able to see the scenery beneath me. A look out of the window only showed the tile borders of the outer tiles. Then I learned about this Orbital view, and now I'm dreaming, could this be applied to everything above a certain altitude? I mean, in the Blackbird at 85000ft, all you could make up, about where you are, is with external views or the map. This is, at least to me, a real pain in the a$$. It looks just stupid: (imagine the scene in a blackbird, at 50000 more feet!)
Image
I wonder, if it wouldn't look better without the 3d shapes, but with a scenery reaching to the horizon...
Or what about, if the globe, behind the actual scenery tiles reaching to the horizon, would be augmented with your orbital view tiles? Like a painted sphere below the scenery tiles?
</dreaming>

:)
Good night to you folks, and again, many thanks, for doing what you do!

P.S. after reading it through, I want to add, this is no criticism at all about anything about FG!!! I'm just trying to bring in some ideas. Now, that the orbital view has established itself in git, I only want to try to maybe open some doors, that maybe didn't seem doable till now.... and these pictures made with this orbital view simply slammed this door open, in my humble opinion...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
Retired
 
Posts: 1577
Joined: Mon May 03, 2010 2:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Tue Sep 30, 2014 7:06 am

I remember having read about it in some newsletter or sth, that the standard image for this was rather bad resolution, with the option to get a better image from Nasa. I was looking all over the place, but couldn't find any file with a complete world image, only parts of it


Which, incidentially, is what you want, because EarthView uses a sphere with 8 separate texture sheets (and I think even a similar naming convention to the NASA files...). The site you're looking for is Visible Earth, especially the Blue Marble section.

Maybe worth a Wiki-page?


Well, the simple, slightly seamy way is you download a file, resize it to a 2^n size to make life easy for the GPU, save it as png (or if you want it fancy dds) and... done.

The hard way without any seams involves creating a suitable margin like in the existing textures.

What kinds of workload for my computer does it bring, if I were to put in the highest possible resolution of these images?


Not much as long as it fits into memory. There's only a sphere and 8 textures in the scene, that's no hard rendering task.

All of it at once?
I'm not sure how the GPU does it internally. You can get to see a maximum of 4 at once, so at least 4 have to reside in GPU memory, the rest is probably loaded just in case. For really hires (16384x16384) precompressed dds helps a lot.

I'm dreaming, if this was to work for this high altitude scenery breakdown thing, it would be just great, to have some huge earthview-file, but only excerpts are being loaded in runtime...


That all exists, Celestia or Orbiter have virtual textures which just load the resolution levels you actually see, but I'm genuinely not interested in spending time implementing that in FG - Earthview does what it's supposed to be, i.e. it gives you something to enjoy while trying rocketry, I think that's nice to have in FG, but unless our spacecraft fleet significantly expands, I don't really see the need to do much more on that front.

To bring my dreaming to a close; I was a long time annoyed by the simulated world, flying in an airliner at, say FL300, and wasn't able to see the scenery beneath me. A look out of the window only showed the tile borders of the outer tiles.


Well, you have to adjust your LOD bare to be always larger than the visibility range you allow - then you won't ever have the problem in the screenshot.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Tue Sep 30, 2014 3:24 pm

Thanks a lot for your explanations, Thorsten!
But I still couldn't figure out, where to put these dds-files. Do these get automatically detected, or do they need to be hacked into some xml-file? I've got some weird filenames like:
Code: Select all
world.topo.bathy.200407.3x21600x21600.A1.dds


On another note, I kept the 21600px dimensions, which seems to be massive! When imagemagick/convert made dds out of the jpgs, it took about 4GB RAM!!! So I'm developing doubts, if this could be done at all in this resolution... My Calculator told me, ONE pic of 21600x21600 by 24bits alone takes up ~1.4GB! So I guess, I'm about to kill my computer altogether. I'll try to half the resolution, if it's getting a problem...

BTW:
Just took a little stroll in the bluebird! Very impressive from 300k feet + !!! Though FG crashed on me, when I wanted to try the fly-by-view! :) Might have to do with me flying hyperlight speeds... :roll:
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
Retired
 
Posts: 1577
Joined: Mon May 03, 2010 2:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Tue Sep 30, 2014 4:16 pm

EarthView resides in /Models/Astro - the file that's loaded is specified in earth.xml - if you do your own textures, you attach them to earyh_unitscale_rawuv.ac and reference that in earth.xml , or if you create margins, you can simply replace pale_blue_aug_*.png (the naming convention has N1 to N4 and S1 to S4 which is close to what NASA uses).

If you alter the texture names, you edit the *.ac file by search/replace or with your favourite model editor. Okay, I'm expecting here that if I say 're-texture that sphere' its not going to be an unsurmountable problem... that's sort of basic modelling done a few hundred times per day in the forum...

My Calculator told me, ONE pic of 21600x21600 by 24bits alone takes up ~1.4GB!


Because graphics cards like powers of 2, we're actually using 16384x16384 rather than full resolution (which would choke even my high-end GPU), and here we see the virtue of precompressed dds, so if I remember one of the precompressed and mipmapped files is 172 MB.

Unless you have 8+ GB of memory, using half the resolution is probably a very good idea.

Once you are at it, notice that also the cloudsphere is available at higher resolution... makes a hell of difference.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Tue Sep 30, 2014 11:42 pm

Thanks again! You gave me quite some useful search-terms! At the moment, my machine is crunching the numbers, or actually swapping through them. CPU at 5% while Swapping is going crazy. I estimate the process "convert" takes up about 6GB of RAM of my 4GB that I actually have! Crazy! :shock:
Here's what I did so far:
Code: Select all
convert world.topo.bathy.200407.3x21600x21600.A1.dds -resize '8192x8192' -define dds:mipmaps=8 -define dds:compression=dxt5 pale_blue_aug_N1.dds

Maybe I should take the original jpg's instead of the first dds's I created?

Actually, I have no idea, what a sane value for compression and mipmas would be, so I just tried it like this. I read in the manuals, that the mipmaps are generated in the power's steps, like 512, 1024, 2048 etc. So, I thought, beginning at 8192, 8 mipmaps would be nice... And for the compression, I thought dxt5 sounds more than dxt1, so I'd guess, this is stronger compression...

Well, I hope the computer is going to finish some time tonight with its first image, it's been running for 20mins now...
Then I'll go and rename the references in the xml's and ac's from png to dds. Hopefully FG will do the rest on its own...

Thanks so far! :)

P.S.
It's done, the first image is ready. Only 42MB with 8192px vs 222MB with 21600px. Next thing, I'll try to do the same thing, but use the original jpg's...
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
Retired
 
Posts: 1577
Joined: Mon May 03, 2010 2:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Sun Oct 05, 2014 10:08 pm

Update:
These 8k images worked like a charm! Framerates ~ 60 fps and some stunning views! Incredible!

After 3 days I cancelled the operation to create 16k dds files. It's just not worth it. To take more than 3 days to create one of eight files - phew - that's just too much! Expect some screenies in What/Where did you fly today! For now, I'll stick with the 8k files. If anyone is interested, I'll be glad to share those files and most of all computing time! I already have them done...
About the clouds, where did you get the pics with transparent background? I only found some with black background...

I wonder, how the guys at Nasa managed to put that much data into such small jpgs... unbelievable!
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
Retired
 
Posts: 1577
Joined: Mon May 03, 2010 2:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Mon Oct 06, 2014 5:57 am

About the clouds, where did you get the pics with transparent background? I only found some with black background...


You just instruct gimp (or the image processing software of your choice) to set black to alpha and save the result as a greyscale with alpha image.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby chris_blues » Mon Oct 06, 2014 12:25 pm

Ah ok! Thanks! I'll do that!
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian stable 64bit - i7 8x2.8GHz - 20GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
Retired
 
Posts: 1577
Joined: Mon May 03, 2010 2:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian stable 64

Re: Earthview - an orbital terrain rendering engine [v0.1]

Postby Thorsten » Fri Oct 28, 2016 9:59 am

Tinkering some with the visuals during low sun - I've had to introduce a self-generated normal map for the clouds to make them more compelling, though it's still a bit quirky.

Image

Image

Image

Image

Image

Image

In a way, I think it underlines why I believe Earthview is a good strategy to render visuals from orbit - the set of approximations to atmosphere physics that can be made is totally different from the set you'd use below 30 km altitude. Each works well in its own regime, but connecting them is a mess.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 4 guests