Board index FlightGear Development

Can FG computations be made more balanced?

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Re: Can FG computations be made more balanced?

Postby chris_blues » Fri Apr 19, 2013 11:47 am

Ok, here we go!
I decide to have a little fun too, and was goofing around the bay, through the valleys and airports at about 1000knots. It very much shows, how imprecise the replay is... :roll:

Code: Select all
./run_fgfs.sh --aircraft=UFO --fg-root=/home/chris_blues/git/install/fgfs/fgdata --enable-fullscreen --prop:/sim/rendering/multithreading-mode=AutomaticSelection

Image

Here's what the profiler put out:
http://musicchris.de/public/fgfs.profile

...and finally the flightrecorder tape:
http://musicchris.de/public/UFO-20130419-133102.fgtape
...no cockpit voice recorder tapes were found ;)
Don't hesitate to let me know if I'm incorrect or just annoying! As long as you do it gently! :)
Debian testing 64bit - Athlon II 2x2.6GHz - 8GB RAM - GeForce GTS 450
Citation II
User avatar
chris_blues
 
Posts: 1539
Joined: Mon May 03, 2010 1:30 pm
Location: claws of real life
Callsign: chris_blues
Version: GIT
OS: Debian 8 64

Re: Can FG computations be made more balanced?

Postby Bomber » Sat Apr 20, 2013 11:46 am

Thorsten wrote in Fri Apr 19, 2013 6:40 am:
But you see, the only thing that I can identify as affecting my framerate is the vertex pipeline. Currently, with the rest I can pretty much do what I like. The Concorde with it's gazillions of systems runs as fast as a glider. The high-fideltity (or at least quite complex FDM) T4T Spitfire runs as fast as any other plane. Switching background Nasal on and off makes no bloody difference for anything. Only what enters the vertex pipeline does. Or lots and lots of semi-transparent stacks in the fragment pipeline - they can eventually kill as well.


You know I'm gonna take that as a compliment... at least he's flown it. ;)

And I agree with Thorsten that it's the vertex issues that cause the problems... also has been for every flight sim that's attempted to do clouds...

But I also remember back when vertex issues were also a problem with planes, when performance was tight and 3D optimising was a real must. Right now I'm told that the number of polys used on a plane aren't an issue. On a 3d model a modeller ensures that the vertex's are welded, so reducing the overall number of vertex's. So the question is when it comes to clouds are these vertex's welded ? If not can it be so, if it is so then it has to be the shear number of vertex's displayed and then you're down to an LOD system to reduce this.

Simon
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1934
Joined: Fri Dec 14, 2007 7:06 pm
OS: Windows XP and 10

Postby Hooray » Sat Apr 20, 2013 12:46 pm

Bomber what are your system specs ? Am I right in thinking that you also have a fairly high-end system ?

Just asking because we obviously do have many people here who do not even run any fancy rendering schemes like Rembrandt/ALS or Advanced Weather, and still get to see bad performance under certain circumstances. Thus, it'd be interesting if your system is also similarly powerful as Thorsten's or chris_blues' ?

Could any of you try to replicate Chris' flight using the file and settings that he posted ?
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: 11375
Joined: Tue Mar 25, 2008 8:40 am

Re: Can FG computations be made more balanced?

Postby Thorsten » Sat Apr 20, 2013 1:30 pm

So the question is when it comes to clouds are these vertex's welded ?


Clouds are just stacks of lots of quads. Since they use semi-transparent textures, their fragment shader needs to be as simple as possible since you end up running it hundreds of times per pixel, as they're drawn outside-in without z-buffering. So all the work goes into the vertex shader.

A quad is a quad, and pretty much the only thing you can do to reduce the vertex count in a meaningful way is to drop faraway quads and only render those nearby in high detail. Stuart implemented some trick that is able to do that. It has... side effects (it mutilates very thin clouds which are thin stacks to begin with).
Thorsten
 
Posts: 11191
Joined: Mon Nov 02, 2009 8:33 am

Re: Can FG computations be made more balanced?

Postby Bomber » Sun Apr 21, 2013 3:47 pm

I have an asus i5 laptop with nvidia graphics card.... its a year old, I don't think it's anything real special...
"If anyone ever tells you anything about an aeroplane which is so bloody complicated you can't understand it, take it from me - it's all balls" - R J Mitchel
Bomber
 
Posts: 1934
Joined: Fri Dec 14, 2007 7:06 pm
OS: Windows XP and 10

Re: Can FG computations be made more balanced?

Postby Buckaroo » Sun Apr 21, 2013 6:56 pm

If the number of polygons were not an issue, then "welding" vertices would have little consequence, as polygons are constructed of vertices. For aircraft models, most vertices are welded anyway, otherwise you'd likely get discontinuities in the shading of the model. It's not about welding-- it's about how much is in the scene as a whole, and what is being done to render all elements of the scene.

A contemporary graphic card is heavily optimized to render discrete, single-material objects fast, even when the object's data size is large. But if you throw enough objects at it, things will slow down, even if you're running the latest hot gaming rig. And with all those objects thrown at it, it pays to reduce the vertex/polygon count of any given model to what is necessary to visually represent the model, because all those calculations for each vertex consume resources that could be spent doing something else. This is especially true when an object's material uses transparency, as Thorsten describes.

A study of professional models done for professional sims and games reveals that the model's 3D mesh is often surprisingly simple. They use many tricks to reduce level of detail based on viewing distance. For the model, the detail effort and the majority of the art goes into the materials applied to the models. Good texture work dominates the model visually and obscures much of the model's actual simplicity while ensuring that the model has a chance of playing nicely with other objects in the scene on a typical user's rig.

Often modelers consider only their model under the optimized conditions of their particular platform rather than the scene as a whole: your aircraft, the aircraft of other MP pilots, AI aircraft, ground scenery models, cloud models, terrain, etc., etc. Designing with the scene in mind is fundamental to game design, and applies to simulators just as well.

-Buck, who has ranted on this more than once. ;)
Callsign: Buckaro(o)
Author: Lockheed 1049H Constellation, Grumman Goose, MD-81, Edgley Optica, Velocity XL RG, YASim Guide
User avatar
Buckaroo
 
Posts: 475
Joined: Fri Jan 18, 2008 6:45 am
Location: Bloomington IN USA
Callsign: Buckaro(o)
Version: 2.10
OS: Windows & Linux

Previous

Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest