Unit Animation Help Needed

deanej

Deity
Joined
Apr 8, 2006
Messages
4,859
Location
New York State
I would like to get some units to work with animation. They were originally created by Jaydn, and two don't have animations. I've attached a folder with some; the Maquis raider has animations but the Swarm ships do not. The art defines are below. Could someone explain how to get animations on the swarm ships? I can't see how they are different.

Code:
		<UnitArtInfo>
			<Type>ART_DEF_UNIT_MAQUIS</Type>
			<Button>Art/Interface/Buttons/Units/MaquisRaider.dds</Button>
			<fScale>0.45</fScale>
			<fInterfaceScale>0.57</fInterfaceScale>
			<bActAsLand>0</bActAsLand>
			<bActAsAir>1</bActAsAir>
			<NIF>Art/Units/Minor/MaquisRaider.nif</NIF>
			<KFM>Art/Units/Minor/Cruiser.kfm</KFM>
			<SHADERNIF>Art/Units/Minor/MaquisRaider.nif</SHADERNIF>
			<ShadowDef>
				<ShadowNIF>Art/Units/01_UnitShadows/DestroyerShadow.nif</ShadowNIF>
				<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
				<fShadowScale>0</fShadowScale>
			</ShadowDef>
			<iDamageStates>4</iDamageStates>
			<fBattleDistance>1.10</fBattleDistance>
			<fRangedDeathTime>0.31</fRangedDeathTime>
			<bSmoothMove>1</bSmoothMove>
			<fAngleInterpRate>720.0</fAngleInterpRate>
			<fBankRate>0.2</fBankRate>
			<bActAsRanged>1</bActAsRanged>
			<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
			<AudioRunSounds>
				<AudioRunTypeLoop/>
				<AudioRunTypeEnd/>
			</AudioRunSounds>
			<SelectionSound>AS3D_UN_SPACESHIP_FORTIFY</SelectionSound>
			<ActionSound>AS3D_UN_SPACESHIP_FORTIFY</ActionSound>
		</UnitArtInfo>
		<UnitArtInfo>
			<Type>ART_DEF_UNIT_SWARM</Type>
			<Button>Art/Interface/Buttons/Units/Swarm.dds</Button>
			<fScale>0.15</fScale>
			<fInterfaceScale>0.57</fInterfaceScale>
			<bActAsLand>0</bActAsLand>
			<bActAsAir>1</bActAsAir>
			<NIF>Art/Units/Minor/Swarm.nif</NIF>
			<KFM>Art/Units/Minor/Cruiser.kfm</KFM>
			<SHADERNIF/>
			<ShadowDef>
				<ShadowNIF>Art/Units/01_UnitShadows/DestroyerShadow.nif</ShadowNIF>
				<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
				<fShadowScale>0</fShadowScale>
			</ShadowDef>
			<iDamageStates>4</iDamageStates>
			<fBattleDistance>1.10</fBattleDistance>
			<fRangedDeathTime>0.31</fRangedDeathTime>
			<bSmoothMove>1</bSmoothMove>
			<fAngleInterpRate>720.0</fAngleInterpRate>
			<fBankRate>0.2</fBankRate>
			<bActAsRanged>1</bActAsRanged>
			<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
			<AudioRunSounds>
				<AudioRunTypeLoop/>
				<AudioRunTypeEnd/>
			</AudioRunSounds>
			<SelectionSound>AS3D_UN_SPACESHIP_FORTIFY</SelectionSound>
			<ActionSound>AS3D_UN_SPACESHIP_FORTIFY</ActionSound>
		</UnitArtInfo>
		<UnitArtInfo>
			<Type>ART_DEF_UNIT_SWARM2</Type>
			<Button>Art/Interface/Buttons/Units/Swarm.dds</Button>
			<fScale>0.15</fScale>
			<fInterfaceScale>0.57</fInterfaceScale>
			<bActAsLand>0</bActAsLand>
			<bActAsAir>1</bActAsAir>
			<NIF>Art/Units/Minor/Swarm2.nif</NIF>
			<KFM>Art/Units/Minor/Cruiser.kfm</KFM>
			<SHADERNIF/>
			<ShadowDef>
				<ShadowNIF>Art/Units/01_UnitShadows/DestroyerShadow.nif</ShadowNIF>
				<ShadowAttachNode>BIP Pelvis</ShadowAttachNode>
				<fShadowScale>0</fShadowScale>
			</ShadowDef>
			<iDamageStates>4</iDamageStates>
			<fBattleDistance>1.10</fBattleDistance>
			<fRangedDeathTime>0.31</fRangedDeathTime>
			<bSmoothMove>1</bSmoothMove>
			<fAngleInterpRate>720.0</fAngleInterpRate>
			<fBankRate>0.2</fBankRate>
			<bActAsRanged>1</bActAsRanged>
			<TrainSound>AS2D_UNIT_BUILD_UNIT</TrainSound>
			<AudioRunSounds>
				<AudioRunTypeLoop/>
				<AudioRunTypeEnd/>
			</AudioRunSounds>
			<SelectionSound>AS3D_UN_SPACESHIP_FORTIFY</SelectionSound>
			<ActionSound>AS3D_UN_SPACESHIP_FORTIFY</ActionSound>
		</UnitArtInfo>

Also, I'm afraid I need more help still on a similar matter. I need to create a retexture of some other units but I'm not sure how to do it (I tried but when I look in nifviewer I got some error) and I need to convert some more from Bridge Commander and I want them to have animations of their own (based on the Final Frontier units). I use gmax with a nif importer/exporter for all this.
 
