On Mon, Sep 3, 2012 at 11:58 PM, Stuart Buchanan wrote:
> I've (finally) managed to get a prototype running using an instantiation
> of a shared geometry rather than a huge single object per tile.
>
> So far the results are promising.  My standard test is at KSFO with the
> c172p, waiting until the intial set of tiles is loaded with standard weather
> conditions (e.g. no excessive visibility).
>
> With random buildings switched off  FG uses ~1GB memory.  With v2.8.0
> random buildings, it's 2GB.  With instantiated buildings at present it is
> 1.5GB.
>
> At KLAX, it's down even further, from 2.7GB to 1.6GB.
>
> I've not noticed any frame-rate impact.
>
> There's still quite a lot of work to do, but I hope to have this available
> before the next release.

This work is now checked into next/master.  You'll need an updated simgear
and data to see any effect.

Basically, I've moved to using a scheme very similar to that of the trees, where
there are a small number of buildings created, and then instantiated multiple
times.

The technique relies on a vertex shader, as the final position and rotation of
the building are passed in on the gl_Color vector.  This in turn has meant that
I've been forced to create new version of various vertex shaders.  It might be
possible to clean that up by having a new parameter to existing
shaders indicating
that position/rotation information is in gl_Color, but I haven't
investigated that
option in detail.

There are three known regressions from the previous implementation:
- The reflection map appears to be broken, and is currently switched off.
I suspect this might be because the binormal or tangent are not being
calculated correctly.
- The buidings do not cast shadows in Rembrandt, though other objects _do_
cast shadows on the buildings. I don't know the reason for this.
- At high building densities and certain angles of view, one can see gaps in
the building placement where the edges of the scenery triangles go.  This is
unfortunately inevitable, as we have less sizing information during placement.

If anyone with shader/effects knowledge has the time to look at the
first two of these
problems, that would be wonderful.

Feedback/comments appreciated as always.

-Stuart

PS:  With a building density of 4 at KSFO I have 1.6GB peak occupancy.
That compares to
> 3GB previously.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to