Howto:Animate models: Difference between revisions

Jump to navigation Jump to search
→‎Range: describe LOD ranges in table
m (→‎Alpha-test: wiki-link fix)
(→‎Range: describe LOD ranges in table)
Line 440: Line 440:
To prevent objects -like instruments- being drawn when the aircraft is actually too far away for them to be seen anyway, a range animation is used.  
To prevent objects -like instruments- being drawn when the aircraft is actually too far away for them to be seen anyway, a range animation is used.  


<source>
<syntaxhighlight lang="xml">
  <animation>
  <animation>
   <type>range</type>
   <type>range</type>
Line 446: Line 446:
   <max-m>30</max-m>
   <max-m>30</max-m>
  </animation>
  </animation>
</source>
</syntaxhighlight>


* '''min-m:''' the shortest distance (in meters) from the object center at which it is visible.
* '''min-m:''' the shortest distance (in meters) from the object center at which it is visible.
Line 452: Line 452:


You could also use the generic level of detail (LOD) properties, which can be set by the user through View > Adjust LOD rangers:  
You could also use the generic level of detail (LOD) properties, which can be set by the user through View > Adjust LOD rangers:  
* <tt>/sim/rendering/static-lod/bare</tt> distance at which only a rough exterior model is required.
{| class="wikitable"
* <tt>/sim/rendering/static-lod/rough</tt> distance at which most should be visible.
! Property
* <tt>/sim/rendering/static-lod/detailed</tt> distance at which all details should be visible.
! Description
! Default value
|-
|<tt>/sim/rendering/static-lod/bare</tt>
| only a rough exterior model
| 30,000 m
|-
|<tt>/sim/rendering/static-lod/rough</tt>  
| most should be visible
| 9,000 m
|-
|<tt>/sim/rendering/static-lod/detailed</tt>  
| all details should be visible
| 1,500 m
|}


The animation code will look like this:
The animation code will look like this:
<source>
<syntaxhighlight lang="xml">
  <animation>
  <animation>
   <type>range</type>
   <type>range</type>
Line 463: Line 477:
   <max-property>sim/rendering/static-lod/bare</max-property>
   <max-property>sim/rendering/static-lod/bare</max-property>
  </animation>
  </animation>
</source>
</syntaxhighlight>


You can have both ranges (max and min) bound to a property, or just one of them.
You can have both ranges (max and min) bound to a property, or just one of them.

Navigation menu