ModelSide Keyframes to Workspace

Start here all your tutorials for Truespace Worskpace Side.
Post Reply
User avatar
Prodigy
Site Admin
Posts: 955
Joined: 21 May 2009, 14:46
Type the number ten into the box: 0
Location: Uruguay

ModelSide Keyframes to Workspace

Post by Prodigy »

ORIGINAL TUTORIAL BY DELE:

Ok, I'll try to explain here how to transfer animation from the old KFE to the new AE. If you're not familiar with the new architecture you might find it a little tricky to do, however once you get it, it's really not that difficult. In this example I'll use an animation path seeing as that was the original question.

First make a copy of the object that you want to animate. Then make sure the bridge is set to "ON".
BridgeON.jpg
BridgeON.jpg (23.35 KiB) Viewed 6793 times
Now switch to the model view and open a KFE window. I like to dock it at the bottom so I can see both the old and new animation windows at the same time. To dock it, hold Ctrl and drag the window to where you want it.
OpenKFE.jpg
Next draw the animation path using the "Copy" object.
DrawPath.jpg
Now switch the AE window to 2D (black button in upper right corner of the window). Find the "original" object and "copy" object nodes in the 2d window. Click on the "Exp" or "default" tab on the nodes (just make sure you can see the "matrix" inputs and "wldmatrix" outputs on the nodes). Position them as shown in the image below. Click and drag on the "WldMatrxix" output on the copy object node. Drag the link into the "Matrix" input on the original object node and let go. A link will be made. This will take the Location, Rotation, and Scale information from the copy object and send it into the original. So the original object will now exactly mimic the animation of the copy object.
LinkMatrix.jpg
Next change the 2d window back to 4d (animation view). Make sure that both the old and new animation windows are set to the beginning. Then make sure the original object is selected and hit the record button in the new AE. This will begin to record the original object in the AE. Now move the scrubbers of both the new AE and old KFE to the next keyframe that the path created in the old KFE. Again, click the record button in the new AE to record that keyframe. Continue on manually matching up the scrubbers in both animation windows and recording the keyframes into the new AE.
CopyKeys.jpg
When you're done, you can set the window back to 2d and disconnect the link made earlier. This will give control back to the AE.
DisconnectMatrix.jpg
Now you can delete the copy object and turn the bridge back off. You should now have the object animated with keyframes in the new AE. I know that this method isn't ideal, but until animation paths get implemented in the new workspace side this can be used as a workaround. It might seem difficult at first, but once you get going it's really not too bad.
Result.jpg

hth

Edit: Instead of KFE I probably should have said Scene Editor. Anyway, same difference.
ForumSig3.jpg
ForumSig3.jpg (12.78 KiB) Viewed 6794 times

#prodigy: Thanks Trueblue
๑۩۞۩๑ prodigy ๑۩۞۩๑
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: ModelSide Keyframes to Workspace

Post by trueBlue »

Here is my attemp to create a script to make this process easier.
It works except I am not able to figure out how to record the first keyframe (0) in the script at the start frame.
Here is a demo scene that is set up to capture the animated Cylinder that was recorded in Model and transfer it's keyframes to the Workspace's Cube in the Animation Editor. Select the script button 4 times and disconnect the link from the WldMatrix. Play the captured animation in the Animation Editor.

CLINTON....!
Attachments
Capture.PNG
TS 2 AE Keyframes.zip
(111.64 KiB) Downloaded 406 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: ModelSide Keyframes to Workspace

Post by clintonman »

trueBlue wrote:Here is my attemp to create a script to make this process easier.
It works except I am not able to figure out how to record the first keyframe (0) in the script at the start frame.
Here is a demo scene that is set up to capture the animated Cylinder that was recorded in Model and transfer it's keyframes to the Workspace's Cube in the Animation Editor. Select the script button 4 times and disconnect the link from the WldMatrix. Play the captured animation in the Animation Editor.

CLINTON....!
AAAHHH,H he's yelling at me again. ;)

This is a nice script. The only thing I see missing is some kind of suggesttsstatebyalias using the go to first keyframe action. I'll look it up and see what I come up with.

I didn't know the TSkeyFrame node was for modelside. I thought it was worthless until now.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: ModelSide Keyframes to Workspace

Post by trueBlue »

Like this:
tSBridge.SuggestTSStateByAlias("FirstFrameButton")
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: ModelSide Keyframes to Workspace

Post by clintonman »

trueBlue wrote:Like this:
tSBridge.SuggestTSStateByAlias("FirstFrameButton")
Thanks and here it is. The code is really sloppy but it works. Click the check box for the first key. Push the button will do the first key and uncheck the box. Each click after that will jump to the next modelside key.
Attachments
TS 2 AE Keyframes2.zip
(119.19 KiB) Downloaded 396 times
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: ModelSide Keyframes to Workspace

Post by clintonman »

This one doesn't need the cube to transfer the animations. Autokey should be turned off in modelside to avoid new keyframes from workspace changes.
Attachments
TS 2 AE Keyframes6.zip
(110.58 KiB) Downloaded 395 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

tS7.6.1 Model Keyframes to Workspace Keyframes

Post by trueBlue »

tS7.6.1 Model Keyframes to Workspace Keyframes

Here is a Demo scene and video showing it's use.
Make sure the Bridge is set to ON.
Connect the Cylinder's WldMatrix to the Cube's Matrix.
Select the Cube.
Select the script's button for each Keyframe you want to transfer/Record.
It was not necessary to have the Scene Editor or the Animation Editor open.
It is important to Reset this script before or after each use.
Capture.PNG

Dang Clinton! You are awesome and quick too. Thank you!
I had already recorded this video and added a Reset button to your script before your last post.
I am not understanding your last version. The idea as Dele has explained, is to capture Model's
animation Paths/Keyframes to a Workspace's object. Can you post directions?

Edit: Ok, after reading your scripts, I understand. You eliminated the need for a copy of the animated object.
Just select your object and select the button to capture and record keyframes into the AE. Nice!

Edit: I created and updated this script in tS7.6 here:
https://united3dartists.com/forum/viewt ... 826#p13826
Attachments
TS 2 AE Keyframes Demo.zip
(708.72 KiB) Downloaded 391 times
Last edited by trueBlue on 18 Jan 2010, 04:32, edited 1 time in total.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: ModelSide Keyframes to Workspace

Post by clintonman »

trueBlue wrote:Dang Clinton! You are awesome and quick too. Thank you!
Special thanks to Dele too!
Here is a Demo scene and video showing it's use.
Capture.PNG

@ Clinton: I had already recorded this video and added a Reset button to your script before your last post.
I am not understanding your last version. The idea as Dele has explained, is to capture Model's
animation Paths/Keyframes to a Workspace's object. Can you post directions?
Oh, I guess the last one was off topic then. The last version applies workspace keyframes to the animated modelspace object. It works the same as the second to last one.
1. bridge on
2. autokeys off
2. select the object to receive keyframes
3. check the check box
4. run once for each keyframe

the check box is just to tell the script that the first key @ 0 hasn't been set yet
Clinton Reese

http://clintons3d.com
Post Reply