Help on Blender about sfm2xps bones
Moderators: ObscureMemories, Runa, Love2Raid
Help on Blender about sfm2xps bones
Hi
I am working on porting a sfm model to xps. the model was loaded into blender.
when I tried to export it to xps using johnzero7's script(http://johnzero7.deviantart.com/art/Ble ... -490662931)
it basically works. and I can fix the texture in XPS. but the bones does not maintain the hierarchy as expected.
bones in blender bones in XPS I dont know how to fix the bone hierarchy. Please help me...
I am working on porting a sfm model to xps. the model was loaded into blender.
when I tried to export it to xps using johnzero7's script(http://johnzero7.deviantart.com/art/Ble ... -490662931)
it basically works. and I can fix the texture in XPS. but the bones does not maintain the hierarchy as expected.
bones in blender bones in XPS I dont know how to fix the bone hierarchy. Please help me...
You do not have the required permissions to view the files attached to this post.
Re: Help on Blender about sfm2xps bones
EDIT: Oi, Semory, list bullets don't work?
EDIT2: parenting hierarchy =/= naming hierarchy in XPS. Don't worry, you don't screw parenting by renaming bones.
To maintain alphabetical hierarchy bones need standardized XNALara naming. Exporting scripts can't do that, because every game has its own naming, and scripts can't simply cover every game out there.
In other words, you have to do renaming yourself, there's three ways to do it ((not including renaming within Blender of course)) I'm sure one of us made numerous of such posts on the forums already, but I'm too lazy to search).
1st way (the old way we did it) is to export your model from Blender in mesh.ascii format. It's uncompressed format you can open in any text editor, where you will see the bones table on the beginning of the file (L2R breaks down its contents nicely here). You can rename bones there. You can hide useless bones by adding "unused" on the beginning of the bone name.
2nd way is to rename bones within XPS (via Modify>Rename bone names, then sloooowww double click on a bone on the list to rename). You can also hide unused bones. Remember to save your model after all that.
3d way assures you have a bones list saved for future models from the same game so that XPS will rename them for you on the fly.
As for the general bones names: download and open few humanoid models from this forum to see examples. I'm adding an absolute basic list below, but many models have adjusting bones or bones for attachments between main joints, many can not have bones listed below, so you have to be flexible here, but it's generally up to you and what you're comfortable with.
EDIT2: parenting hierarchy =/= naming hierarchy in XPS. Don't worry, you don't screw parenting by renaming bones.
To maintain alphabetical hierarchy bones need standardized XNALara naming. Exporting scripts can't do that, because every game has its own naming, and scripts can't simply cover every game out there.
In other words, you have to do renaming yourself, there's three ways to do it ((not including renaming within Blender of course)) I'm sure one of us made numerous of such posts on the forums already, but I'm too lazy to search).
1st way (the old way we did it) is to export your model from Blender in mesh.ascii format. It's uncompressed format you can open in any text editor, where you will see the bones table on the beginning of the file (L2R breaks down its contents nicely here). You can rename bones there. You can hide useless bones by adding "unused" on the beginning of the bone name.
2nd way is to rename bones within XPS (via Modify>Rename bone names, then sloooowww double click on a bone on the list to rename). You can also hide unused bones. Remember to save your model after all that.
3d way assures you have a bones list saved for future models from the same game so that XPS will rename them for you on the fly.
- open your model in XPS and go to Modify>Create Bone Names List (or Ctrl+Shift+S). A window pops up for direction to save your bones list.
- open the file you created and you'll see name strings separated with ; symbol, the strings on the left are original names, the right ones are renamed by the program (lower case, no underscores, no special symbols, which is general rule for XPS bone naming). In other words the names on the right are the ones you want to change/mark as unused (the same way as in the 1st way).
An example of renaming from Japanese naming convention:koyu1_l;arm left finger 5 a
koyu2_l;arm left finger 5 b
koyu3_l;arm left finger 5 c - After you're done, open your XPS directory, you will find BoneDict.txt, open it.
- Paste your renamed bones into this document. You can place numerous lists there (I generally have all lists from every game I converted so far), if you need to comment out something, simply put # symbol on the beginning of the line. Save, launch XPS, open your model.
As for the general bones names: download and open few humanoid models from this forum to see examples. I'm adding an absolute basic list below, but many models have adjusting bones or bones for attachments between main joints, many can not have bones listed below, so you have to be flexible here, but it's generally up to you and what you're comfortable with.
root ground
root hips
pelvis
leg left thigh
leg left knee
leg left ankle
leg left toes
leg right thigh
leg right knee
leg right ankle
leg right toes
spine lower
spine upper
head neck lower
head neck upper
head jaw
head tongue 1
head tongue 2
head cheek left 1
head cheek left 2
head cheek right 1
head cheek right 2
head nostril left
head nostril right
head eyeball left
head eyeball right
head eyelid right both
head eyelid right upper
head eyelid right lower
head eyelid left both
head eyelid left upper
head eyelid left lower
head eyebrow right 3
head eyebrow right 2
head eyebrow right 1
head eyebrow left 1
head eyebrow left 2
head eyebrow left 3
head mouth corner right
head mouth corner left
head lip upper right
head lip upper middle
head lip upper left
head lip lower right
head lip lower middle
head lip lower left
arm left shoulder 1
arm left shoulder 2
arm left elbow
arm left wrist
arm left finger 1a
arm left finger 1b
arm left finger 1c
arm left finger 2a
arm left finger 2b
arm left finger 2c
arm left finger 3a
arm left finger 3b
arm left finger 3c
arm left finger 4a
arm left finger 4b
arm left finger 4c
arm left finger 5a
arm left finger 5b
arm left finger 5c
arm right shoulder 1
arm right shoulder 2
arm right elbow
arm right wrist
arm right finger 1a
arm right finger 1b
arm right finger 1c
arm right finger 2a
arm right finger 2b
arm right finger 2c
arm right finger 3a
arm right finger 3b
arm right finger 3c
arm right finger 4a
arm right finger 4b
arm right finger 4c
arm right finger 5a
arm right finger 5b
arm right finger 5c
Last edited by Ems on Sat Dec 03, 2016 1:39 am, edited 1 time in total.
Re: Help on Blender about sfm2xps bones
thank u very much.
I am new to XPS, and not English speaking. So it is difficult for me to find useful info in old posts.
I will try it.
I am new to XPS, and not English speaking. So it is difficult for me to find useful info in old posts.
I will try it.
Re: Help on Blender about sfm2xps bones
As for the general bone names:Ems wrote:...
As for the general bones names: download and open few humanoid models from this forum to see examples. I'm adding an absolute basic list below, but many models have adjusting bones or bones for attachments between main joints, many can not have bones listed below, so you have to be flexible here, but it's generally up to you and what you're comfortable with.
root ground
root hips
pelvis
...
- My way is to create an absolute basic list within XPS via (or Alt+P)
Code: Select all
Commands->Run pose script
- After you're done, open your XPS directory, you will find , open it.
Code: Select all
MissingBones.txt
Re: Help on Blender about sfm2xps bones
Thank you all for your advice.
Now I think it is ready for release.
Now I think it is ready for release.
You do not have the required permissions to view the files attached to this post.
- semory
- Site Admin
- Posts: 7755
- Joined: Sat Aug 04, 2012 7:38 pm
- Custom Rank: Kitty pu tu tu lay!
- Location: Torrance, CA
Re: Help on Blender about sfm2xps bones
Hi Ems,Ems wrote:EDIT: Oi, Semory, list bullets don't work?
I think they do but I forget how they work in phpBB.
Testing...
- apples
- oranges
- pears
Code: Select all
[list]
[*]apples
[*]oranges
[*]pears
[/list]
Re: Help on Blender about sfm2xps bones
Awesome, stupid me, thanks.
Also
Also
Looking good! Glad I could help.navie wrote:Thank you all for your advice.
Now I think it is ready for release.
Re: Help on Blender about sfm2xps bones
Oh I think I have another question.Ems wrote:Awesome, stupid me, thanks.
Also
Looking good! Glad I could help.navie wrote:Thank you all for your advice.
Now I think it is ready for release.
When I exported the model from Blender, I did not pay attention to the difference of axis system of XPS and Blender. So it ends up that the model in XPS was not front facing when loaded.
It's not a big problem if you just pose with this model, you only have to rotate the root until it is front facing(about -90 degrees). But if you want to re-use a pose you save for other models, it won't work because the X-Y axis difference.
How can I fix this without starting all over again from exporting from Blender? I mean it really took me a lot of time in fine tuning the material in XPS. I don't want to do it again.
Re: Help on Blender about sfm2xps bones
If you plan to use the model only in XPS, you can pose it so that it faces the camera properly then export via Modify>Save Generic_Item with the "modify armature according to the current pose" option checked.
All the poses you've done so far for this model will be probably useless, though you can modify them by hand (.pose files can be edited in text editors) to swap some letters and numbers, I never bothered with that though.
A tip, you can rotate models in Blender pre-export, then select all (A) > ctrl+a > "Location" to save the position.
Importing the model back from XPS to Blender (in case you'd need to do that someday) should not break your materials, unless you start to mess with mesh names. Any lack of a parameter in a mesh header (that is ignored by the Blender exporter btw) will cause an error while importing to XPS and you might need to use the material editor in XPS again. Ah, and total lack of specified render group will cause invisible meshes in XPS, too. Just FYI.
All the poses you've done so far for this model will be probably useless, though you can modify them by hand (.pose files can be edited in text editors) to swap some letters and numbers, I never bothered with that though.
A tip, you can rotate models in Blender pre-export, then select all (A) > ctrl+a > "Location" to save the position.
Importing the model back from XPS to Blender (in case you'd need to do that someday) should not break your materials, unless you start to mess with mesh names. Any lack of a parameter in a mesh header (that is ignored by the Blender exporter btw) will cause an error while importing to XPS and you might need to use the material editor in XPS again. Ah, and total lack of specified render group will cause invisible meshes in XPS, too. Just FYI.
Re: Help on Blender about sfm2xps bones
navie wrote:Thank you all for your advice.
Now I think it is ready for release.
model in blender
model in XPS
navie wrote:Oh I think I have another question.
When I exported the model from Blender, I did not pay attention to the difference of axis system of XPS and Blender. So it ends up that the model in XPS was not front facing when loaded.
It's not a big problem if you just pose with this model, you only have to rotate the root until it is front facing(about -90 degrees). But if you want to re-use a pose you save for other models, it won't work because the X-Y axis difference.
...
XNA/Directx Handedness orientation!Ems wrote:If you plan to use the model only in XPS, you can pose it so that it faces the camera properly then export via Modify>Save Generic_Item with the "modify armature according to the current pose" option checked.
...
Right, but the model is not just rotated 90 degree along the Y-axis!
The model is also mirrored, because XNA Uses a right-handed coordinate system.
- Forward is -Z, backward is +Z. Forward points into the screen.
- Right is +X, left is -X. Right points to the right-side of the screen.
- Up is +Y, down is -Y. Up points to the top of the screen.
- Commands->Mirror Model Z .... (or Commands->Mirror Model X)
- Rotate "root ground" bone along Y-axis
- Modify>Save Generic_Item with the "modify armature according to the current pose" option checked.