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 happen. The main one is a
> sort of stretching of the textures, that seems to actually break the
> fundamental way they are assigned. I've got a detailed description with
> screenshots of what's going on here: www.cullam.com/flightgear.htm
>
> If you've ever built some very fancy scenery, or know about how the
> architecture of texture assignment works, check it out, and I'd love to hear
> some suggestions as to what might be causing this! And I appologize for the
> terrible looking site. I literally just threw it together to ask this
> question. I'm hoping to eventually make it a useful resource for scenery
> builders.
>
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.) I was exploring this about the same time that
Martin and Ralf were diverging with their own scenery efforts and it was
part of a last minute hack job trying to complete an internal work project
at the time. So I never attempted to integrate my updates into
Martin&Ralf's source.
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.)
Best regards,
Curt.
--
Curtis Olson: http://baron.flightgear.org/~curt/
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel