Thanks, Josh
<!-- ** LOD ** -->
<animation> <type>range</type> <min-m>0</min-m> <max-m>50</max-m> <object-name>cabindetail</object-name> </animation>
<animation> <type>range</type> <min-m>50</min-m> <max-m>2000</max-m> <object-name>coarsenorden</object-name> </animation>
<animation> <type>range</type> <min-m>0</min-m> <max-m>2000</max-m>
<object-name>lnavlt</object-name> <object-name>rnavlt</object-name> <object-name>topgunner</object-name> <object-name>leftgunner</object-name> <object-name>rightgunner</object-name> <object-name>astrodome</object-name> </animation>
<animation> <type>range</type> <min-m>2000</min-m> <max-m>10000</max-m> <object-name>opaque-canopy</object-name> <object-name>opaque-lwindow</object-name> <object-name>opaque-rwindow</object-name> <object-name>opaque-tailwindow</object-name> </animation>
<animation> <type>select</type> <object-name>ngearassy</object-name> <object-name>lgearassy</object-name> <object-name>rgearassy</object-name> <object-name>tailskid</object-name> <condition> <greater-than> <property>gear/gear[0]/position-norm</property> <value>0</value> </greater-than> </condition> </animation>
<animation> <type>select</type> <object-name>bombassy</object-name> <condition> <greater-than> <property>systems/weapons/bomb-door-pos</property> <value>0</value> </greater-than> </condition> </animation>
Frederic Bouvier wrote:
Josh Babcock wrote:
This is the one I am having trouble with right now:
<animation> <type>range</type> <min-m>0</min-m> <max-m>2000</max-m>
<object-name>lnavlt</object-name> <object-name>rnavlt</object-name> <object-name>topgunner</object-name> <object-name>leftgunner</object-name> <object-name>rightgunner</object-name> <object-name>astrodome</object-name> </animation>
This stuff just doesn't appear when I put this in the modedl.xml file. The external view is set to 100m.
<chase-distance-m type="double" archive="y">-100.0</chase-distance-m>
I can't figure out why this stuff isn't appearing at close range. There are other problems, but I'm trying to isolate stuff and deal with them one by one.
There is also a point that must not be forgotten : when an object is specified in 2 different range animation, the result is an AND
not a OR. I mean that is you have :
<range> <min-m>0</min-m> <max-m>2000</max-m> <object-name>something</object-name> </range>
<range> <min-m>2000</min-m> <max-m>10000</max-m> <object-name>something</object-name> </range>
you won't see 'something' from 0 to 10000 because the first cull it for the range 2000-10000 and the second cull it for the range 0-2000.
I don't know if it is the case but your individual animation seems good.
-Fred
Frederic Bouvier wrote:
Josh Babcock wrote:
I'm having problems with the LOD animations in a model I'm working on.
I am wondering if the value that is queried in the range type of
animation is exposed anywhere. I have looked, but can't find it in the
property tree. I am also unsure of where to find references to this in
the code. Can anyone out there answer either of these questions?
The value used to compute the range is the distance between the viewer and the center of the model ( its relative ( 0,0,0 ) position ). It is not exposed in the property tree because it is computed every frame by plib itself. But you can setup your animation to read the min and max values in properties. Look in the XML files of the buildings in the scenery folder. Almost everyone as such an animation.
You can find the code in SimGear / simgear / scene / model / animation.[ch]xx
If you can expose what are exacly your problems, perhaps we can help you more.
-Fred
_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
_______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
