Stretching Bones in Basepose [Solved]

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Stretching Bones in Basepose [Solved]

Post by jedimoose32 »

Hi,

I'm trying to tweak the basepose for my unit skeleton so that it fits my unit a bit better. Mostly I just need to make the clavicles less broad. MandeRek says in this topic that if you just generate a new basepose with the new proportions then everything should work fine as long as you don't rename or delete/add bones or nulls. I made a test unit and tried this approach by changing the bone length in the bone's properties page. I exported and put the basepose/unit in game and nothing seems to have changed. When I munge the animation do I have to include all of the animations for the unit as well, or can it be just the basepose? Based on what MandeRek says, and based on the way some of the stock units are set up (e.g. Jawas), I should only have to do the basepose. So any idea why it isn't working?
Last edited by jedimoose32 on Thu Mar 10, 2016 12:28 am, edited 1 time in total.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Stretching Bones in Basepose

Post by thelegend »

If you want to have a custom skeleton for you character then you will need to export the basepose and munge a new zaabin (or zafbin) file (Have forgotten the exact name; just the file where the skeleton is munged in). Then you'll need to add the following lines into your character's odf to let the game know, which skeleton your character has to read:

Code: Select all

SkeletonName            = "SkeletonName"
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Stretching Bones in Basepose

Post by jedimoose32 »

Yep, I already did that. The changes still don't show up.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Stretching Bones in Basepose

Post by thelegend »

I honestly must say I never had to change the actual basepose before. But as far as I know to add a new skeleton you would have to export the new basepose at frame 0-1, munging it and adding it as normally. Did you make sure you Keyed all bones before exporting? Also what about a manual SIDE clean?
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Stretching Bones in Basepose

Post by jedimoose32 »

Everything is keyed correctly. And I didn't accidentally key any nulls. Just did a manual side clean as well and that didn't work. Do I need to scale the bones instead of modifying the length?
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Stretching Bones in Basepose

Post by thelegend »

jedimoose32 wrote:Everything is keyed correctly. And I didn't accidentally key any nulls. Just did a manual side clean as well and that didn't work. Do I need to scale the bones instead of modifying the length?
I never saw scaled animations before in Battlefront II but yes, in order to apply any changes you need to rotate, scale or transform them manually. In modifying the lenght..did you mean just changing the display size? I believe I misunderstood something from your first post. I am sorry for that.
Anyway you will need to scale them by X,Y or Z (Best all of them at once) in order to make any changes to your character's skeleton.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Stretching Bones in Basepose

Post by jedimoose32 »

What I did originally (what I said in the first post) is select the bone, press Enter to bring up the properties view for that object, and change the length of the bone. Instead of using X to scale it. From other threads on the site I thought maybe that was the best way to proceed. Anyway I tried scaling it like you said and that still didn't work. I'm really confused. :?
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Stretching Bones in Basepose

Post by Anakin »

I made a new basepose for the swbf3 units. I never did it before, too. So maybe you find your answer in my question thread http://www.gametoast.com/viewtopic.php?f=36&t=31887

Do not scale with x,y,z!!

You need to use the properties. Best is you import the bones template, make it fit to your unit, export the basepose, munge the animation (skeleton) and add it to the odf.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Stretching Bones in Basepose

Post by jedimoose32 »

I followed what you said (and what Ace said in your thread) and here is the result:
Image

Basically I just experimented by making the right arm really long, and made the bones match the length. But as you can see in the screenshot, once it's in-game the bones go back to being normal length and obviously that pulls the enveloped points in a strange way. (Please ignore the terrible model and texture, as I said this is just a model for the purpose of testing without messing up my nice model).

Edit: To be more precise, here is what I did...
0. Clean everything
1. Remove all keys from the skeleton
2. Adjust bone lengths
3. Set envelope and fix weights
4. Key skeleton
5. Export basepose (frames 0-1, keys on both frames, Export Animation selected)
6. Munge basepose
7. Add SkeletonName = "nameofzaf" to the unit's .odf
8. Munge everything

And still no luck!
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Stretching Bones in Basepose

Post by AceMastermind »

jedimoose32 wrote:7. Add SkeletonName = "nameofzaf" to the unit's .odf
Is nameofzaf the actual name of your munged basepose.msh?

It's difficult to say what might be wrong without seeing what you've done, maybe post your ODF and your scene.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Stretching Bones in Basepose

Post by jedimoose32 »

AceMastermind wrote:Is nameofzaf the actual name of your munged basepose.msh?
Yep. The name of the animation folder (and in the .bat for that folder) is "tstanim". And that is what's referenced by SkeletonName. The basepose is of course called basepose.msh and it is the only .msh in the tstanim folder.

Here are my scene files. The first (female_templatetest) is just the model with skeleton. The second (female_templatetestanim) is the basepose. I've also included the odf file for the unit so you can have a look, but I'll also copy that at the bottom of this post.
By the way my .zafbin file is 113 kb.

ODF
Hidden/Spoiler:
[code]
[GameObjectClass]
ClassParent = "yuv_inf_default"
GeometryName = "tst.msh"
[Properties]
GeometryName = "tst"
GeometryLowRes = "tst"
SkeletonName = "tstanim"
UnitType = "assault"
AnimationName = "kiadimundi"

MaxHealth = 550.0

MaxSpeed = 6.0 // base forward speed
MaxStrafeSpeed = 4.5 // base right/left speed

WEAPONSECTION = 1
WeaponName = "yuv_weap_inf_coufee"
WeaponAmmo = 0


VOUnitType = 121
[/code]
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3284
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Stretching Bones in Basepose

Post by AceMastermind »

The name of the animation folder (and in the .bat for that folder) is "tstanim". And that is what's referenced by SkeletonName. The basepose is of course called basepose.msh and it is the only .msh in the tstanim folder.
Just an FYI, the folder name doesn't matter, you could leave it named template if you wanted.
Only what you enter in the munge.bat determines the munged output location and name of the zafbin file.

Before I go digging into the scene I see in your ODF where you're using SkeletonName and AnimationName at the same time, you should just use SkeletonName. You could just toss your custom basepose.msh in with Ki-Adi-Mundi's animations and munge them together.
jedimoose32
Field Commander
Field Commander
Posts: 938
Joined: Thu Jan 24, 2008 12:41 am
Projects :: Engineering Degree
Location: The Flatlands of Canada

Re: Stretching Bones in Basepose

Post by jedimoose32 »

Ah, I didn't realize that was a conflicting parameter. Guess what - I removed AnimationName and that fixed it. Such a simple solution to a frustrating problem.

You saved me again!
Hidden/Spoiler:
Image
:D
Post Reply