Re: Re: Terragear-devel Digest, Vol 9, Issue 1

Jon Stockill <[email protected]>
Newsgroups gmane.games.flightgear.terragear.devel
Message-ID <Pine.LNX.4.58.0401061728230.863@architect.internal.stockill.org.uk>
On Tue, 6 Jan 2004, mat churchill wrote:

> Using Gimp i created an all black scenery tile with a white single pixel
> width border along the top and left hand edge only . I copied it to
> drycrop.rgb in the data/Textures/Terrain folder - drycrop being the
> predominant terrain in Cornwall.

*snip snip*

> Although it took a while to get to the point where I had the overlaid
> semi-transparent grid in Gimp, once I had it set up it was quick to do
> the same operation for a different tile in the grid or to slighty move
> the grid over the photo scenery to get it to line up correctly.

Ouch - I see what you mean about the time it takes!

> I'm going to try to follow what David Luffs mentioned just before
> christmas and here:
>
> http://www.mail-archive.com/[email protected]/msg18457.html
>
> My current questions are very basic apologies in advance.
>
>
> "As you say, defining a polygon with a custom name, and then defining
> the texture for that name to be the photo, works just fine."  How does
> this work?

Well, I fed this to tguserdef:

<?xml version="1.0"?>
<PropertyList>

 <polygon>
  <name>Wakefield Aerial</name>
  <material>Freeway</material>
  <contour>
   <hole>false</hole>
   <v>
    -1.54734 53.67561
    -1.39597 53.67494
    -1.39468 53.76482
    -1.54637 53.76549
   </v>
  </contour>
 </polygon>

</PropertyList>

I discovered that you can't use any old material (Ideally you'd want to
specify something unique in there, and add an entry to the materials.xml
file to match) so I just used Freeway as a placeholder.

> "If you give your polygons the extension .osgb36" - which polygons are
> these ?

I *think* this is the polygon files in the tree beneath the work
directory.

So in $work/User/w010n50/w002n53/ tguserdef created:

2925545.74106  2925546.74106  2925553.74106  2925554.74106

the filenames are tile.poly_id

I'm guessing that if the coordinates in there were specified in OSGB
coordinates then they would be tile.poly_id.osgb36

The problem is that when something spans multiple tiles it's not exactly
trivial to work out all the intersection points - tguserdef will do this
for you.

> "--useUKgrid at the construct stage". What stage of construction is this
> ?

normally you'd use a combination of fgfs-tools-client and
fgfs-tools-server to produce the scenery. fgfs-tools-client just makes
repeated calls to fgfs-construct, which does have the option of working
with OSGB aligned tiles.

> "I then chopped the images up along osgb36 grid lines". How? was this
> done using Image::Imlib2 perl library.

The getmapping data appears to be already OSGB aligned - which is why you
need to work to an OSGB grid internally - it avoids discontinuity in the
processed scenery.

> If anyone answers these questions could they include some example
> commands, this helps me a lot.  I'm happily building UK landmass by
> combining Gshhs coastline with srt-3 height data, so am not a 100%
> beginner.  but my learning curve has been rapidly accelerated by seeing
> the commands others have used. Been having a lot of fun in the process
> by the way !

I'm still busy with the RAF airfields - currently doing St Mawgan, so not
*too* far from finishing them. Once they're done I'll ship them all off to
Robin Peel for inclusion in the database.

-- 
Jon Stockill
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.