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 statto » Mon Mar 26, 2012 3:38 am

Guys... this argument has/will have no winner.
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2106
Joined: Fri Jan 25, 2008 9:57 pm

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

Postby vitos » Mon Mar 26, 2012 6:03 am

Hooray wrote in Mon Mar 26, 2012 12:15 am:Let me reiterate that: These will NOT be Nasal tutorials, these will be CORE programming tutorials illustrating step by step how to implement certain features in C and C++. You get personal programming support, provided by someone who's making a living as a software engineer coding in C and C++. For free, I may add!


Aha, that's I had wanted right from the start, and if You'll check devel list then You may find number of my requests about that. But that requests was year ago and without any answer, which was lead me to tell that FG is Open Source but Closed Community one. You may find that messages in devel, forum, and IRC if some log is existed. You know, if someone needs to make something prior to get knowledge about how to do so then it makes dead loop, and such loops clearly shows closeness. Meanwhile, If You promise to provide help in learning core to guy who was not made some core addition first then there is no such loop, that's good.

Right now I am making FG plane and simply have no time to get into the core. That plane is a bit complicated, do not even know if I'll make it finally or not. By the way, about what Nasal can do and what it cant, simply look in 7000 strings of MiG Nasal code to see if I am knowing something about that. Anyway, if I'll have enough time and inspiration some time later then I'll get Your help. At least it's needed to check out if FG can be transformed to space simulator without strings attached. You know, it's not enough to make some addition, it's needed to make guys accept it, that could be much harder and could take much longer time with a lot of efforts, which I have not much, both.

You seems don't see two important points in my "oddities". At first, I simply see how much something will take and how much something will gain, and avoid tasks with low ratio in that meaning. As anyone else I suppose. Secondly, I am not really interested in making something in simulation. It's not interesting to make something secondary really. I interested in company. So Great Thank You for proposition. Hope in time I would accept it.

I had tested Your patch with everything off and Earthview on. It had rise mean fps from 5 to 10,

Image

peaks to 20 sometimes as previously,

Image

but it drops to 1fps still there,

Image

just as planned

Image

.

It's problem of lower level.
Last edited by vitos on Mon Mar 26, 2012 6:12 am, edited 2 times in total.
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 8:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

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

Postby Thorsten » Mon Mar 26, 2012 6:07 am

Because of what exactly? You mentioned the required numerical stability and the lack of thread-safe property tree access - I think I illustrated how these limitations can be circumvented?
I still think it'll take less effort (coding and time-wise) to use a Nasal prototype for starters.


Because putting things on a stable orbit generalizes really well.

It's not like putting AI aircraft on a constant course, this is artificial, they wouldn't do that in real life. Putting things into a stable orbit is like giving them a fixed location - to first and second order approximations, they never move anywhere else (to third order, orbits decay and must be stabilized by periodically prograde burns). So it wouldn't need any degree of customization, the same code would apply to really all objects in orbit.

At the same time, the garbage collection is an unsolved problem so far, and if we start writing the whole space environment in Nasal, that is going to bite us really hard. I've seen where the limits in moving a large number of objects in Nasal are, and it doesn't scale just as well as C++ code.

We can have ISS easily in Nasal, but if we're going to do the motion of satellites, planets and moons, comets and asteroids (the whole Celestia zoo...) then this is going to come down in flames. It doesn't scale so well. At the end of the day, you need 3 setprop() calls per object per frame, and they limit the framerate. Plus, the GC runs become harder.

From what I can see, it's a limited effort to add an orbital motion class to the AI scenario xml declarations. From there we can use a Nasal script to initialize the orbits in any way we'd like. Technically, satellites and space stations should be like carriers, i.e. implemented as AI scenarios.
Thorsten
 
Posts: 12017
Joined: Mon Nov 02, 2009 8:33 am

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

Postby Thorsten » Mon Mar 26, 2012 6:14 am

I had tested Your patch with everything off and Earthview on. It had rise mean fps from 5 to 10,


I'm usually getting framerates between 24 and 32 with Vostok in orbit. In fast-forward time, this slows down to ~8 fps at 16x fast-forward. After an extended period of that I had ~4 fps for a time of 30 seconds or so, but it recovered to 28 fps afterwards.

