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

"David Luff" <[email protected]>
Newsgroups gmane.games.flightgear.terragear.devel
Message-ID <[email protected]>
On 1/6/04 at 5:46 PM Jon Stockill wrote:

>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!
>

Heh, heh, that's exactly the approach I started with a few years ago :-)

>> 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?
>

I should have included "As long as the texture coordinates line up, since
the photo textures are non-repeating.", and I couldn't remember if any old
material name was acceptable or not - it seems not from the below.

>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.
>

Ugh, I'd forgotten that problem :-(.  Not sure of the best way round that,
I'll have a think.  I could quite easily turn the osgb36 equations into a
commandline utility for converting OS -> WGS84, which would then be easier
to chop to tiles.

>> "--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.
>

I use the ImageMagick library for both chopping and concatenating as
required.  Most orthophotography tends to come aligned with the grid it is
projected onto.

Ultimately, I only tested this stuff (a couple of years ago) with a few
separate photos and other polygons, probably using the existing texture
names.  You two are finding all the holes in it!!  I'm hoping to find some
time to start working it seriously again, since there seems to be a
groundswell of opinion that the ability to use photographic textures would
be desirable, and I'd certainly like to be able to.

Cheers - Dave
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.