I've just checked in changes to add a billboard animation to
FlightGear 3D models. The billboard animation causes an object (or
entire model) to rotate towards the camera about its z-axis and,
optionally, its x-axis as well. Here's the XML wrapper for a sample
billboarded tree (only 4 vertices) in
$FG_ROOT/Models/Trees/billboard-tree.xml:
<PropertyList>
<path>billboard-tree.ac</path>
<animation>
<type>billboard</type>
<spherical>false</spherical>
</animation>
</PropertyList>
The 'spherical' property is false (the default) for objects with only
cylindrical symmetry, like trees, and true for objects with spherical
symmetry, like simplistic clouds.
Feel free to play with the sample tree and to compare it to the
non-billboarded tree. I don't know which approach would be better for
an entire forest:
1. The non-billboarded tree has 18 vertices (or so), but doesn't
require any special dynamic transformation.
2. The billboarded tree has only 4 vertices, but requires a
transformation based on the view matrix.
Norm: which do you think would be more efficient for a forest of, say,
500 trees?
All the best,
David
--
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel