Jump to content
Sign in to follow this  
FrankFasi

Animation - Using "Ambient" tag..

Recommended Posts

Hi. I'm working on a plane in FSDS v3.5. I read about using the animation tags "Ambient" and "NonRandomAmbient" to animate pilots and/or passengers. I successfully got one of each to work last night (works quite well). FSDS lists many more (Ambient2, Ambient3, Ambient4, etc) but if I try adding an additional "ambient" animation, to a different passenger, NONE of the ambient or nonrandomambient animations works at all when I go to test it. If I remove the newest animation and test again, everything works. It's as if I'm being limited to one usage of each tag, despite the fact that I can choose from many more unique names (Ambient2, Ambient3, etc.) in my "standard parts names" dialog box.Is there some parameter in some well-hidden configuration file that needs to be tweaked in order to get ALL of available tags working at the same time?Thanks. Here's a screenshot of the plane I'm working on:sm74.jpg

Share this post


Link to post
Share on other sites

It is one of the many peculiarities of FSDS. While I know of the problem, I don't use FSDS myself so don't recall the details of the "fix" other than it requires making a unique entries in the parts.data.def file, IIRC.I'd suggest browsing the forums at both Freeflight Design and FS-Developer to ask from other FSDS users.http://www.fsdeveloper.com/forum/index.phphttp://www.aerodynamika.com/cgi-bin/yabb2/YaBB.pl


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

No problem. BTW, I meant to add that your's is a really interesting and nicely done model!


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Just use the same ambient again. It will get the part name "ambient.1" but it will work. You will then have a part "ambient" and "ambient.1" I'm not sure of the limit but I've had up to 18 parts using the same name. Make sure the number of keyframes is the same as your first "ambient" part though as this is set be the first use of "ambient". The number of keyframes will always be dependent on the base part (ie "ambient") and you can't use more than 1024 keyframes.You could always create a completely new animation that just has a counter that is incremented until it gets to the number of keyframes you want and then restart it at zero. These are never as smooth as the ambient animation though (for some strange reason).Bill, how do you guys use a different ambient animation? FSDS just takes the part names from the modeldef.xml anyway which is the same as I would have thought Max does.


www.antsairplanes.com

Share this post


Link to post
Share on other sites
Bill, how do you guys use a different ambient animation? FSDS just takes the part names from the modeldef.xml anyway which is the same as I would have thought Max does.
Animation Tool associates a selected entry from modeldef.xml to a uniquely named object. The precise name of the object is irrelevant, the only requirement being that it is a unique name.There are six different Ambient entries from which to choose, all of which are "Random," meaning that if you have six windmills for example, and tag each of them with different Ambient, Ambient2, Ambient3, etc. they will NOT be synchronized, as their starting times will be randomly set.There are also six different NonRandomAmbient entries from which to choose, although in this case that seems a bit pointless since six objects using each of the tags will alway be synchronized! :Hypnotized:I've never quite figured out why Louis adopted the "dot number" method for making partnames unique, since at the end they are all converted to "underscore number" in order to be acceptable to the MS SDK compiler anyway!IOW, part.1 becomes part_01 before being sent to the compiler! Why not simply use part_01 to begin with... :Thinking:Oh well, that's part of the "fun" I guess, and it's certainly not as though Max/GMax users don't have their own -albeit different- hoops to jump through! :LMAO:In any case, if we need to have the same animation tag on multiple objects, such as lever_throttle0 all that's required is that the objects have unique names, such as:lever_01lever_02lever_knobetc.What does make the job easier for Max/GMax users is that we can select all objects that require lever_throttle0 at one time, and apply the animation tag using the Animation Tool simultaneously! :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Thought I'd have another look at this so I made a couple of animations, one with ambient and one with ambient2, this is what the xanim exported from FSDS looks like:

 <?xml version="1.0" encoding="ISO-8859-1" ?><AnimLib version="9.1"><Anim name="Ambient" guid="A6F1C5D0-BEF6-449e-BAF8-FB777F27808F" length="100.000000" type="Standard" typeParam="AutoPlay,Random" typeParam2=""> <AnimStream name="Rotation" id="0" partName="Ambient" length="100.000000">  <Keyframe time="0.000000" type="Quaternion" data="0.000000;0.000000;0.000000;1.000000"/>  <Keyframe time="100.000000" type="Quaternion" data="0.000000;0.000000;0.438371;0.898794"/> </AnimStream></Anim> // End anim block<Anim name="Ambient" guid="A6F1C5D0-BEF6-449e-BAF8-FB777F27808F" length="200.000000" type="Standard" typeParam="AutoPlay,Random" typeParam2=""> <AnimStream name="Rotation" id="0" partName="Ambient2" length="200.000000">  <Keyframe time="0.000000" type="Quaternion" data="0.000000;0.000000;0.000000;1.000000"/>  <Keyframe time="100.000000" type="Quaternion" data="0.000000;0.000000;0.438371;0.898794"/>  <Keyframe time="200.000000" type="Quaternion" data="0.000000;0.000000;0.896873;0.442289"/> </AnimStream></Anim> // End anim block</AnimLib>  

