• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

I used Threed to make an animated part, but I need some feedback about...

Started by BNG Da BZ Fool, December 06, 2009, 04:26:51 PM

Previous topic - Next topic

BNG Da BZ Fool

...the ODF entries like animfile = ivairjag.xsi, animcount = 1, animname = loop.

Progress so far is exporting an animated X model to Threed from TS7.6, editng the animated part by checking the animation box by right clicking the part, and saving the file as XSI.

Then with notepad copy and pasting the animation numbers from the X file to the extra XSI section that's created by Threed to add Animationset to the end of the XSI file. Once I do this the XSI model animates just like the X model it was created from; well, at least it does in 3dex using the animation play controls. However, when I test the model in the map editor the model loads fine, but I see no animation at all. Is there some stuff I can try to get the animation working? What would happen if I changed the animname to something like forward; like in the ivscout? Would BZII use the name when I moved the craft forward? Sure could use some feedback on what I might try as I'm sort of stuck.

In my ODF, I copied the animation lines listed above, but the cvtalon from which my ODF is based has no animation entries at all.

Do I need to make 2 seperate XSI models? One with and one without the animation? The animation i did in TS is little more then making the wings tilt forwards and backwards a bit using a rotational animation controls.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

Avatar

Stock animation support is by classLabel.  If the class you're using doesn't support the type of animation you want it won't animate.  "Wingman", for instance, only supports the 3 strafe animations.

Unfortunately you can't just add 'missing' ODF entries to get animations to play.  If you have a unit that needs something the stock classes don't give you it's time to jump into DLLs...   :)

Helicopters, for instance, are easy to add rotating blades to via DLL...

-Av-

TheJamsh

Or, you can use a draw_geom for that now so that it works everywhere

[render]
renderBase = "draw_geom"
initialPitch
initialYaw
initialRoll

addPitch
addYaw
addRoll


BZII Expansion Pack Development Leader. Coming Soon.

BNG Da BZ Fool

I borrowed the ODF animation entries from the ibpgen ODF. At this point I'd just like to try to test the Threed modified XSI to see if it actualy just works or not.

What I problably need to do is try making a power generator mdel with all the reqiured parts and repeat it all over again only this time as per the classlabel thingy and proper ODF entries.

As I mentioned before do several model files need to be made as in the ibpgen it lists a seperate I think ibpgen00.xsi? Or can I just copy and rename the same model and use that for the anim file? Tanks, BNG.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

mrtwosheds

As you have probably noticed, there are 2 types of basic animations, rotation and translation.
If a frame needs both types, the two animations for that frame are arranged like this example.