At this rate time rate, the spacecraft covers ~130 km/sec in fast-forward time, this may really tax the scenery manager so that it has stuff to catch up with. I'll ask if it's difficult to make it runtime-switchable so that we can test if this is the root cause. This will break some things (for instance, altitude above terrain can then no longer be computed), but maybe that can be addressed later.

I have not seen any framerate drops outside fast-forward time in orbit. Is this a MP issue or does it also occur offline?
Thorsten
 
Posts: 12017
Joined: Mon Nov 02, 2009 8:33 am

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

Postby vitos » Mon Mar 26, 2012 6:20 am

Thorsten wrote in Mon Mar 26, 2012 6:07 am:At the same time, the garbage collection is an unsolved problem so far, and if we start writing the whole space environment in Nasal, that is going to bite us really hard. I've seen where the limits in moving a large number of objects in Nasal are, and it doesn't scale just as well as C++ code.


By the way, it's a big question how long manned orbital flight can last in current FG state. I had made attempt to reproduce Titov flight once, but FG had dropped down after some hours, not days. So I had put "Vostok" to stable 160..260km orbit with Earthview and Hoorays patch in multiplayer now, let's see how far it could get. I had dropoffs in multiplayer KSFO many times with most of planes here, so it's very possible that flight could not be very long.

Thorsten wrote in Mon Mar 26, 2012 6:14 am:I'm usually getting framerates between 24 and 32 with Vostok in orbit. In fast-forward time, this slows down to ~8 fps at 16x fast-forward. After an extended period of that I had ~4 fps for a time of 30 seconds or so, but it recovered to 28 fps afterwards.


Again, let's see which computer You have. I suppose it's not of mean level.

Thorsten wrote in Mon Mar 26, 2012 6:14 am:At this rate time rate, the spacecraft covers ~130 km/sec in fast-forward time, this may really tax the scenery manager so that it has stuff to catch up with.


With Hooray patch it's gotta be no problem, it switches off any terrain.

Thorsten wrote in Mon Mar 26, 2012 6:14 am:I have not seen any framerate drops outside fast-forward time in orbit. Is this a MP issue or does it also occur offline?


It's MP independent issue.
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 8:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

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

Postby Thorsten » Mon Mar 26, 2012 6:27 am

Again, let's see which computer You have. I suppose it's not of mean level.


It's a 4-year old laptop, which back then was top notch, but I doubt it is very competitive now.
Thorsten
 
Posts: 12017
Joined: Mon Nov 02, 2009 8:33 am

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

Postby vitos » Mon Mar 26, 2012 6:33 am

Thorsten wrote in Mon Mar 26, 2012 6:27 am:It's a 4-year old laptop, which back then was top notch, but I doubt it is very competitive now.


My computer have 2Gb memory, dual core Athlon 4000+ processor, 1Gb Asus ENGST450 on base of GeForce GTS 450 videocard, and Gigabyte GA-M61SME-S2L motherboard. It's gotta be compatible with Your computer then. So big difference in fps is very strange. Please provide more detailed data.

By the way, right now I have 4..5fps. Flight goes on...

,,,Same thing. It drops to 1fps with time. Setting it on pause gives fast view, unpausing returns it to 4..5fps. Merging new tiles have ~260..300ms. It shows ~271000 vertices, ~17000quads on one camera and ~53000 quads on other, as I can remember it ~half of how much it takes with scenery on...

...I suppose I'll get to land on end of next orbit. It's goes on 1..3fps now and pausing is not helping anymore.

Image

Image

Next round I will try to set automatic selection in multithreading mode, but do not think it'll help much...Yeah, same thing. 15fps at start, 5..6fps at the 3rd stage, so no reason to continue.

Image
Last edited by vitos on Mon Mar 26, 2012 10:22 am, edited 2 times in total.
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 8:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

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

Postby Aury88 » Mon Mar 26, 2012 8:29 am

hi guys,
Thorsten, Vitos , I want to congratulate you and thank you for the impressive project you are pursuing.
also I want to ask Thorsten if it is possible to use something like normal mapping to make the earth more realistic (less "flat") in very low orbit.
from what I know It is useful to add 3d details without using more polygons and also it is possible to selectively decreases the detail of the normal map of a given texture (meaning that more distant surfaces require less complex lighting simulation), but I don't know if this technique can be used in FG.
thank you.

