Board index FlightGear Support

A LOD error in FlightGear 2019.1.2

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

Please report any bugs not specific to an aircraft on the issue tracker.
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

A LOD error in FlightGear 2019.1.2

Postby helijah » Tue Oct 08, 2019 4:19 pm

Good morning, everyone,

Apart from other topics that can often make me unpleasant, I come here to report a problem with FlightGear 2019.1.2

Until this version I could see Paris, Orly, Roissy and other scenes (like Corsica) that I spent a lot of time adapting to FG.

Damned ! Since 2019.1.2, no more buildings.

So here are, after a few minutes of research, it seems that the variable

sim/rendering/static-lod/bare

is no longer filled in and replaced by

sim/rendering/static-lod/bare-delta

Of course, in itself this is not disturbing just change all the files containing the condition:

<animation>
<type>range</type>
<min-m>0</min-m>
<max-property>sim/rendering/static-lod/bare</max-property>
</animation>

But before I start this work (hundreds of files in several folders, I would like to know if it is possible to see the variable

sim/rendering/static-lod/bare

receive the content of

sim/rendering/static-lod/bare-delta

In the meantime and for those who are interested, I added

var tmp = getprop("/sim/rendering/static-lod/bare-delta");
setprop("/sim/rendering/static-lod/bare", tmp);

At the end of the math.nas file in $FG_ROOT/Nasal

Regards Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1338
Joined: Wed Dec 27, 2006 1:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: A LOD error in FlightGear 2019.1.2

Postby Thorsten » Tue Oct 08, 2019 5:34 pm

Code: Select all
<animation>
 <type>range</type>
 <min-m>0</min-m>
 <max-property>sim/rendering/static-lod/bare</max-property>
 </animation>




Actually such range tags should be systematically avoided because they have very bad performance (in fact, in several tests removing the range animation and just showing the models improved the framerate).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: A LOD error in FlightGear 2019.1.2

Postby helijah » Tue Oct 08, 2019 6:39 pm

Thank you, but this is not an answer. Quite the contrary. The fact is that hundreds (or even thousands because I'm not the only one doing this) of files use this type of code.
Worse personally, I don't use them. It was someone here who asked me to do it to allow me to fly around Paris, which remains a monstrous scene.
If this is not a good thing then the LOD systems must be removed. Why continue to modify and implement them ?
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1338
Joined: Wed Dec 27, 2006 1:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: A LOD error in FlightGear 2019.1.2

Postby legoboyvdlp » Tue Oct 08, 2019 6:47 pm

The range animation does exactly the same thing as LOD - advice to use sim/rendering/static-lod/bare is redundant now as objects will be loaded or unloaded as distance (or pixels!) change.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: A LOD error in FlightGear 2019.1.2

Postby Richard » Tue Oct 08, 2019 6:50 pm

helijah wrote in Tue Oct 08, 2019 4:19 pm:Apart from other topics that can often make me unpleasant, I come here to report a problem with FlightGear 2019.1.2

Until this version I could see Paris, Orly, Roissy and other scenes (like Corsica) that I spent a lot of time adapting to FG.

sim/rendering/static-lod/bare

is no longer filled in and replaced by

sim/rendering/static-lod/bare-delta



This is something that I changed - because I though it better that the LOD ranges build ontop of each other (deltas) rather than absolute values.

However using these properties in range animations simply isn't the way that LOD should work; range animations can be very inefficient and sometimes the range animation often consumes more CPU cycles than simply letting the meshes render.

It is my recommendation that all of these range animations are removed. The correct way that LOD is handled for scenery is via the STG verbs; by allocating these appropriately into LOD groups and therefore the control remains within the rendering core rather than being spread out in lots of XML files.

In other words it is a fault to use range animations in this way.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: A LOD error in FlightGear 2019.1.2

Postby Richard » Tue Oct 08, 2019 6:53 pm

helijah wrote in Tue Oct 08, 2019 6:39 pm:The fact is that hundreds (or even thousands because I'm not the only one doing this) of files use this type of code
....
then the LOD systems must be removed. Why continue to modify and implement them ?


LOD shouldn't be used in this way - it's not how it was designed and using a range animation can do the opposite i.e. often increases resource usage rather than making things render faster.

In fact maybe we should remove range animations completely as they are of limited usage and cause more trouble than they're worth. I've spent a lot of time removing range animations from models.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: A LOD error in FlightGear 2019.1.2

Postby helijah » Wed Oct 09, 2019 12:25 am

Richard wrote in Tue Oct 08, 2019 6:53 pm:In fact maybe we should remove range animations completely as they are of limited usage and cause more trouble than they're worth. I've spent a lot of time removing range animations from models.


Finally a real answer.

So when I took over what had been done at KSFO for Paris, I made the big mistake of believing that the existing one was well done.

It is therefore preferable to modify thousands of existing files. KSFO, Generic....etc...there are some everywhere in the scenes.

I would correct Paris and Corsica because that's my job. For the rest, well, I wish you good luck.
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1338
Joined: Wed Dec 27, 2006 1:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: A LOD error in FlightGear 2019.1.2

Postby Thorsten » Wed Oct 09, 2019 5:32 am

Finally a real answer.


It happens to be identical to the very first answer you got. Don't confuse you not liking the message with you not getting a valid answer here.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: A LOD error in FlightGear 2019.1.2

Postby wkitty42 » Wed Oct 09, 2019 1:37 pm

this:
Thorsten wrote in Tue Oct 08, 2019 5:34 pm:Actually such range tags should be systematically avoided because they have very bad performance (in fact, in several tests removing the range animation and just showing the models improved the framerate).

and this:
Richard wrote in Tue Oct 08, 2019 6:53 pm:[...] we should remove range animations completely as they are of limited usage and cause more trouble than they're worth.

say exactly the same thing...

i will also point out that range animations have been being removed for like 3 years now... at least since LEBL was the default airport (2016)... it was noticed, then, that buildings were popping into the scene when they should have already been visible... using the UFO, it was determined there was a specific distance in play... once the range animation was removed, the buildings in question were appearing with all the others and the whole scene was much better... LOD works and works well :)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: A LOD error in FlightGear 2019.1.2

Postby Richard » Thu Oct 10, 2019 8:49 am

helijah wrote in Wed Oct 09, 2019 12:25 am:So when I took over what had been done at KSFO for Paris, I made the big mistake of believing that the existing one was well done.


After some more analysis I find that out of the 125k files I've got in my terrasync folder I've got roughly 5k files that contain range animations.

This leads me to the folllowing conclusions;

1. I need to add back in support for the old properties (static-lod/bare, static-lod/detailed, static-lod/rough)
2. We need to ensure that the message "don't use LOD or range animations" is clear for scenery modellers.
3. We need to remove the range animations (and fixup some of the meshes)
4. As a result of this we should review the usage of animations in the scenery.

To illustrate the cost of range animations in Paris the range animations are costing 7fps. To do this test I removed range animations in the core and the framerate increased from 23fps to 30fps.

Therefore I conclude that in Paris the range animations are costing around 30% loss of framerate.

Image
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: A LOD error in FlightGear 2019.1.2

Postby helijah » Thu Oct 10, 2019 10:16 am

Richard wrote in Thu Oct 10, 2019 8:49 am:
helijah wrote in Wed Oct 09, 2019 12:25 am:So when I took over what had been done at KSFO for Paris, I made the big mistake of believing that the existing one was well done.


After some more analysis I find that out of the 125k files I've got in my terrasync folder I've got roughly 5k files that contain range animations.

This leads me to the folllowing conclusions;

1. I need to add back in support for the old properties (static-lod/bare, static-lod/detailed, static-lod/rough)
2. We need to ensure that the message "don't use LOD or range animations" is clear for scenery modellers.
3. We need to remove the range animations (and fixup some of the meshes)
4. As a result of this we should review the usage of animations in the scenery.

To illustrate the cost of range animations in Paris the range animations are costing 7fps. To do this test I removed range animations in the core and the framerate increased from 23fps to 30fps.

Therefore I conclude that in Paris the range animations are costing around 30% loss of framerate.


Hi Richard

On my side I started to remove all that concerns LOD in all xml of Paris, Corsica etc.....

Regards Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1338
Joined: Wed Dec 27, 2006 1:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: A LOD error in FlightGear 2019.1.2

Postby Richard » Thu Oct 10, 2019 11:16 am

helijah wrote in Thu Oct 10, 2019 10:16 am:On my side I started to remove all that concerns LOD in all xml of Paris, Corsica etc.....


That's great - but also I'm proposing that we automate removal of 'simple' range animations at the scenery database level - see my recent posting to the dev-list.

By simple range animations I mean a single range animation in an xml; e.g. we can identify and safely remove all of the following.

Code: Select all
  <animation>
    <type>range</type>
    <min-m>0</min-m>
    <max-property>sim/rendering/static-lod/bare</max-property>
  </animation>
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: A LOD error in FlightGear 2019.1.2

Postby helijah » Thu Oct 10, 2019 3:00 pm

Richard wrote in Thu Oct 10, 2019 11:16 am:
helijah wrote in Thu Oct 10, 2019 10:16 am:On my side I started to remove all that concerns LOD in all xml of Paris, Corsica etc.....


That's great - but also I'm proposing that we automate removal of 'simple' range animations at the scenery database level - see my recent posting to the dev-list.

By simple range animations I mean a single range animation in an xml; e.g. we can identify and safely remove all of the following.

Code: Select all
  <animation>
    <type>range</type>
    <min-m>0</min-m>
    <max-property>sim/rendering/static-lod/bare</max-property>
  </animation>


I support this proposal because in addition to the files in scenery there are hundreds of files in $FG_ROOT/Models and in $FG_ROOT/Objects, I started but it will be much faster with an automatic system :)

Regards Emmanuel
Some planes (and other) for FlightGear
http://helijah.free.fr
and
http://embaranger.free.fr
User avatar
helijah
 
Posts: 1338
Joined: Wed Dec 27, 2006 1:35 pm
Location: Chartres (France)
Callsign: helijah
IRC name: helijah
Version: GIT
OS: GNU/Linux

Re: A LOD error in FlightGear 2019.1.2

Postby wkitty42 » Thu Oct 10, 2019 6:56 pm

these are what were being largely removed before... in numerous cases, it resulted in an empty xml file which was also able to be removed... that lead to having to adjust the stg files to point to the .ac files instead of the .xml files... this is easily seen with the power pylons which are now all .ac files with no .xml files...
Last edited by wkitty42 on Thu Oct 10, 2019 7:30 pm, edited 1 time in total.
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: A LOD error in FlightGear 2019.1.2

Postby Johan G » Thu Oct 10, 2019 7:09 pm

wkitty42 wrote in Thu Oct 10, 2019 6:56 pm:in numerous cases, it resulted in an empty xml file which was also able to be removed... that lead to having to adjust the stg files to point to the .sc files instead of the .xml files...

I hope only .xml files that then got empty get removed. It would be nice to still see night textures (in cases were those are available).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Next

Return to Support

Who is online

Users browsing this forum: No registered users and 9 guests