Re: Re: Photo
"Curtis L. Olson" <[email protected]>
| Newsgroups | gmane.games.flightgear.terragear.devel |
|---|---|
| Message-ID | <[email protected]> |
mat churchill writes: > Thanks Curt, > > What is the point of the coastline data? Currently, the primary terragear approach is to combine 2D polygon areas which are assigned tiling "representative" textures and then drape all this over the height data. The coastline data is really the global land mass polygons so they represent the area of the earth covered by land. Everything else is given an area type of ocean. To make things look a little better, there is a post processing step that pulls/pushes all ocean surfaces to an elevation of zero. > Is it as if the height data is a bumpy piece of pastry, that is > roughly the right shape and the coastline data is like a pastry > cutter that makes it the right shape. I *think* I'm following your analogy. :-) Yes, that is the current approach I think, although in theory, good elevation data should generally have zero values in ocean areas. SRTM data is a bit noisy, lower res 1km data might have thickness at the coast lines as a result of the point positioning. > Like one of those Gingerbread man pastry cutters! (do you have these > in the states) Run run as fast as you can ... > Does the coastline data cut the height data. Essentially yes it does, specifically because we force all ocean vertices to an elevation of zero. > I'll give this a go (would need a bit more explanation) but what I > have noticed when placing photo scenery manually is that if a piece > of the coastline mesh sticks out into the sea further than the photo > scenery draped over it you get the effect of a sea and beach image > draped half way up a cliff. Yes, you will always run into these sorts of oddities when the terrain data isn't perfectly aligned with the image data. Even if we use 2d data to represent coast lines and rivers and lakes it is the same problem. Without perfect alignment, you get rivers running up and down hills, lakes that head up the side of a mountain, etc. etc. We try to do some post processing on water features (if we use 2d polgyon data to represent them, we know where they are.) We pull all the ocean points to zero, try to flatten lakes, and try to impose a limit on the steepness (or grade?) of rivers. This helps in many cases, but imposes some artifacts in others. Assuming we will always have imperfect data, the only way to get rid of all artifacts is to do a lot of hand tweaking, but then often you are diverging in unknown ways from reality, although given that the data is flawed (or you wouldn't need to be tweeking it) you aren't necessarily fully matched with reality anyway. > So my initial thought was to actually create custom coastline from > the image and then use this to cut the height data back (if this is > the way it is done). This would at least prevent sea appearing up > cliffs, although you would still get sand if it was included in your > coastline image. I don't know if anyone has already done this, but > you can generate vector coastline data in the gimp extremely quickly > and for a large area using the gimp and the frontline/autotrace > program (which is also a convenient gimp plugin) > > http://autotrace.sourceforge.net/frontline/ > > Autotrace will export .dxf amongst many formats A couple of clicks > in ac3d will then remove loose pieces and also can be used to reduce > vertices on curves in a couple of clicks. I have a feeling someone > is going to tell me that I still have too many vertices , in which > case I will need a slightly more elegant method of reducing vertices > to keep a good shape. I have put a screenshot of the results in ac3d > here: > > http://freespace.virgin.net/mamaloucos.circus/Flightgearweb/index.html > > I thought that if I created an initial file from the photo image > with three points with known lat long I could open the .ac,.dxf etc > file in a text editor, work out the equation needed to convert each > X Y vertex into the relavent correct lat long ( i assume no height > is needed) then create a full vector for my coastline as above and > then using the equation I've worked out process al the other > vertices into lat long format, chop it up into tile shapes and > create my own custom coastlines. > > Is this feasible ? as you can see I am still trying to guess my way > around how much of this works. This is interesting ... create the lake, river, coastline polygons from your image. Then you know they will match perfectly. However, if you are draping an image over terrain, you probably don't want to actually build those polygons into the final result, just use them for flattening/fixing the terrain elevations. That would take a bit of work, but I'm sure it is doable. Regards, Curt. -- Curtis Olson HumanFIRST Program FlightGear Project Twin Cities curt 'at' me.umn.edu curt 'at' flightgear.org Minnesota http://www.flightgear.org/~curt http://www.flightgear.org