Ampere K. Hardraade wrote:
> First, a little background: 
> http://mail.flightgear.org/pipermail/flightgear-devel/2004-June/029044.html
> 
> I vividly remember that this animation allows one to order the sequence at 
> which objects are rendered, so that parts could be made visible even if they 
> are supposed to be hidden by objects.
> 
> I was planning on using it to resolve some z-ordering issues, but the 
> following script doesn't seem to have any effect.
> 
> <animation>
>       <object-name>WINGS</object-name>
>       <object-name>NOSTEP</object-name>
> </animation>
> 
> Have I done something stupid or has this animation stopped working?
> 
> 
> 
> Thanks in advance,
> Ampere
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Flightgear-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel
> 

OK developers, please correct me if I get this wrong :)

The way the model is stored in memory, the last animation determines
what happen with an object. Here's what the sceengraph should look like
right after your animation:

|-WINGS
   |-NOSTEP

Now, the most common problem that most people have is that another,
later animation comes along and restructures the scene graph:

<animation>
 <type>range</type>
 ...
 <object-name>FOO</object-name>
 <object-name>WING</object-name>
 <object-name>BAR</object-name>
</animation>

and results in this:

|-NOSTEP
|-FOO (with range transform)
   |-WING
   |-BAR

Unfortunately, you have to consider the entire animation code with
problems like this. Also note that unless there is a <name> element to
an animation the the first object listed becomes the parent of all the
other objects. This results in any animation or transform that has been
applied to that first object affecting all of it's children.

<animation>
 <name>FRANK</name>
 <type>range</type>
 ...
 <object-name>FOO</object-name>
 <object-name>WING</object-name>
 <object-name>BAR</object-name>
</animation>

|-NOSTEP
|-FRANK (with range transform)
   |-FOO
   |-WING
   |-BAR


So remember that animations are attached to nodes in the scene graph,
like FRANK or FOO, and affect that node and all its children. A node can
either be a actual object or in the case of an animation with a <name>
an empty node containing nothing but the transform that the animation
defined and its children. Unfortunately there is currently no tool to
visualize the state of a subtree of the scene graph (for instance an
aircraft). You have to keep track of your animation code and figure out
what the state is.

It can be pretty frustrating, but that's the way the system works.
Personally, I would like to see two tools added, one a function call to
export a visual representation of a subtree as text, and two some sort
of shorthand in the XML that would allow this:

<animation>
 <type>whatever</type>
 <object-name>FOO</object-name>
</animation>

<animation>
 <type>whatever</type>
 <object-name>BAR</object-name>
</animation>

<animation>
 <type>whatever</type>
 <object-name>BANG</object-name>
</animation>

to be encoded as this:

<animation>
 <type>whatever</type>
 <some-new-element>
  <object-name>FOO</object-name>
  <object-name>BAR</object-name>
  <object-name>BANG</object-name>
 </some-new-element>
</animation>


Josh


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to