On 11/03/2009 09:19 PM, Curtis Olson wrote:
> On Tue, Nov 3, 2009 at 6:58 AM, cullam Bruce-Lockhart wrote:
> 
>     Hello all. I've encountered some very strange artifacts in the
>     hi-res scenery build I'm doing of Newfoundland. I've experimented a
>     bunch, but can't find one single thing that's causing them. It just
>     seems as though scenery of a very high complexity causes them to
...
> Hi Cullam,
> 
> The way scenery files are structured is this:  (off the top of my head)
> 
> - There is a list of vertices
> - There is a list of normals
> - There is a list of texture coordinates
> 
> After this there are lists of structures that link a vertex index +
> normal index + texture coordinate index.
> 
> The problem (most likely) is that the structure size of the index is a
> 16 bit signed word.  This means once you exceed 32767 texture
> coordinates, the mapping will go all goofy on you.
> 
> I had a local mod here that switched to using "unsigned" indices which
> doubles your capacity, but in high res scenery, even this is easy to
> exceed.  I think this also required a change on the FlightGear side (but
> it was backwards compatible.)
...
> 
> So essentially you are running into a fundamental/structural limitation
> of the FlightGear binary scenery format (at least in it's current version.)
> 
> At some point we should look at increasing the texture index to a larger
> number of bits, but this will also increase the size of the all the
> scenery files, so it's not without any trade offs.  Also, when you hit
> this limit, you are pushing a lot of triangles, so it could be argued
> that from a real time rendering perspective for an "average" PC, it
> might be worth trying to simplify and consolidate structures to stay
> within this limit.  (Again, it would be better to not have this built in
> limit, but when you exceed it, you are starting to push into an area
> where your scenerey will likely bog down many of our user's computers.)
32-bit indices are slower in OpenGL than 16-bit, so it's not desirable to
switch to use longer indices everywhere, if at all. It would be
better to split the scenery up into chunks that can be addressed using 16 bits.
I haven't looked closely at this, but I think such a .btg file would be
binary compatible with older versions of FlightGear.

But while we're talking about .btg file changes, I'd love to get rid of
triangle strips and fans and generate optimized triangle elements at scenery
generation time, rather than doing it at load time...

Tim

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to