Jump to content

How to assign/set layers to multiple animations in imported FBX


Recommended Posts

As title says, i'm designing a part and have managed to do all steps in process except that i don't know how to assign or set layer IDs to multiple animation takes from imported FBX.

Model is in FBX 2013 format and Unity is 4.2.2. In previous version, i have already succeeded to design and export UV mapped, textured and animated FBX model into KSP with basic part config that used FSanimateGeneric from FireSpitter.

I'm trying to create a model that will have independent animations that will use LayeredAnimations plugin by @Starwaster .

Link to comment
Share on other sites

I've read about multiple animation takes on forum threads and for most part people have trouble controlling at which frame animation starts. Both ModuleAnimateGeneric and FSAnimateGeneric seem to have this issue. Will conduct my own tests as time permits.

Meanwhile, i've discovered i'll need to chain animations to ensure they get executed in proper order and state. And if this requires me to write another plugin, so be it. I'm already on the roll and will finish this.

The animation logic i need is (example):

-there are 3 animations, let's call them A, B and C

-animation A is end-type, a kind of preparation / support / finish

-animations B and C are main sequences

-before running anim B, anim A is run first, then B

-before running anim C, anim A is checked and if not played, its run first, then C

-when running anim A in reverse, B and C are executed first in reverse

Seems like a lot of work. I  hope i get this working.

EDIT:  Silly me... I've re-read Starwaster's info on github.. You are right it will work. Ahh i guess nobody is immune against a "RTFM" :)

Edited by fatcargo
blindness or plain stupidity ? judge for yourself :)
Link to comment
Share on other sites

You'll most likely have to write a custom animation module for this. I don't know of any animation modules stock or plugin that runs the kind of logic checks you are looking to do. it's something that would be easier with animator component. another reason for Squad to ditch legacy animation system.

Link to comment
Share on other sites

Thanks for the advice, but my part design requires such level of control as to be usable to a player. If left as single animation, players will have problems using it in crafts with low ground clearance and animations representing part mechanics will be too crude.

Also, i took upon myself to complete all steps for this part, including the programming segment. This is the first time i make something for KSP, might as well do most that is offered for modding.

Link to comment
Share on other sites

  • 2 weeks later...

Sorry for the off-topic, but the below is a result of my investigations into the matter.

Small dev news : as i had time, i have poured over source codes of several ksp plugins, some youtube videos and ksp forum. I have managed to proof-test several components i need for my target :

- loading part.cfg

-modeling, skinning, rigging, arranging animations and exporting to fbx model (learned also to save ONLY keyframes of animated transform channels in export, reduced size quite a bit)

-playing multiple animations on single object in unity editor (both as siblings AND in parent-child hierarchy - which was AWESOME discovery for me !)

-define a config structure that should let part creator describe model animations in txt format

So far, i have covered almost all components, now i have to focus on putting it all together. And have also learned to make a small test-scene in unity editor to test out ideas before putting them in plugin (and anxiously waiting for NREs in KSP :) ).

Also i have discovered part of KSP API as starting point for my next target which i requested earlier (EVA / IVA transitions), but that will have to wait.

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...