Framerates are well above 100 (just a single object in view...) and it matches well with the skydome shader. The only stumbling block are skydome rendering artefacts at high altitudes....
Now it needs some math to get it automatically rotated correctly, then a bit higher terrain resolution would do nicely, and then a cloudsphere rendered on top with the same technology would be nice (textures are taken from Celestia - it's not clear to me if the set can be GPL or not...)
Edit: Here is a link to the download of the version 0.1. Earth textures are by 'Jestr' from Celestia and licensed Creative Commons license CC BY-NC-ND, cloud textures are likewise Celestia, done by John van Vliet and are licensed Creative Commons CC-BY-SA.
To install:
1) Unpack the package in FGROOT - this doesn't overwrite any defaults
2) Add the 'earthview' menu item to the menu: Edit gui/menubar.xml to insert
- Code: Select all
<item>
<label>Earthview</label>
<binding>
<command>dialog-show</command>
<dialog-name>earthview</dialog-name>
</binding>
</item>
where you like it (I added this under 'View' just below 'Stereoscopic View Options')
When used in-sim, this brings up a very simple gui with 'Start' 'Stop' and 'Cancel' - 'Start' loads an Earthsphere (this might take a few moments, lots of textures), 'Stop' unloads it and 'Cancel' closes the dialog.
Now you can go and explore with the ufo.
3) To get rid of high altitude rendering artefacts and make altitudes above 150 km accessible for JSBSim FDMs apply this patch by Ron Jensen:
- Code: Select all
diff --git a/src/Environment/atmosphere.cxx b/src/Environment/atmosphere.cxx
index 022ea54..f16005f 100644
--- a/src/Environment/atmosphere.cxx
+++ b/src/Environment/atmosphere.cxx
@@ -18,7 +18,8 @@ ISA_layer(3, 32000, 104986, 868.019, 0.256326, 228.65, -44.50, -0.0028, -
ISA_layer(4, 47000, 154199, 110.906, 0.0327506, 270.65, -2.50, 0, 0),
ISA_layer(5, 51000, 167322, 66.9389, 0.0197670, 270.65, -2.50, 0.0028, 0.0008534),
ISA_layer(6, 71000, 232939, 3.95642, 0.00116833, 214.65, -58.50, 0.0020, 0.0006096),
-ISA_layer(7, 80000, 262467, 0.88628, 0.000261718, 196.65, -76.50),
+ISA_layer(7, 80000, 262467, 0.88628, 0.000261718, 196.65, -76.50, 0.0, 0.0),
+ISA_layer(8, 1.0e9, 3.28e9, 0.00001, 3.0e-9, 2.73, -270.4, 0.0, 0.0),
};
const int ISA_def_size(sizeof(ISA_def) / sizeof(ISA_layer));
4) To get black background where no skydome is drawn instead of weird fog grey, apply this patch by Lauri
- Code: Select all
If you want to try to change the clear color to black, you must edit
flightgear/src/Main/renderer.cxx around line 700. There are two
instances of following:
camera->setClearColor(toOsg(clearColor));
which should be changed to
camera->setClearColor(osg::Vec4(0.0, 0.0, 0.0, 0.0));
5) To make Vostok-1 go beyond 150 km altitude, remove the altitude crash condition in Aircraft/Vostok-1/Nasal/Crashes.nas, i.e. comment out the following block:
- Code: Select all
if (altitude>maximum_altitude_ft)
{
setprop("fdm/jsbsim/systems/crashes/crashed", 1);
setprop("fdm/jsbsim/systems/crashes/crash-type", "Alititude exceeds "~(maximum_altitude_ft*0.3048/1000)~"km");
crash("Alititude exceeds "~(maximum_altitude_ft*0.3048/1000)~"km", "Vysota prevysila "~(maximum_altitude_ft*0.3048/1000)~"km");
}
=> Flightgear is now fully orbit-ready - I've flown a short mission yesterday to 600 km altitude, and this works like a charm and is quite beautiful.
(Hopefully I can persuade people to include these patches to GIT...).
Dear 3d modellers - please take a look at Earth in Models/Astro/ - it's really just a textured collection of sphere sections. I didn't manage to patch this together as well as can probably be done because I am basically just fooling around with ac3d. But for you guys it should be really easy to segment Earth into a finer pattern and apply more detailed Celestia or other textures, to make texture change runtime like a livery and all these things.
Please, please do so! I really just want to get this on the way and then go back to doing weather, because I can't really spend much time on it.