ps: sorry for my bad English :oops:
Aury88
 
Posts: 8
Joined: Mon Mar 26, 2012 7:56 am

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

Postby vitos » Mon Mar 26, 2012 9:03 am

Aury88 wrote in Mon Mar 26, 2012 8:29 am: Thorsten, Vitos , I want to congratulate you and thank you for the impressive project you are pursuing.


To be honest, I do not know. "Vostok", from beinning, is alfa level project, particularly to test Flight Gear/Open Source society space flight/teambuilding capabilities, and, ~1 year afrer its first orbital flight, it looks like it could be easier to make standalone Open Source space flight simulator than to expand FG that way. It's not one human being task in any case, so it depends, I can not make some decision of how it will be. I suppose it's too early to congratulate someone.

About Thorsten part, Earthview project, I could say that it's great thing, and with additional help of Hooray who could make some module to automatically switch normal terrain off and Earthview on at some altitude it could be added in FG on stable basis, until some other better thing will be made in that field. But it's my personal opinion and I do not know will that patches be added by community or not.

At the moment space flight is too slow with any possible patches to develop it further here. "Vostok" models could be simplified two or more times, but I do not think it could help since slowering seems to progress with time, and glitches seems to be pretty unpredictable. For example, now it runs on high orbit with 15fps

Image

but I can not tell how long it'll last. It's some vodoo, I can not comprehend why it runs faster now than previous time, worst type of glitches...

...Aha...And winner is...

...As expected, 1fps after one orbit.

Image

Image

It seems time it get slower depends of had it been started with some features off, or had that features was switched off manually after start.

Thorsten, I assume Your "old laptop" have 1.5...2 times more memory than mine "recently upgraded computer". So You have't face memory leak problem even in comparatively long duration flight, but it's here, and it's surely will jump up later for all. I suppose it's not Nasal leaks problem only, it's too big for this. It's gotta be leaks here and there, in graphics and lot of other systems. That's what I call "other level problem". As people in Russia sometimes says "it had sneaked up to us unnoticed, though it was visible from afar".

It could theoretically possible to upgrade mine computer, somehow Open Source is other way to make people invest in computer science, but I would not do that. Simply had invest in that more than enogh previously. That memory leaks problem shoulda be solved somehow else. I am sure it's unreasonable to make some free stuff for guys who buys high end computers or makes their part wrong. So, instead of ignoring this, leaks gotta be eliminated.

I would prefer someone else do that prior to other improvements, someone else because it seems to be a comparatively big task on which I personally have no time, and, after all that things had been said and done, inspiration right now. Guys, believe me, it's easier to fly to ISS really than to make such flight possible in Open Source with its immanent "by way which is accesible right now on my opinion/by way it can be done really on my opinion" unsolvable disagreements and constantly beta level solutions.
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 8:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

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

Postby Hooray » Mon Mar 26, 2012 1:38 pm

thanks for keeping your responses constructive, I was slightly afraid when looking at the length of the replies ;-)
besides, I really wasn't aware that you had asked for core programming help a year ago, I wasn't really on line during that time, for about 6 months, so I might have missed quite a lot of stuff. I am going to shut up now, for the sake of the effort.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12190
Joined: Tue Mar 25, 2008 8:40 am

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

Postby vitos » Mon Mar 26, 2012 1:48 pm

Hooray wrote in Mon Mar 26, 2012 1:38 pm:thanks for keeping your responses constructive, I was slightly afraid when looking at the length of the replies ;-)
besides, I really wasn't aware that you had asked for core programming help a year ago, I wasn't really on line during that time, for about 6 months, so I might have missed quite a lot of stuff. I am going to shut up now, for the sake of the effort.


Please don't be offended, I should comprehend this and tell about that to You long ago. Anyway, problems seems to be big quite enough to not depend of communications level. I think it's that I had mentioned earlier in partly wrong but seems to be right in essence theme http://www.flightgear.org/forums/viewtopic.php?f=42&t=12881

"Complexity of code produced by that path grows in geometrical progression with size of it and that code could not be reorganized and documented. Therefore the far it goes the less possibility to find and eliminate errors, even for group of developers, and less the possibility to include someone else in that group. In time it will come to the dead end if it will be developed by that path further."
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 8:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

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

