Re: [Flightgear-devel] How to apply different texturing to, the terrain mesh? (addressing especially Tim Moore)

2007-07-06 Thread Ralf Gerlich
Hello Sebastian!

Sebastian Bechtold wrote:
 Tim Moore wrote:
 So, I don't mean to be discouraging because I think this is ultimately
 the right approach in terms of bumping up terrain detail and
 implementing terrain and texture LOD, but you have a lot of hacking
 ahead of you.
 
 Then it should be so. I'd really like to help making FlightGear better,
 and of course I want to improve the things which, in my option, need it 
 most.

Great to hear that you're so motivated. I hope it stays that way once
you have started! ;-)

 I have to admit that at the moment, I have not the slightest idea about any
 coordinates and stuff, but I'm willed to learn :).

Although I'm a bit skeptical about whether I like the concept at all or
not, there's no better way of finding out than trying. ;-)

I can assure you that I will provide support to you with everything I
learned about scenery design, file formats and coordinate systems in the
FlightGear world. I will not be able to assist you much in coding, and
specifically not in the area of 3D programming, but I will try to do my
very best to help you being successful in the areas I can help with.

Sebastian Bechtold wrote:
 The plan would be to include the raw (meaning not 
 compiled/digested
 into the .btg files) vector data into a scenery file and auto-generate
 the textures using this data.

The .btg-file-format is not well extensible (and probably will not be
needed anymore anyway with your approach), so I wouldn't integrate this
data into the btg or stg files. You don't seem to be thinking about
something like that anyway, so this is merely a note from my side.

Cheers,
Ralf

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] How to apply different texturing to, the terrain mesh? (addressing especially Tim Moore)

2007-07-06 Thread Ralf Gerlich
Hi once more!

Ralf Gerlich wrote:
 I can assure you that I will provide support to you with everything I
 learned about scenery design, file formats and coordinate systems in the
 FlightGear world. I will not be able to assist you much in coding, and
 specifically not in the area of 3D programming, but I will try to do my
 very best to help you being successful in the areas I can help with.

So why not start right now? (forgive me if you already know a lot of the
following).

So what we have in the database is a logical setup of the terrain data
in terms of polygons describing aerial features (forest, town, cities,
etc.) in terms of polylines describing linear features (roads,
railroads, small streams, etc.)

Logical setup means that the data is not yet directly associated with
a texture or in case of linear features also with a width, but this is
typically done when extracting the data from the database and converting
it to a TerraGear-friendly format in the TerraGear working directory. So
the actual association of type of landcover and a texture is established
by the script that does the conversion.

Instead of converting the data to a TerraGear working directory it would
be possible to convert it to a file format useable by your scenery
engine, in which the polygons and lines would be associated with a
display type defining texture and markings, and in case of the lines
also with a width.

The positions in the database are in WGS84 format, i.e. in geodesic
coordinates according to the WGS84 ellipsoid approximation of the
earth's surface.

You can use the functions in simgear/math/SGGeodesy.hxx to convert these
to cartesian coordinates. These functions are, however, a bit
computationally expensive - at least when used hundreds or thousands of
times per frame - so a pre-calculation of the actual cartesian
coordinates used for display would be a good idea.

The cartesian coordinates are used to actually model the earth as a
round shape instead of a flat shape in display space, which makes things
a lot easier (latitude-longitude wrap-around) and also more realistic
(ever seen the curvature of the earth from high above?)

The other data you will probably need is the elevation data. Most of the
elevation data we have is from SRTM, the Shuttle Radar Topography
Mission. The data consists of raster files in different formats, a
non-standard format named HGT and as GeoTIFF. We can of course make
this available in a suitable raw binary format.

As I have some experience in working with all that data and the formats,
I could write the conversion tools. We'd just have to agree on a format
for the files.

Cheers,
Ralf

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] How to apply different texturing to, the terrain mesh? (addressing especially Tim Moore)

2007-07-05 Thread Sebastian Bechtold
Tim Moore wrote:
 This is going to be messy; you're going to have to dive into the code of
 FlightGear, SimGear, and probably TerraGear too.

 The terrain mesh created by TerraGear has texture coordinates that are
 appropriate for the surface texture in each triangle. You're either
 going to have to generate alternate meshes -- with a more uniform
 texture coordinate scheme -- from TerraGear, or you're going to need to
 use OpenGL TexGen stuff to generate the appropriate texture coordinates
 at runtime. Remember that all the geometry is in earth-centric
 coordinates  :) 

 So, I don't mean to be discouraging because I think this is ultimately
 the right approach in terms of bumping up terrain detail and
 implementing terrain and texture LOD, but you have a lot of hacking
 ahead of you.

Then it should be so. I'd really like to help making FlightGear better,
and of course I want to improve the things which, in my option, need it 
most.
Since this one is quite high on my list of ideas for improvements, and 
nobody
else seems to work on it, I want to do it. Or at least try it. I believe 
you when
you say that it is going to be complicated, but wouldn't it be boring if 
it wasn't ?
I have to admit that at the moment, I have not the slightest idea about any
coordinates and stuff, but I'm willed to learn :).

(And well, maybe I shouldn't present myself as being so helpless 
with this. Ok,
I'm completely new to the FlightGear source code and also to 3D programming,
but I think I'm at least not the asolutely worst programmer in the 
world, I found that
I can read and understand the FlightGear code a lot faster than I 
expected before,
and I know how to use a few development tools to untangle it and get a 
picture of how
everything works together. Again, I think this should be possible with 
some help from others.)

Cheers,

Sebastian

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel