Board index FlightGear Development Aircraft

Standard Aircraft Structure

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Standard Aircraft Structure

Postby daveculp » Thu May 09, 2013 1:08 am

I was looking at the proposed Standard Aircraft Structure, and there is one thing I'd like to see added to the top-level directory tree for each aircraft. That is an MPModel directory, which would contain a simplified version of the model for AI/MP use. I think the MP version should be made by the original model builder, and it should be included in the original model package.

The reason I'd like to see this is I usually remove all models from my Aircraft directory except the ones I'm working on. This is to prevent periodic freezing of my sim session on MP when someone logs in with a heavy model. I'd like to see their airplane though, but not in its full form, and not replaced with a blue glider (or some other one-off substitue). I used to keep my own stable of MP versions of many models, but it became too unwieldy to maintain. It would be easier if I could set an XML element in preferences.xml to use the MP version of a model rather than the full version, or get a blue glider if no MP version exists.

Note that I don't consider turning some features off on a full model to be sufficient for making an MP model.
User avatar
daveculp
 
Posts: 503
Joined: Sun Feb 24, 2013 1:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: Standard Aircraft Structure

Postby El Flauta » Thu May 09, 2013 1:12 am

What about the same 3D model, but empty (no instruments) and provided with lo-res textures?
Vive FlightGear! Have you a Ñ on your keyboard? Spain-LatinAmerica FlightGear community!
--
PZL M18B Dromader
CASA C-101 Aviojet
Cessna 337G Skymaster
User avatar
El Flauta
 
Posts: 426
Joined: Fri Mar 14, 2008 12:09 am
Location: SCVM, Chile
Callsign: CC-FLT
Version: 3
OS: Windows 7 SP1

Re: Standard Aircraft Structure

Postby daveculp » Thu May 09, 2013 1:23 am

As long as I don't get a freeze or a frame rate hit I can live with that. If I do then I'll just remove that model and go with the blue glider, like I do now. If I find some time some day I might also start creating my own substitue MP models again, but it's unlikely I'll find the time.
User avatar
daveculp
 
Posts: 503
Joined: Sun Feb 24, 2013 1:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: Standard Aircraft Structure

Postby Hooray » Thu May 09, 2013 1:52 am

The idea sounds sensible (basically like a livery/paintkit, which should ideally also be provided by the aircraft developer), so I added it to the wiki for now - however, do note that a while ago some people were working on a C++ based solution to come up with less complex models at runtime, using some OSG magic. Stuart worked on better MP performance back then, the more relevant postings being:

Subject: MP optimization
stuart wrote:Following up on Hooray's comments about automatically reducing aircraft complexity.

I did eventually get a scheme working that simply did not load anything other than the initial model for an AI aircraft. However, this wasn't ideal as a number of aircraft (notably the 747) consists of multiple models - one for the wing, another for the engine. In the end I decided it was a development dead end and didn't pursue it any further.

My current thinking is that we should populate the AI/Aircraft directory. This is supposed to be for low-poly AI versions of aircraft which are used by FG in preference to the "full fat" version of an aircraft.

If someone wanted to spend a small amount of time removing excessive textures and objects from aircraft, I'd be happy to receive patches. It should be possible to resize the textures with a script, and removing secondary models is simply a matter of going through the XML and deleting files.

-Stuart


Subject: MP optimization

ThorstenB wrote:Just correcting some points from the discussion: with FG 2.6.0 only those parts of the model are loaded, which are really rendered. This was different for earlier FG versions (<= 2.4.0), and only implemented a few months ago. So, if there is a range limitation for parts of a model, then these do reduce loading times.

Also, the range is always calculated from the current view position, so it should be working fine with dual control. Model parts should be loaded and rendered when you switch the view position to a location inside an MP aircraft (at least I'm not aware of bug reports).

Also new is a separate loading thread for AI/MP aircraft. FG 2.0/2.4.0 would load AI/MP models in the simulators main thread - which meant brief stutters. With FG 2.6 aircraft models are loaded in a background thread - which improves performance, especially if you have a multi-core CPU.

Another new feature of FG 2.6.0 is a general and configurable range limit for the display of MP aircraft. In the main menu you'll find
"View" => "Adjust LOD Ranges" => "AI/MP Aircraft". Default is configured to 10km. On less powerful machines, you could reduce the range a bit to improve performance in busy areas (sacrificing the display of more remote aircraft).

Just to clear up any confusion ;-).
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: 12260
Joined: Tue Mar 25, 2008 8:40 am

