|
From: David M. <da...@me...> - 2001-07-16 11:36:16
|
Alex Perry writes: > > > That demonstrates the point I made about texturing for rock > > > types; You can do a good guess of the GC texturing by ... (1) > > > Anything within 30 degrees of the horizontal is covered with > > > forest (2) Anything between 30 degrees and 60 degress is a grey > > > scree color (3) Anything else is textured according to altitude > > > MSL with a 1D texture > > > > This sounds like a good idea. I am not an expert in this, but > > would something like that take a lot of cpu time, > > i.e. slope-determinant texturing? POV-Ray does something similar > > to that when placing a texture on a mountain or whatever. The > > effect is very good. > > I was thinking more of doing it at scenery compilation time; > i.e. taking the existing tile of scenery, keeping the triangles and > repainting them according to the above rules to see what it looks > like. In principle, I like to allow as much runtime configurability as possible, since it's much easier to experiment with changes at runtime than with changes at compile time (you don't end up pouring concrete all over your decisions). I think that the key here is the materials file. Right now, we have a 1:1 mapping between materials and textures, but it wouldn't be too hard to modify the file to specify different textures based on simple, nested constraints -- I'd recommend the following: 1. Default (if nothing else applies). 2. Bounding box (lat/lon). 3. Slope range. 4. Elevation range. 5. Date range. The math for calculating the slope of a triangle is pretty simple, and we could even pre-calculate it and save it in the scenery files if anyone thought that was a problem (I wouldn't waste time doing that at first). For the bounding box and the elevation, we can arbitrarily apply it to only one of the triangle's points. I think that I can do this in a week or two, though Curt might wake up in the morning to find $FG_ROOT/materials changed to $FG_ROOT/materials.xml if he's foolish enough to let me go ahead. Some clever bucketing at material load time should make this efficient even with a large number of alternatives. My first implementation will leave obvious boundaries, but it will still be an improvement over 70degree mountain slopes covered in thick forest. All the best, David -- David Megginson da...@me... |