the problem was, your models were not in an animated nif, if you compare both nif (your original swarm and the Marquis) you will see that they differ in structure. The animation controls certain nodes and place effects on placeholder nodes in the nif.

More or less the "standard" procedure is to copy your mesh in the nif of the unit you want to use the animation, make it a child of the dummy node (if it is unrigged like in your case, if rigged make it child of the Damage_Ship_Texture [in the cruiser nif as example] node) and adjust the position of the placeholders for the effects, engine, hit explosions and weapon effects [as long the effect nodes are not animated, so if your changes don´t work in game the solution is ab it different]. As long it´s a 'normal' units is almost straight forward, even if it is sometimes a bit :crazyeye: to find the correct positions, but for example the swarm needs special threatment because the mesh shows more ships than effects are in the nif, to get it good looking you have to add effect nodes and add them to the kf files (explosion, weapons) to work in game. Engine effects need more work, because you must add them in the nif, add them there also to an node called ATTACHABLES and add them also in the kf files (copy the NiBoolInterpolator of an existing for your new effect - perhaps it will also work if all new engine effect nodes are children of one of the existing effects [thrust to thrust, glow to glow, with the intention that you don´t must add the NiBoolInterpolator to the kf files for every new engine effect node - because the visibility is already controlled by the parent node, if ti works this way, no idea, you must test it])

copied you meshes in the cruiser.nif, adjusted the position and added weapon effects the swarm (you have to use the Cruiser_MD_StrikeA_alt_swarm2.kf [copy all cruiser files (including the nif) to the swarm folder, exchange the Cruiser_MD_StrikeA.kf with the Cruiser_MD_StrikeA_alt_swarm2.kf (rename the second) and link to the cruiser.kfm in this folder in the xml]). All not tested in game. (new nif have suffix '_2')

Perhaps you should look at the nifscope tutorial and also the smaller tutorial about adding effects (make minor adjustments to animation) in the tutorial area

about the second problem (with the reskins), tbh i have no idea how the textures works in your case, i see no texture, but get a textured model in nifviewer (could be the texture information in the NiPixelData :confused: (edit: it is, deleted the information and had an untextured model), but even there i don´t see the informations).As idea, delete the NiPixelData, add the texture as base texture could work
 

Attachments

I've figured out how to retexture using Nif viewer and it works there. I think I have figured out how to put in the Final Frontier destroyer into the model the way Jaydn did for the animations for some new ones I've converted from Star Trek Bridge Commander but when I try to save them I get told that the program has encountered a problem and needs to close. Any ideas?

EDIT: I tried a slightly different process that does save but it does not animate at all. I'm afraid that I really don't understand anything about modeling - my skills are limited to importing and exporting only. Unfortunately this means that I really don't understand most of the last post and the tutorials on this site are way beyond my level.
 
please read the nifscope tutorial, if you can save the model and it work ingame without animation your problem is no modelling problem it´s only a copy paste problem in nifscope in one of the vanilla nifs.

If you have such an model ready, at the end of the week i can help you (at least i hope) and point you to the things to do
 
Well, I've tried to do the same thing with nifskope (this time with a transparent texture for the Final Frontier destroyer to hide it) and it still won't animate. Isn't there some way I can animate them just by using this animation instead of creating a brand new animation?

I really wish there was a "creating new units for dummies" section here, because everything I've seen assumes that you know how to model/texture.
 
:confused:
i´m not sure if i understood what you wanted to do. Do you wanted to change the texture and after this the model was not animated or do you want the texture to be animated.

Please write what you did (and attach the nif), i will have a look and say (if i can) what to do

(more or less animating means in most cases that you copy a mesh in the nif of an unit which animation you want to use - the unit uses than this animation)
 
Here's the steps I used:
1. open model I want to animate
2. add the destroyer.nif to the model
3. reposition/scale destroyer.nif to the weapons are where I want them to be in relation to the model
4 (nif viewer). hide destroyer.nif
4 (nifskope). set every texture for destroyer.nif to Trans.tga (an image with a completely transparent alpha channel)
5. save file

Unfortunately I don't have one of these (I had the good sense to keep a backup of the exported file with no attempts at animation in case something went wrong, which is what I have right now). However, I have attached the directory (there are two nifs, one animation). I don't need something complicated, just some weapon stuff so combat isn't just the ship sitting there.
 
ok you want the model in the cobra.nif (venator.nif) animated?
the step are (all in nifscope):

1. open the model nif (eg: cobra.nif)
1.a) rename scene root to model (or cobra, or ... almost everything but no scene root)

2. open also the destroyer.nif (or the nif of the unit which aniamtion you want to use)

3. select the model node (the renamed node) in the cobra nif and copy the object (rmb on the node - block - copy branch)

4. in the destroyer.nif select the DUMMY_Destroyer_Hull node and rmb - block - paste branch, now your model is also in the nif
4.a) scale your model, change the position of your model (move the NiTriShape)

Spoiler :
(remark: the DUMMY_Destroyer_hull is the dummy object for the animation, this node is animated, the destroyer itself is rigged to this node (means the vertices know that they shall do the exact same movement like the node) therefore the mesh is outside the dummy object. Your models aren´t rigged, therefore they must be an child of the Dummy object)


5. delete the destroyer mesh (NiTriShape - RMB - blcok - remove branch)

6. Adjust the position of the effect dummies in the nif to match your model (eg: EFFECT_Death_Explosion, EFFECT_GatlingFire_Left)

7. Save nif (link to this nif)

the important step is between 3 and 4, you copy your mesh in the destroyer.nif (more or less you only exchange the mesh in the nif)

edit: attached both models copied, you only have to adjust the position of the effect nodes (only the two nif are in the zip)
 

Attachments

Back
Top Bottom