AnimationSet {
  Animation anim-mainbody {
     {frm-mainbody}
     SI_AnimationKey {
        2;
        8;
        1; 3; 0, 0, 0;;,
        3; 3; 0, 0, 0;;,
        6; 3; 0, 0, 0;;,
        9; 3; 0, 0, 0;;,
        12; 3; 0, 0, 0;;,
        15; 3; 0, 0, 0;;,
        18; 3; 0, 0, 0;;,
        21; 3; 0, 0, 0;;;
     }
     SI_AnimationKey {
        0;
        8;
        1; 4; 1, 0, 0.0, 0;;,
        8; 4; 1, 0, 0.0, 0;;,
        16; 4; 1, 0, 0.0, 0;;,
        24; 4; 1, 0, 0.0, 0;;,
        32; 4; 1, 0, 0.0, 0;;,
        40; 4; 1, 0, 0.0, 0;;,
        48; 4; 1, 0, 0.0, 0;;,
        56; 4; 1, 0, 0, 0;;;

     }
  }

If you attempt to save an animation like this with threed it will throw away this bit

     }
     SI_AnimationKey {
        0;
        8;
and "optimise" what is left so the animation will no longer work in bz2. Threed breaks animations.

You would probably be better off just cutnpasting the anims straight from the .x to the .xsi in notepad.
The only link between the anim and the rest of the file is the frame names.
eg
Animation anim-mainbody {    
{frm-mainbody}
Naming the animation is really only useful if you want to trigger it via dll

Buildings generally just have their anims in the main *bwhatever00.xsi
vehicles use other .xsi to hold the animations and are named in the odf.
It is best to have an animation set in the main _skel.xsi as well, one that defines the basic positions and does not animate.
The animations in the other vehicle.xsi are used to build the .msh using the _skel.xsi.
No other info appears to be taken from them.

Animations overide the values in the FrameTransformMatrix { they reference!

BNG Da BZ Fool

All I'm usiing Threed to do is initially add the AnimationSet entry to the XSI file name part wings-2 prior to saving it, and as you mentioned then copying the animation data group to that file using Notepad; point understood about Threed breaking things animation wise. The animation I did in TS is in 2 parts. The first SI_AnimationKey is created for me, and the 2nd I add from the X AminationKey to read SI_AnimationKey; this method replicates the X animation equal in XSI terms as playable in 3dex. I understan the process well enough now to repeat it again without issue. The part I apparently still don't understand is the ODF section relating to getting it to work in game.

The usefulness of Threed in doing this part is what makes the program invaluable in terms of setting up a decent basic BZII XSI template structure for use with Notepad. Getting the right number of brackets takes some practice as one extra entry can cause a problem as I noted this in 3dex with an exclamation triangle indicating a commentary error corrected by deleting one ) symbol.

If I can get a single animation to work then later on I'll experiment with multiple cut and paste animation sequences created from TS based X files, but for now getting a single animation to run correctly is my basic goal for now. What really amazes me is how flexible the text based X and XSI formats are in terms of similarilty.

 
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

mrtwosheds

Bz2 builds a .msh from your .xsi models.

classLabel = "constructionrig" //references the units class.
geometryName = "dvconst_skel.xsi" // this .xsi supplys all the geometry, materials etc
geometryScale = 1.0
animCount = 1
animName1 = "deploy" // You must use ones supported by the units class (see stock models)
animFile1 = "dvconst_deploy.xsi"//  Only the animation will be taken from these .xsi when building the .msh, their naming is not important.

So dvconst_skel.msh will do the "deploy"animation originally in dvconst_deploy.xsi when it is asked to build something.
"dvconst_deploy.xsi" does not need to be left in your mod files after you have built the dvconst_skel.msh.

BNG Da BZ Fool

So the animName entry refers to what process BZII will use when extracting the animation part? Do animated models all need a whatever_skel.xsi as a prerequisite to any additional models with the different animation sequences like deploy, etc? Sorry, but I'm just trying to get it straight as building additional models with different animation properties still confuses me.

Would: Building one base model named, mymodel_skel and then copying it several times (renaming) each and adding the actual animations to each copy work? In TS I can select the model and make an exact copy as many times as I need; keeping them all in the same scene file too.

Threed seems generate a single SI_AnimationKey entry by right clicking an object and selecting the animation box. I suppose several or all objects could be prepared this way, although, that's a ton of extra work concidering they have to be manaully edited in notepad. For now I'd just like to get a single animation to work if possible.

What purpose does the BZ2 animated box do? I see it adds a __h entry to the end of the object name?
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

Nielk1

__h is a hidden flag. If you see it in an animation and not a skell, the skel version is used.

MSH files are compiled with the skel XSI for the mesh and the animation entries from the other XSIs, asn named in the ODF. Thus an MSH must be compiled with the skel and all animations you want in it all at once.

Click on the image...

BNG Da BZ Fool

In the ivapc.odf; the FE one with rocket bikes I see the animation in 3dex, but not in the game why? I made one of my own with 2 bomb bay doors that swing open when the animation plays, but I don't see it open either when mine deploys 6 rocketeers that attack an enemy.

I could understand why my apc might not show an animation, but why doesn't the other ivapc unit show the rear hatch open or close? I made the apc on my work pc, so I'll have to make another one on this pc. If I post a zip link could someone take a gander at it to see if I'm doing something wrong? Tanks, BNG.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

mrtwosheds

Apc and bomber classes do not animate. This is an original bz2 bug. Don't waste your time trying to make them work.

Quote__h is a hidden flag. If you see it in an animation and not a skell, the sky version is used.
What?

QuoteSo the animName entry refers to what process BZII will use when extracting the animation part?
No the animName entry is the command that is used by bz2 to trigger the animation, buildings, turrets,  constructors, recy vehicles etc use deploy.

QuoteWould: Building one base model named, mymodel_skel and then copying it several times (renaming) each and adding the actual animations to each copy work?
Yes that is how to do it. You do not want to build more than 1 model.

QuoteThreed seems generate a single SI_AnimationKey entry by right clicking an object and selecting the animation box.
All it does is add the headers, really, don't bother with this, copy pasting and naming in notepad is much easier, it does not terminate unexpectedly, or add bolox values of 0 to 43 million decimal places to parts of your model for no obvious reason.

QuoteWhat purpose does the BZ2 animated box do? I see it adds a __h entry to the end of the object name?

It adds __h the hidden tag, used for collision meshes, Prior to 1.3 was also used for animated tracks, causing buggyness. Now in 1.3 it is not used for tracks. Again it is much simpler to type __h, than it is to use threed.


BNG Da BZ Fool

I did make one interesting discovery about saving animations as COB model files with GSL and TS7.6; 3dex can read TS versions 3, 4.3, 5, and 6. complete with animation and convert them all to X with a top level frame added. Not really sure if that will be very useful though as the only reliable non-3ds method so far appears to be using notepad editing.

I wonder why the 3dex 1.5.5 XSI conversions sucks so badly? Is it because the exporter post dates the BZII version? The header reads, xsi 0101txt 0032, but you can tell that it appears to screw up the texture section with TextureFilename rather then SI_Texture2D. Did XSI text files ever use TextureFilename?
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.