Re: Standard Aircraft Structure

Postby daveculp » Thu May 09, 2013 2:01 am

Those are some good ideas, and some good news. Maybe I should repopulate my Aircraft directory and see what kind of hit I take.

As for the AI/Aircraft directory, that never seemed like a good solution to me, as it means an author has to have access to the base package to install his AI/MP model. I prefer the model exist in a single package for ease of distribution.
User avatar
daveculp
 
Posts: 503
Joined: Sun Feb 24, 2013 1:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: Standard Aircraft Structure

Postby StuartC » Thu May 09, 2013 10:53 am

Simply include distance code in XML of parts you dont want/need to see over a certain distance.

Code: Select all
<animation>
        <type>range</type>
        <min-m>0</min-m>
        <max-m>1000</max-m>
       </animation>


Placing something like that at the start of the XML limits whats below it to being viewed at up tp 100o mt ( or what ever distance you choose ). This way you only need one aircraft that still can look like the dogs dangly bits when your up close but only basic at distances.
You can set the entire contents of the cockpit for a very short distance, payloads for a bit further etc etc. I have started adding this code to aircraft as and when I end up working on them now.
StuartC
 
Posts: 2967
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Standard Aircraft Structure

Postby daveculp » Thu May 09, 2013 3:24 pm

Unfortunately Stuart, some modelers haven't been doing that. Also, I wonder how much of the freezing is due to graphics (polygons and textures) and how much is coding support (be it XML, nasal or databases).
User avatar
daveculp
 
Posts: 503
Joined: Sun Feb 24, 2013 1:50 am
Location: Las Vegas, USA
Callsign: DCulp
Version: 2017.3.1
OS: Ubuntu 17.10

Re: Standard Aircraft Structure

Postby Hooray » Thu May 09, 2013 4:00 pm

daveculp wrote in Thu May 09, 2013 3:24 pm:Also, I wonder how much of the freezing is due to graphics (polygons and textures)

See: http://wiki.flightgear.org/Howto:Use_the_system_monitor

daveculp wrote in Thu May 09, 2013 3:24 pm:and how much is coding support (be it XML, nasal or databases).

Any mainloop/Nasal issues can be checked for using the built-in profiler: http://wiki.flightgear.org/Built-in_Profiler (simple to enable on Linux/Ubuntu)

We used that to troubleshoot the performance of the canvas system, to move certain stuff from Nasal space to C++ and optimize things there.
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: 12260
Joined: Tue Mar 25, 2008 8:40 am

Re: Standard Aircraft Structure

Postby StuartC » Thu May 09, 2013 5:32 pm

We have tested aircraft models with very high poly counts with very little frame rate hit at all. We also tested very high res textures which only appear to have a bad effect of some Mac's so far.
StuartC
 
Posts: 2967
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Standard Aircraft Structure

Postby Hooray » Thu May 09, 2013 5:36 pm

Stuart, could you please add your tips to the wiki, too ?
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: 12260
Joined: Tue Mar 25, 2008 8:40 am

Re: Standard Aircraft Structure

Postby StuartC » Thu May 09, 2013 6:21 pm

Ummm, I admit, im not a WIKI user nor a wiki fan.
StuartC
 
Posts: 2967
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Standard Aircraft Structure

Postby LesterBoffo » Fri May 10, 2013 4:49 pm

Just from monitoring my own system's lags on MP It seems it isn't 3D models that cause most of the problems as much as customized livery changes not present in your own version and nasal scripts with bugs in them. The DOS terminal usually has a record of faults and events, at least for Windoze users.
User avatar
LesterBoffo
 
Posts: 2129
Joined: Sun Oct 02, 2011 4:02 pm
Location: Oregon, USA
Callsign: LesBof
Version: 2018.3.2
OS: Win10 Pro


Return to Aircraft

Who is online

Users browsing this forum: dilbert and 1 guest

cron