Postby statto » Mon Mar 26, 2012 3:56 pm

vitos wrote in Mon Mar 26, 2012 9:03 am:
Aury88 wrote in Mon Mar 26, 2012 8:29 am:I suppose it's too early to congratulate someone.


Well, you and Thorsten have helped extend FlightGear in a way which I would have thought impossible when I began contributing to the project, even if it is at alpha level. That in itself deserves some acclaim.
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2106
Joined: Fri Jan 25, 2008 9:57 pm

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

Postby vitos » Mon Mar 26, 2012 6:16 pm

statto wrote in Mon Mar 26, 2012 3:56 pm:Well, you and Thorsten have helped extend FlightGear in a way which I would have thought impossible when I began contributing to the project, even if it is at alpha level. That in itself deserves some acclaim.


I do not think it's need acclaim actually. Maybe Thorsten need that, if so there's another deserved one



but to me praising is not needed much. That work is enlight some problems, that problems needs to be fixed, that's what really needed. And most of that problems is that there is no collective work with common task really. No plan, no testing any feature in means of memory and processor power using, no control, it's even continuously using things that is known as working wrong. Project can envelop that way infinitely only in dream, really hardware requirements of it grows much faster than features list then.

Aside of common state of things, particularly with Eathview, there is some good news and some bad news right now. Good is that I, and anyone with compatible computer and compilation with patches using skills, can fly one, only one, orbit with 7...15fps or so. Comparatively bad news, in addition to growing lag, that it had hit something on landing after that single orbit at 15km alttude with crash. It was not surface of Earth since such crash have other text output. Maybe surfaces of Earthview model is "hot", maybe something else. Other comparatively bad novelty is that it's very hard to correctly set angles to deorbit burn with Earthview, low detailed textures do not give enough information abouth where it goes. So, there is not only Problems, there is problems, too.

And some additional infromation, about polar orbit. I can say that it's stable, simply apogee/perigee accounter is not correct with it. It makes ~1..2km errors on normal orbits and ~5..10km errors on polar, so if You set it on 150...300km polar orbit then You can be sure that fps will drop down faster than atmposphere will slow it enough to deorbit. For example, that finally failed flight had polar 330deg orbit, and it's a bit funny that it was hit that something in the air comparatively near to Finland.
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 8:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

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

Postby Thorsten » Mon Mar 26, 2012 9:01 pm

also I want to ask Thorsten if it is possible to use something like normal mapping to make the earth more realistic (less "flat") in very low orbit.


I'd think so. Celestia might even have the corresponding normal maps available.

However, Mathias is really working on a way more sophisticated solution, so I don't want to spend too much time to make this much more realistic. But I want to reiterate that this is basically just a sphere witha fancy texture - so any modeller can have a go at it.

Thorsten, I assume Your "old laptop" have 1.5...2 times more memory than mine "recently upgraded computer".


4 GB of it actually.

That memory leaks problem shoulda be solved somehow else.


Agreed. But people are hunting those on a regular basis. They tend to appear as new features are added to GIT, and they tend to disappear during bug hunting season before a stable release. I have had some pretty serious memory issues and crashes with 250 km visibility tests before 2.6, but after 2.6 they are gone. So it's not a hopeless cause.
Thorsten
 
Posts: 12017
Joined: Mon Nov 02, 2009 8:33 am

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

Postby vitos » Mon Mar 26, 2012 9:08 pm

Thorsten wrote in Mon Mar 26, 2012 9:01 pm:4 GB of it actually.


Yes, two times.

Thorsten wrote in Mon Mar 26, 2012 9:01 pm:Agreed. But people are hunting those on a regular basis. They tend to appear as new features are added to GIT, and they tend to disappear during bug hunting season before a stable release. I have had some pretty serious memory issues and crashes with 250 km visibility tests before 2.6, but after 2.6 they are gone. So it's not a hopeless cause.


Well, lets see. Actually I am using 2.6 stable release, so people was not hunt these ones.