As you can see the GUID is the same and anim name is still "ambient" so it doesn't work. For some reason (probably because of the similarity of the names ambient and ambient2) FSDS isn't generating the xanim properly.Here is the code where I change the anim name and guid and compiling this model works.

<?xml version="1.0" encoding="ISO-8859-1" ?><AnimLib version="9.1"><Anim name="Ambient" guid="A6F1C5D0-BEF6-449e-BAF8-FB777F27808F" length="100.000000" type="Standard" typeParam="AutoPlay,Random" typeParam2=""> <AnimStream name="Rotation" id="0" partName="Ambient" length="100.000000">  <Keyframe time="0.000000" type="Quaternion" data="0.000000;0.000000;0.000000;1.000000"/>  <Keyframe time="100.000000" type="Quaternion" data="0.000000;0.000000;0.438371;0.898794"/> </AnimStream></Anim> // End anim block<Anim name="Ambient2" guid="F4EBA503-63CD-4cfc-B1B1-FA75581B7088" length="200.000000" type="Standard" typeParam="AutoPlay,Random" typeParam2=""> <AnimStream name="Rotation" id="0" partName="Ambient2" length="200.000000">  <Keyframe time="0.000000" type="Quaternion" data="0.000000;0.000000;0.000000;1.000000"/>  <Keyframe time="100.000000" type="Quaternion" data="0.000000;0.000000;0.438371;0.898794"/>  <Keyframe time="200.000000" type="Quaternion" data="0.000000;0.000000;0.896873;0.442289"/> </AnimStream></Anim> // End anim block</AnimLib>

Editing xanims isn't fun so what you can do is this:Look in the modeldef.xml and change this:<Animation name="Ambient2" guid="F4EBA503-63CD-4cfc-B1B1-FA75581B7088" type="Standard" typeParam="AutoPlay,Random" />to something like this:<Animation name="Passenger" guid="F4EBA503-63CD-4cfc-B1B1-FA75581B7088" type="Standard" typeParam="AutoPlay,Random" /> or you could create a new line with some other animation name and a new unique GUID number (it must be unique). Such as this: <Animation name="Passenger" guid="FDA50421-45AA-6c6fc-2133-8428FA1B7C57" type="Standard" typeParam="AutoPlay,Random" /> This resolves the problem.


www.antsairplanes.com

Share this post


Link to post
Share on other sites

Yep! Yet another "hoop" to jump through because Louis insists on coding to a different drumbeat, and doesn't recognize/distinguish numeric characters in the Animation names, so that Ambient and Ambient2 appear to Louis' program as the same tag and not unique tags... ;)I believe that were you to rename "Ambient2" to "AmbientB" it would work properly yet retain a meaningful name...The export modules for Max/GMax will correctly parse the modeldef.xml file to generate the correct .xanim entries.


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...