2011/12/15 Stuart Buchanan wrote:
> I made the changes you suggested last night so that there is a single
> geometry per cloud instead of one per sprite. That should have reduced
> the number of draws by a factor of 10.
>
> The code isn't ready to be checked in (I've still got to sort the geometry),
> but so far it hasn't made a significant difference to
> the frame-rate on my system. However, I've got a fairly big graphics
> card and get fairly high frame-rates, so it may help more for other people.
>
> It certainly doesn't make things any worse, and the code changes are
> smaller than I had feared, so I expect to get this change checked in for
> 2.6.0.

I've committed the code changes to my repository clones for the impostors,
some configuration for LoD nodes, and having a geometry per cloud, with
a bubble sort for ordering.

It would be fantastic if people could take the time to cherry-pick these commits
and see if it makes any performance difference for them. I anticipate
the biggest
difference being to 3D clouds generated by Global Weather, as those clouds tend
to have more sprites than the Local Weather equivalents.

The relevant commits are:
https://gitorious.org/~stuartb/fg/stuartbs-simgear3/commit/f1df069643d711d3c0663997f385d4f2d034f71b
https://gitorious.org/~stuartb/fg/stuartbs-flightgear/commit/24dd0ee0592aaf1fd33a37c058795a986de1406c
https://gitorious.org/~stuartb/fg/stuartbs-fgdata/commit/7a6c1e6efdf33933b52995a1f0691f1fa4f210eb

There are a couple of relevant controls:
/sim/rendering/clouds3d-use-impostors - whether to use impostors or
not. Defaults to true. If you change
this you'll need to re-generate the 3D clouds by toggling
/sim/rendering/clouds3d-enable.

/sim/rendering/clouds3d-impostor-range - range at which impostors are used.
/sim/rendering/clouds3d-lod1-range - size of the top level LoD node
/sim/rendering/clouds3d-lod2-range - size of the second level LoD node.

The latter 3 controls should take effect immediately, so you can see
the impact of increasing/decreasing
the point at which impostors are used.

As I said previously, I'm not seeing massive changes in frame-rates
with these changes. On my
system, running the c172p from KLVK I get 30 fps with 2D clouds and
28-29fps with 3D clouds. However,
the draw time presented by the on-screen OSG statistics appears to have dropped.

Comments are welcome as always.

-Stuart

------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to