Saving Individual Keyframes

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Saving Individual Keyframes // Tech Forum

1  |  

Post by danohu // Feb 16, 2009, 12:16pm

danohu
Total Posts: 4
Hi


I wonder if anyone can help?


If one saves a series of keyframes from an animation by clicking on 'File' then 'Save As' and chooses one of the file formats available (e.g. .scn, .iss or .wrl) one is left with a single file.(e.g. Example.scn, Example.iss or Example.wrl)


I want to be able to extract individual keyframes from (e.g. Example.wrl) and save these keyframes in separate individual files (e.g. Keyframe1.wrl, Keyframe2.wrl and Keyframe3.wrl etc). Currently I can manually save each keyframe using Truespace but this is very time consuming.


I would also like to extract the individual keyframes and save them in file formats other than .wrl (e.g. I would like to extract individual keyframes from Example.wrl and save them as Keyframe1.iss, Keyframe2.iss, Keyframe3.iss or alternatively Keyframe1.3ds, Keyframe2.3ds or Keyframe3.3ds).


Perhaps there is some Converter on the market that would help with extracting individual keyframes from a file in a variety of formats?


Thanks for your help.


Danohu:rolleyes:

Post by Mr. 3d // Feb 17, 2009, 2:47am

Mr. 3d
Total Posts: 747
pic
Hi danohu...
Tom has created a quick video that shows one way of 'Rendering to File' in post #7....(CLICK HERE...http://forums1.caligari.com/truespace/showthread.php?t=6193)

Here's how to Render out Key Frames on the Model Side...

18330

Post by TomG // Feb 17, 2009, 4:28am

TomG
Total Posts: 3397
Here though danohu isn't interested in rendering, but in saving out each keyframe as a separate, individual 3D model or scene, presumably to load it up into another 3D application as a sequence of changed 3D models or scenes. Danohu, it would be interesting to know why you want to do this :) Generally when you save out an animation to a 3D format, you want the animation with it all as one piece, rather than exporting a series of 3D scenes out, each one being static and showing the scene at a different keyframe of the animation. Perhaps the format in question doesn't support animation though? So duplicating the scene over and over again in its different keyframe states would be the only way to import the animation? (Inefficient of course, it would involve huge amounts of data as the scene or object would be duplicated for every keyframe; a 1 Mb scene with 100 keyframes becomes 100Mb).


There is no automatic way of achieving this, since it is not a regular or usual thing to want to do. Sharing why you want to do it might reveal an alternative though. Meantime, manually saving each keyframe is the only way I know of to achieve this.


HTH,

Tom

Post by danohu // Feb 17, 2009, 5:38am

danohu
Total Posts: 4
Hi


Thanks for both your replies which are much appreciated.


Tom, I wanted to import the Truespace keyframes into Conitec Gamestudio which is compatible with Truespace (I believe??). In attempting to import a single file containing a series of keyframes into Gamestudio, only the first keyframe is successfully imported, hence my desire to import individual keyframes into the product. I can successfully import individual keyframes but have the problem of time to do this and also see that the Mb size is an issue from your last email.


Any further expert help will be eagerly received?


danohu:D

Post by TomG // Feb 17, 2009, 7:13am

TomG
Total Posts: 3397
Gamestudio should support animation - you'll only see the first frame and would need to write the code to playback the other frames. What format are you using to load the models into Gamestudio? Some formats dont support animation, eg OBJ, but others do, eg X.


Is the animation based on skeletons, or just regular translations, scalings etc? The second will be easier to import than the first, skeletons are harder to work with.


We have some folks here with a background in using tS for game models, would welcome their more specific advice on how tS works with GameStudio.


Thanks!

Tom

Post by danohu // Feb 20, 2009, 7:23am

danohu
Total Posts: 4
I am importing .3ds and .wrl. The models are just regular translations, nothing fancy.


When you talk about writing code to playback the animations that sounds interesting. Do you have a reference I could look at to understand what you mean as that is outside of limited knowledge. I am assuming this means writing some code in GameStudio to run animations?


Thanks


danohu


:jumpy:

Post by TomG // Feb 20, 2009, 8:29am

TomG
Total Posts: 3397
You'll need to consult your game engine on what code is required. Basically since the engine is a game, it won't automatically run animations, you have to decide when to trigger them. A character usually has many animations, such as run, walk, crouch, die, aim, shoot, etc.


So not only does your game have to activate the animation, it has to activate the right one. Different engines use different methods, some are as simple as specifying start and end frames, some can have named animation sequences and you trigger them by name.


Either way, your game engine will need to activate the playback of the animation, since it will be dependent on game logic. The precise way of doing this is down to your engine, consult the manual on the section relating to loading and playing back animated 3D models.


Alternatively, for some simple animation, you can just write the translation procedurally in your game language and not bother loading animation frames.


The good news is that translations are easier to handle than skeletal driven animations, so you should be able to save those to X format and get them running in your game engine. You just write code that updates the location, rotation, scale etc, in the game engine in that case.


HTH!

Tom
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn