PDA

View Full Version : Animations and Combat Flight Simulator 3



hairyspin
January 3rd, 2009, 13:19
Before the server crash I asked if anyone could point me in the direction of some useful material on IK animations to help me solve my undercarriage animation conundrum. No solutions were supplied and I posted that I'd solved the problems without IK, by animating things by hand.

That was part of the story. The mechanism includes two piston assemblies and therefore two sliding joints:-

http://img337.imageshack.us/img337/3259/image17dn1.jpg


I'd solved their animation with Look At constraints in gmax which made them ridiculously easy to get right. Just this week I exported the model to CFS3 and having got the aircraft in the air, examined the gear animation.
It doesn't work, :faint: not the piston assemblies, anyway! I've also exported via FS9's MakeMDL and that draws a blank too. Back to the old drawing board..... :banghead:

I have a solution in mind, so all is not lost and I'll report back when/if this scheme succeeds

thicko
January 4th, 2009, 17:08
hairyspin,
I also had problems with landing gear animation in CFS3, with my Mig-3. It worked fine in CFS2 and FS9. I found the problem to be the offending parts name, of all things. The SDK says, name the gear parts : Example l_gear_anything. I was using names like l_gear_door_inner, the extra word after door was enough to stop the animation. With as many parts in your project you may be in the same boat. Now if I can just get the .XDP for the plane working......
Cheers Thicko

Milton Shupe
January 4th, 2009, 18:30
You might try using numbers instead of names for differentiation.

l_gear_01
l_gear_02
etc.

You might also look at any example gmax code provided.

Firebar
January 5th, 2009, 13:25
I found that with CFS3 if a selection of parts have the same name they will be treated as one part, so perhaps you could have all the parts as l_gear just ignor the errors and it comes out fine (or it did for me)

hairyspin
January 12th, 2009, 14:22
@ Thicko - the SDK states (page 2) 'Keyframe animation ..... All the parts to be animated at the same time must have the same "trigger name" followed by an underscore, then a number' and then on the next page is the table of Keyframe Animation Names with the fateful line following:- Example: l_gear_strut, l_gear_anyname. I don't know who proofread the SDK, but it wasn't Tina the Tech Writer - more likely Ratbert! :mad:

@ Milton - my hierarchy numbers parts just as you suggest and I can tell you that CFS3 will happily use 14 different animated parts in one animation! That's right, the port undercarriage has 14 animated parts and the starboard another 14! (3-part doors included) :isadizzy:

@ Firebar - gmax will tolerate name overloading as I think the programming community would call it, but the thought of having to go back and modify one item out of six (or more) all called r_gear gives me the creeps! :hand:

Here's the problem:-

http://img378.imageshack.us/img378/4923/animation2ix3.gif http://img378.imageshack.us/img378/6048/animation210el0.jpg

This animation is of the port undercarriage and as you'll see there is a cylinder & piston pair to the left and a sprung sliding strut near the top of the main leg - two sliding joints - and the photo is of a similar arrangement on a Sea Fury (Matt, it's at Yeovilton).

http://img156.imageshack.us/img156/8210/animation211ka3.jpg

The sliding joints are animated using the Look At constraint, which uses a single dummy helper object, and gmax will produce very smooth animations with this simple, but extremely powerful, tool. The name explains what it does - wherever the pivot point of the target goes, the constrained part's pivot Looks At it! (see the gmax help files for details)

But when the model is exported to CFS3 (or FS9) and the animation is triggered, this is the result!

http://img84.imageshack.us/img84/4494/animation213fi7.jpg

The Look At constraint is not supported by the CFS3 exporter (or makemdl for that matter) :banghead: so we have to animate these sliding joints with keyframes. Or (ideally) we reduce these Look At constrained animations to equivalent keyframe animations :isadizzy: if possible.

hairyspin
January 12th, 2009, 14:41
First SAVE YOUR MODEL. If you have to redo this with different settings you'll want a fallback copy, won't you?

http://img265.imageshack.us/img265/3228/animation214dj2.jpg

Select the upper part of the undercarriage leg - as the parent to all the other parts of the leg, its key frames govern the start and end time of the animation.

Go to the Motion Panel and select the Trajectories tab. The key frame times will be displayed in the track bar below the viewport(s). Fill in the start and end times of the key frames in the Sample Range boxes and pick a suitable number of steps to enter in the Samples field. I've chosen 20 here because it's a complex movement and even 15 wasn't enough - I did try....



http://img82.imageshack.us/img82/5206/animation215dh8.jpg

Still in the Motion panel, Trajectories tab, select a component in a Look At constraint - here I've selected l_gear_8 - and tick only the Rotation check box in the panel. (Look At constraints are rotation constraints and there's no need to generate position or scale keys when they're not needed)



http://img440.imageshack.us/img440/6011/animation216je6.jpg

Click on Collapse and by the power of gmax a set of twenty keys appears in the track bar. It's that easy!



http://img82.imageshack.us/img82/3334/animation217dy4.jpg

Repeat the select-and-collapse procedure with the remaining three components. Notice the fine lines indicating the presence of the constraints have disappeared.


SAVE YOUR WORK. Now play the animation and view it from various angles to make sure it all works smoothly and there are no sudden and unexpected deviations from what it should do. Then you can delete the two dummy helpers and SAVE AGAIN



Export to the sim, go fly and marvel at how the blighter does what it's told! :costumes:


http://img133.imageshack.us/img133/2001/animation218zx6.jpg

Milton Shupe
January 12th, 2009, 15:30
I hope you had enough parts to spare to animate the oleo suspension as well. :applause:

So, does CFS3 use the same SDK and requirements as FS9 or more like FSX?

hairyspin
January 12th, 2009, 21:12
No, CFS3 ploughs its own furrow. I don't know about FSX, since I don't have it yet - I presume it's the Deluxe version which has the SDK etc?

(The oleo is fully animated)

grumpos
January 13th, 2009, 08:18
Best thread in the outhouse! :ernae:

These any use? I have the keys to the illustrations.

Milton Shupe
January 13th, 2009, 09:52
Wow! That's a great contribution grumpos. :applause:

Is there a site where these are generally available?

hairyspin
January 13th, 2009, 10:39
These any use? I have the keys to the illustrations.

My dear fellow, these (and the keys) would be tremendously useful! :jump: And thank you for your kind comments! :wavey:

grumpos
January 13th, 2009, 12:49
Is there a site where these are generally available?

Hi Milton,

These are photographs of an original manual. AFAIK, it is not available on the web.

grumpos
January 13th, 2009, 12:52
My dear fellow, these (and the keys) would be tremendously useful! :jump: And thank you for your kind comments! :wavey:

Hairyspin,

PM me an email addy and I'll send you larger copies of the above illustrations. I have most of the manual so if you need any info on any specific part/area let me know and I'll dig out the bumf.