PDA

View Full Version : Problem with a model



Monkwarrior
06-01-2008, 17:56
Hi.
I'm trying to convert some units from Iberia Total War (for RTW) to M2TW.

Thanks to Luciano B I was able to tranform some infantry units, but I've found a problem when transforming a cavalry unit.

It is a unit with javelin as primary weapon and spear as secondary one, a combination that doesn't exist in M2TW. Once inserted in game, the unit looks like this:
https://i67.photobucket.com/albums/h292/Monkwarrior/ITW_2_M2TW/turdet_jinetes.jpg

The aspect is normal when using primary weapon, but when using secondary one, I've detected this problem:
https://i67.photobucket.com/albums/h292/Monkwarrior/ITW_2_M2TW/turdet_jinetes_problema3.jpg

Spear are not linked to right hand, but "floating" over the rider. Moreover, this position is not fixed, as a simple camera movement produces this other image:
https://i67.photobucket.com/albums/h292/Monkwarrior/ITW_2_M2TW/turdet_jinetes_problema2.jpg

I've checked one million times that the spear is linked to the weapon bone, as the javelin, and in the same way as other cavalry units carry spears.

Can it be a problem of being a secondary weapon?
These are the lines in battle_models.modeldb:

15 MTW2_HR_Javelin
13 MTW2_HR_Lance 2
23 MTW2_HR_Javelin_Primary
14 fs_test_shield 2
18 MTW2_Lance_Primary
14 fs_test_shield

Any idea? :help:

FactionHeir
06-01-2008, 17:59
Check Reiters.
Those guys use pistol as primary and spear as secondary.
So a merge of Jinetes and Reiters is what you are looking for.

Monkwarrior
06-02-2008, 22:50
Reiters have also the spear attached to weapon bone.

Thanks to KnightErrant (thanks again mate :2thumbsup: ) I've tested by attaching the spear to right hand bone and.. voilĂ , the model works perfectly (although I still wonder why :dizzy2: ).

KnightErrant
06-03-2008, 04:41
My pleasure good sir! This does seem to be a recurring problem.
Some of CAs models do assign to the weapon bones, apparently
without harm in many cases. I just remember that Caliban warned
us about weird animation effects occuring when trying to do things
with any of the weapon or shield bones. JMRC and I saw this when we
actually tried to put in animation data for one of the weapon bones
to do slingers and saw floating weapons, or weapons that started with
the unit and then got left behind when the unit moved. That was the
only reason I suggested trying the assignment to bone_Rhand.

This is only speculation, but extra bones in general work ok, but there's
some left over mechanism in the game that was never fully implemented
(this is the speculation part) that makes any of the weapon or shield
bones not work right if you try to animate them. Or in this case, if
you simply want them to follow their parent, bone_Rhand, which they
SHOULD do if they were regular bones.

Monkwarrior
06-03-2008, 11:35
But for me, the most puzzling question is that I see the correct animation when merging the model (spear attached to weapon bone) with a MTW2_HR_Spear animation. :dizzy2: (thanks for your animation utilities :2thumbsup: )

In any case, do you recommend to attach ALL the weapons and shields to hand/elbow bones?

Cheers.

P.D.: any possibility of having the slinger animation? :listen: I must recognize I'm unable to modify any animation, and much less to add a new bone. :turtle:

KnightErrant
06-03-2008, 14:54
@Monkwarrior,

Yes, in Milkshape, Gmax, and Max you would never see anything strange.
To those animation engines the bone_weapons are simply children of
bone_Rhand and bone_shield, bone_shield01 are children of bone_Lhand
and everything works as you would expect. When we tried animating
bone_weapon by exporting it as an extra bone to a family of cas files, it worked
fine in Milkshape. We made it rotate around for the walk animation and
the spear (we did this on armored_sergeants) rotated just fine. The thought
was we would replace the spear with a bit of mesh for the sling and then
the sling would rotate but the hand would not, since the hand vertices
would be assigned to bone_Rhand. But when we put those animations
in the game we got the effect of the spears just floating away from the
models once they started walking.

This is why I believe there's something left over in the game engine that
recognizes the strings "bone_weapon", "bone_weapon01", etc. and interferes
with them operating in a normal fashion. Caliban's admonition to us was sort
of third hand, he said he remembered their animators seeing strange effects
when animating those bones so they dropped it.

Since many models do have weapons assigned to weapon bones and seem
to work alright I don't think you need to redo them, just remember when
you see funny things like the present problem you had that a possible
solution is reassigning to a regular bone.

Slings are sort of second on the list after fixing the seam problem for the
ms3dImportExporter script. Extra bones are one of those ticklish things where
you have to have a whole weekend to devote to the debugging because
you have to mod descr_skeleton.txt, the modeldb, and the EDU all at the
same time to get it to work.:wall: