"Curtis L. Olson" <[EMAIL PROTECTED]> said: > Are you sure you actually disabled the lift vector? At about line > #915 in tileentry.cxx you should find: > > sgAddVec3( lt_trans, lift_vec ); > > Comment out that single line and see if you still see a jumping when > crossing a tile boundary.
Yes and no :-) Been plugging in values and testing with unexpected results (recompiling alot) and probably forgot to do a make that time (sigh). Anyway, here's a patch that seems to improve things quite a bit at 16bpp. Also, the shift at tile boundry is gone. Note that I have only checked about 4 airports with this patch so let me know how it works for you. The diff patch is below. The full file is at: http://www.spiderbark.com/fgfs/tileentry-rwylightspatch.tar.gz Best, Jim Index: src/Scenery/tileentry.cxx =================================================================== RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Scenery/tileentry.cxx,v retrieving revision 1.10 diff -u -r1.10 tileentry.cxx --- src/Scenery/tileentry.cxx 29 Oct 2002 19:44:04 -0000 1.10 +++ src/Scenery/tileentry.cxx 30 Oct 2002 20:45:34 -0000 @@ -892,7 +892,8 @@ agl = globals->get_current_view()->getAltitudeASL_ft() * SG_FEET_TO_METER - globals->get_scenery()->get_cur_elev() - 30.0; - if ( agl < 30.0 ) { + // make sure we're at or above 0 so we don't burry the lights + if ( agl < 0 ) { agl = 0.0; } @@ -901,18 +902,31 @@ // is what we want to calculate the distance of sgVec3 to; sgCopyVec3( to, sgTrans ); - double dist = sgLengthVec3( to ); - if ( general.get_glDepthBits() > 16 ) { - sgScaleVec3( lift_vec, 0.0 + agl / 500.0 + dist / 10000 ); - } else { - sgScaleVec3( lift_vec, 1.0 + agl / 20.0 + dist / 5000 ); + // we fudge the distance (dist) by 15000 meters to that the distance + // component of the lifting function doesn't phase in unless the airport is + // more than 15000m from the scenery center + double dist = 0; + dist = sgLengthVec3( to ) - 15000; + // make sure we're at or above zero + if (dist < 0) { + dist = 0.0; } - sgVec3 lt_trans; - sgCopyVec3( lt_trans, sgTrans ); + sgVec3 lt_trans; + sgCopyVec3( lt_trans, sgTrans ); - sgAddVec3( lt_trans, lift_vec ); + // skip this step if both the distance and agl are > 1 + // see above where the values are fudged down to allow correct display + // when aircraft is "at" the airport. + if (dist > 1 || agl > 1) { + if ( general.get_glDepthBits() > 16 ) { + sgScaleVec3( lift_vec, 0.0 + agl / 500.0 + dist / 10000 ); + } else { + sgScaleVec3( lift_vec, 1.0 + agl / 20.0 + dist / 5000 ); + } + sgAddVec3( lt_trans, lift_vec ); + } rwy_lights_transform->setTransform( lt_trans ); // select which set of lights based on sun angle _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel