Thread: [Plib-users] loading animation from ASE files
Brought to you by:
sjbaker
From: Chris P. <ch...@ze...> - 2003-05-12 09:10:44
|
Hi... I've been studying PLIB/SSG for about a week now and intend on using it for a game I'm working on. I was able to get some models from 3DStudio to load in the ascii export format (.ASE) and display a scene created from some models. That part is all good. I'd like to use animations created from 3DStudio and the file loader description page said that animation is supported in the ASE format, but when I used the print() method (detail of 4), I was not able to find any animation info (several objects rotating in different directions in my test file). Can anyone give me any pointers on how to access animation data from an ASE file? Is that data ignored or does it have to be formatted some special way from within 3DStudio before it is exported? Many thanks for any help! -Chris |
From: SkyFlash <sky...@ch...> - 2003-05-12 16:37:39
|
You got to use the ASE exporter within 3d studio and export the animation too, then you can load it into PLIB. SkyFlash > I've been studying PLIB/SSG for about a week now and > intend on using it for a game I'm working on. I was > able to get some models from 3DStudio to load in the > ascii export format (.ASE) and display a scene created > from some models. > > That part is all good. I'd like to use animations > created from 3DStudio and the file loader description > page said that animation is supported in the ASE format, > but when I used the print() method (detail of 4), I was > not able to find any animation info (several objects > rotating in different directions in my test file). > > Can anyone give me any pointers on how to access > animation data from an ASE file? Is that data ignored > or does it have to be formatted some special way from > within 3DStudio before it is exported? > > Many thanks for any help! > > -Chris |
From: Chris P. <ch...@ze...> - 2003-05-12 19:57:01
|
Thanks for responding so quickly. I neglected to say that I was seeing info in the ASE file that appeared to be about the animation sequence. Here's what it looks like. Near the top of the file, I see this info: *SCENE { *SCENE_FILENAME "Iris17.max" *SCENE_FIRSTFRAME 0 *SCENE_LASTFRAME 120 *SCENE_FRAMESPEED 30 *SCENE_TICKSPERFRAME 160 *SCENE_BACKGROUND_STATIC 0.00000000 0.00000000 0.00000000 *SCENE_AMBIENT_STATIC 0.00000000 0.00000000 0.00000000 } and for each object, I see this kind of info: *TM_ANIMATION { *NODE_NAME "Box07" *CONTROL_ROT_TCB { *CONTROL_TCB_ROT_KEY 0 0.00000000 0.00000000 -1.00000000 2.09439516 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 *CONTROL_TCB_ROT_KEY 19200 -0.08040479 -0.13120875 -0.98808873 1.00492001 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 } } So... is this type of animation node not recognized by SSG, or did I just not see the expected data in the print() output? and, if it really did get loaded, how do I find it? If this animation data is not appropriate, how do I export the right kind of data? I assume, I'll have to attach the object below an ssgTimedSelector in order to control it. Though, I'd rather have it work more like the way the Tween controller operates and control any transformations smoothly between the animation keys. :) Is that possible, or will I have to go digging in the library to make changes? Thanks again! -Chris SkyFlash wrote > You got to use the ASE exporter within 3d studio and export the > animation too, > then you can load it into PLIB. > > SkyFlash > > > > I've been studying PLIB/SSG for about a week now and > > intend on using it for a game I'm working on. I was > > able to get some models from 3DStudio to load in the > > ascii export format (.ASE) and display a scene created > > from some models. > > > > That part is all good. I'd like to use animations > > created from 3DStudio and the file loader description > > page said that animation is supported in the ASE format, > > but when I used the print() method (detail of 4), I was > > not able to find any animation info (several objects > > rotating in different directions in my test file). > > > > Can anyone give me any pointers on how to access > > animation data from an ASE file? Is that data ignored > > or does it have to be formatted some special way from > > within 3DStudio before it is exported? > > > > Many thanks for any help! > > > > -Chris |
From: SkyFlash <sky...@ch...> - 2003-05-13 09:39:20
|
> So... is this type of animation node not recognized by SSG, > or did I just not see the expected data in the print() > output? and, if it really did get loaded, how do I find it? > If this animation data is not appropriate, how do I export > the right kind of data? Ok, here is a pic of the settings we use to export: http://www.ralf-mengwasser.de/files/aseexport.jpg Well, I am not an expert by any means, but that definitely looks different than the animations in my ASE files. Is that transform animation keys? I don't think that works, I am exporting it too, but our usual animations or all mesh based, so "animated mesh" is really what you want I think. > I assume, I'll have to attach the object below an > ssgTimedSelector in order to control it. Though, I'd rather > have it work more like the way the Tween controller operates > and control any transformations smoothly between the > animation keys. :) Is that possible, or will I have to go > digging in the library to make changes? No thats not possible, but yes Id like that too. :P Thats like the most pressing feature missing, there may be a trick or a workaround though... I wouldnt use ssgTimedSelector though. I used that as well at first because I thought its an easy way to control the animations, but in fact, its not. Its not even working right. The ssgTimedSelector only works if you have it contain subnodes that contain the whole objects animation frames. Now, try creating a basic robot by placing a box as head, a box as body and two boxes as legs and then animate it and try to load it into PLIB. Look at the structure it has. It SHOULD have one parent ssgTimedSelector node and then the anim frames below that. Well, it won't, due to the ASE loader. In fact, it will be probably loaded exactly like you don't want it. But be your own judge. :P Use the ssgSelector and write your own animation package using it, its much better and faster. Be aware it will contain recursive code, look at the examples. |
From: Chris P. <ch...@ze...> - 2003-05-13 16:53:43
|
SkyFlash wrote > > If this animation data is not appropriate, how do I export > > the right kind of data? > > Ok, here is a pic of the settings we use to export: > http://www.ralf-mengwasser.de/files/aseexport.jpg Ahhh... I'm not looking at the options I use, but I think I was not using the "Force Sample" choice. Considering that you confirmed my suspicion that an "animated mesh" is the kind of animation needed, then this makes sense, since the exporter would only export meshes for each keyframe which wouldn't be enough useful data. I get it. :) > Use the ssgSelector and write your own animation package using it, its > much better and faster. ok, now that I know all the frames will be there, then using ssgSelector looks like a straight-forward method to animate. Many thanks for clearing that up for me... :) > Be aware it will contain recursive code, look at the examples. where are the examples? are they in the source distribution? I'm using the debian package, so I haven't seen the contents, yet... ;) -Chris |
From: Chris P. <ch...@ze...> - 2003-05-13 17:05:29
|
realized I forgot to answer this. SkyFlash wrote > Well, I am not an expert by any means, but that definitely looks > different than the animations in my ASE files. Is that transform > animation keys? Yes... I'm pretty sure those are transformation animation keys, which just specify that the object is transformed (rotation, in my case) at each key. As long as a ssgTransform is inserted in there, then this could be a usable animation technique. If I get deep enough into this project of mine, then maybe I'll write some code for SSG. :) -Chris |