Harald JOHNSEN schrieb: > Sebastian Bechtold wrote: > > >>> Your thread title is misleading, >>> >>> >>> >> Sorry, but I don't think so. The title describes my intentions pretty well. >> >> >> >> >>> what you really want to do is to add >>> layers, so to add some geometry drapped around the terrain. >>> >>> >>> >> No, I don't I want to do that. I want to do what I've been >> talking about in my posting. >> >> >> Best regards, >> >> Sebastian >> >> >> >> > Ok, I was reading a bit fast and saw rounded curve and you'll never get > that with textures. > The texture mapping we are using today is done with the function in > simgear/texcoord.cxx. > I supposed you've read the explanation of how it's done in msfs on the > fsinsider site, the problem I see here is that we do not have a regular > mesh grid so we will have the boundary triangles that will span on > several textures. In msfs they have a regular grid (it's just a height > map) so the mapping is direct. > Yes, that's true. This might really be something that makes the implementation a bit more complicated. Currently, I have two ideas to solve this problem:
1.) Apply the textures on tile-level. The tiles have a regular rectangular shape, so you could map one texture on one tile, without any overlapping. A problem with this could be the dimensions. You'd need quite large textures to get an acceptable low value of square-meters per pixel. I don't yet know enough about 3D programming to judge if this is feasible or not (hardware-limited maximum texture size, OSG / FlightGear performance with handling such huge textures and so on), but at least we could try it. 2.) Use smaller textures (for example 2x2 or 4x4 per tile) and draw overlapping redundant borders to their neighbor textures. Mhh...I have problems to write a good explaination of this in english...I mean...near the borders of each texture (for example a 100 Pixel wide "frame"), you draw exactly the same pixels as you draw on the corresponding "frame" of the neighbor texture in each direction. You would then apply the textures so that they "overlap" and decide with triangle in the "border area" is filled with which one of four adjacent textures. When the "frames" are wide enough to cover every irregular shape that could occur, it should be possible to handle the problem this way. A clear disadvantage of this approach is, of course, the additional graphics memory requirement, and it's perhaps a bit harder to implement. I don't know what's better or if there are other, better ways to solve this. Feel free to help finding a solution! :) 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