You know, I am pessimistic about how it all goes here, irrelatively to Your great work or my nearly bitter experience. It's not personal, it's about common spirit and friendship, not in "A to B:You are great. B to A:Thank You, You are great too." meaning, but in meaning of common aspiration for something. Maybe because my culture is bit different from median there, but I do not feel it here enough to some real positive changes. I am feeling it in Russian FG community, but it's local and could not change common way of things. I feel it much lesser here, for example we had made compatible things but it's not common work really, and it's not intended to go that way. And I do not feel it completely in devel list. It's not about emotions. It's intuitive vision of unity absence. It's all just as ash in the wind, which could take shape of something for some short moment but could not become something more than ash in the wind. And I do not like it.

Maybe it's not clear to You that I am meaning, since it's kinda figurative. I'll try to make some jentle hint then. Invitation is call to join something that inviting person is in of. Invitation to something else is sending actually, in better case. Hope I was not made invitations of that type, so I can not accept one of these.

Another hint. There is three types of liquid fuel in rocketry. First is ecologically clear, reusable, and very powerful, but not so cheap and hardly stored hydrogen. Second is bit lesser clear, not reusable, but currently very cheap and very easily stored kerosine. And third is very unclear, not reusable, not so cheap, but powerful and comparatively easily stored heptyl, with acid as oxidiser while first two uses oxygen. In means of project as Flight Gear first fuel is wish of people to know and learn. Second is wish of people to get fun. And third is wish of people to run away from reality. Apollo project, for example, had used kerosine on first stage, hydrogen on second and third, and heptyl at spacecraft itself. It had worked, but I would prefer much clearer solution. I do not want ro run away from reality on poison, at least until it only way steps on which really and very needed to many and many people, and of course I would not pull of push someone on this.

Besides all that, Thank You for thing You had made.

Ah, and of course I do comprehend that You had in mind some new space stuff by me when You had made that and when You had wrote to me about that. But, on base of "Vostok" making and postmaking experience, I had unambiguously clarified for myself that current FG society is not society for that is reasonable to do something innovative. Novelties calling for changes is unneeded here. If You make something as that then You gotta prepare Yourself for that no one will answer Your questions, for that Your thing will be put on bottom of news page while on top will be something, well, easier, that some guys who bombs out fame for themselves by tons of halfmade crafts will officially call You fool, that other guys will use Your stuff to make articles without mentioning Your name even, that Your messages will be banned by moderators while messages with "fool" word not, etc. It's all would not be any matter if some guys could start making real changes because some guy who had spent a lot of time for common sake needs it, if some good company would start congregate around You, but there is not the case completely. FG society is not differs from other mankind in that meaning, I had ascertain that definitively. Russians calls persons as I was while I had tested that society that way "guys who tries to run ahead of locomotive", and I can not allow myself be one as that any more since test is over. There could be some other relatiion from my side if test were brought some other results, but it is as it is.

There will be no fast forward progress of FG, in FG, with FG, or else. In means of human FG is not soulful genius, it's ordinary child. I am telling that as specialist, it's official proffesional conclusion based on specific test essence of which You can easily reconstruct on base of my past deeds, actions, and conversations. So FG is not very interesting to me, both professionally and personally. It will never give to Ya much more than it gets in any meaning, and progress of it will not be very interesting since it will not differ from normal progress of society much, at least in better direction.

So maybe, just maybe, if normal possiblity of orbital flight will be at the core of stable release then I would add something to "Vostok". Maybe when normal multiplayer will arise then I would start to think about docking. But not earlier at first and I do not promise anything secondly. Since FG is not plane but locomotive really it'll get its way by itself. If I will not make some space stuff then some other guy will. At least people here believe in that, and I do not care if their belief is wrong, or right. It does not matter to me.

P.S. Do not wonder if Sergey Pavlovich Korolev and Yury Alexeevich Gagarin efforts was same test but to all mankind.
Last edited by vitos on Wed Mar 28, 2012 8:25 am, edited 12 times in total.
Waste of time: too unprofitable for work, too exhausting for hobby.
User avatar
vitos
 
Posts: 615
Joined: Sun Jan 25, 2009 8:10 pm
Location: Moscow, Russia
Callsign: vitos
IRC name: vitos
Version: 3.4
OS: Debian

PreviousNext

Return to Spaceflight

Who is online

Users browsing this forum: No registered users and 1 guest