STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
271
IN-GAME
1,787
ONLINE
Founded
November 8, 2013
All Discussions > Help > Topic Details
Pinay Mar 16, 2021 @ 4:18am
How to export armature changes (blender to SFM) ??
I have these already made models that I want to change the bone orientation for hair and cloth to make them jiggle bones.
The problem is that no matter in what position I move them or rotate them when I export the model it doesnt save the changes and when I import it back in SFM the bones are in the original position / orientation.
How can I fix this problem ??
< >
Showing 1-10 of 10 comments
xdshot Mar 16, 2021 @ 5:05am 
Remove $definebones in qc
Pinay Mar 16, 2021 @ 6:28am 
Originally posted by xdshot:
Remove $definebones in qc
Didnt work
Pte Jack Mar 16, 2021 @ 6:47am 
are you defining the jiggles in the QC properly? And do you have the same model in a folder with a higher priority that is loading instead of the one your think you/re loading? Try changing the $modelname statement to a different name on your next compile to see if you have multiples.
Pinay Mar 16, 2021 @ 7:07am 
Originally posted by Pte Jack:
are you defining the jiggles in the QC properly? And do you have the same model in a folder with a higher priority that is loading instead of the one your think you/re loading? Try changing the $modelname statement to a different name on your next compile to see if you have multiples.

The jigglebones work properly, the reason i want to change their orientation is because they are unnaturally placed (right side of the model pointing up, left side pointing down)
They create unnatural jiggle movement and i want to change that to something more natural flowing.

This is one example for a bone
$jigglebone "hair_00"
{
is_flexible {
yaw_stiffness 150
yaw_damping 5
pitch_stiffness 150
pitch_damping 5
tip_mass 50
length 20
angle_constraint 20
}
}

I even used predefined jiggle text from a proper working model but they still move to their orientation from blender

This is how they look in blender
https://media.discordapp.net/attachments/646920066331574287/821078740162314250/pic_1.jpg?width=1334&height=596

This is what i did in blender
https://media.discordapp.net/attachments/646920066331574287/821079101582082108/pic_2.jpg?width=1353&height=596

No matter what I do or try when I import it back in SFM they revert back to the original bone orientation
Pte Jack Mar 16, 2021 @ 7:42am 
What are you expecting to see in SFM, or what is it you think is wrong in SFM? Do they not fall back into place it you move the playhead in SFM, or distort out of control? (screen shot of that would help)

And are you saying that, (as an example) initially the bones were pointed downward, you rotated them in edit mode in blender 90 degrees, exported and recompiled the model. On load in SFM the bones are still pointed downward and on decompile of that SFM model and re import into Blender the bones are pointed downward again?

Also, do you have any animations attached to the model in Blender (or not using a new ref animation based on the new positions as a sequence) in the build QC?
Last edited by Pte Jack; Mar 16, 2021 @ 7:51am
Pinay Mar 16, 2021 @ 8:18am 
Here is what happens
https://www.youtube.com/watch?v=YqSns_pBJrw

They dont move naturally, and i assume the cause is their orientation
I want the bones to move like the 2 models at the end
As mentioned, I even used the jigglebone texts from the red hair one and they still move like this, unnaturally

Here is how they look in SFM
https://sta.sh/0y49ei5vmrw

This is a complete step by step of what I do :
1. decompile model
2. imported .smd in blender
3. rotated bones in edit mode
4. In pose mode selected all bones
5. pressed i, created keyframe with location,rotation,scale
6. exported .smd and skeleton
7. wrote QC jiggle bones
8. recompile model

4a. at some point during many tries i edited the bone orientation too but no results
EDIT: Maybe i did a poor job, since i never used blender before this
And when I deleted the $definebones as mention by someone else it destroys the model in SFM

EDIT 2 : I did what you said, i decompiled the edited model and its a real mess
The bones reverted back to their original positions
https://sta.sh/022mlif0fhjp

I did this with a clean work place, deleted all the files inside the folders where i decompile and recompile
Last edited by Pinay; Mar 16, 2021 @ 9:18am
Pte Jack Mar 16, 2021 @ 6:26pm 
I'm thinking that you might be right about the orientation of the edited bones.

This is a picture of how bone react to jiggles from the dev wiki You now have the z axis of the bone pointed forwards and backwards instead of along the length of the hair they're deforming.

https://developer.valvesoftware.com/wiki/$jigglebone#/media/File:Jigglebone.png

looking at the GIF I'm going to assume, that the first model in the gif is the original that you decompiled before making the bone changes because it looks nothing like what you got back from the decompile of the changed model you had in Blender and the jiggles look correct (for SFM)?

And the one in the last picture is your the import of decompile after the compile with the changes you made?

Did you reuse the QC from the original decompile and just change the jiggle information?

Also, when you imported the first SMD (step 2), did you have import animations checked on in Blender Source Tools and did it bring in a ref or idle animation? You need to edit from a clean model, no animations.

Between step 3 and 4, I (personally) would select everything (including the armature) in object mode and apply all transforms. (Just in case).

Pinay Mar 17, 2021 @ 2:34am 
Originally posted by Pte Jack:
I'm thinking that you might be right about the orientation of the edited bones.

looking at the GIF I'm going to assume, that the first model in the gif is the original that you decompiled before making the bone changes because it looks nothing like what you got back from the decompile of the changed model you had in Blender and the jiggles look correct (for SFM)?

And the one in the last picture is your the import of decompile after the compile with the changes you made?

Did you reuse the QC from the original decompile and just change the jiggle information?

Also, when you imported the first SMD (step 2), did you have import animations checked on in Blender Source Tools and did it bring in a ref or idle animation? You need to edit from a clean model, no animations.

Between step 3 and 4, I (personally) would select everything (including the armature) in object mode and apply all transforms. (Just in case).

I managed to make some progress, i start answering your questions first:
Yes, the video is the model with added jiggle bones in QC and no blender work
Yes, the last picture is the recompiled model that i edited in blender and then decompiled and reimported in blender
^ I suspect it draws the bone info from the ragdoll.smd, which i never edit or replace

Today I managed to make some progress:
https://www.youtube.com/watch?v=0rhtZmNxe9w

Finally, it saved my changes ...its not perfect and still needs work but I think im getting there. I will elaborate more now

1. I opened the .smd file in blender
2. Rotated the bones 90*
3. In object mode I selected the mesh and skeleton and did "apply all transforms"
4. In pose mode selected all bones, pressed i, created keyframe with location,rotation,scale
5. Exported all
5a. Model comes out broken in SFM
6. I deleted all $definebones in QC file
6a. Model comes out broken in SFM
7. In QC i replaced the $sequence "nepgear_anims\ragdoll.smd" with $sequence "nepgear_anims\Nepgear_skeletonAction.smd" (this is what blender exports)
8. Model finally works in SFM but some bones still behave unnatural as you can see in the video

NOT ALL BONES tho, the yellow scarf and front hair move as expected
The side hair, back hair and skirt still move bad and the same direction as movement
I highly think its not enough to rotate the bone, i think its useless anyway.
I need to change the AXES of the bone

This is a pic of the AXES of bones, the one in the selection box is the front hair that works properly
https://sta.sh/0t5zgaejab7

This is a side pic of the yellow scarf
https://sta.sh/021mimfs1158

This is a side pic of the back hair
https://sta.sh/0jb7cdtwpug

Front hair and scarf bone AXES point front and down
The back hair bone AXES point back and up
The other bones in side hair, skirt point in all manner of random direction

Is there a quick way to select the bones and set their AXES to match scarf (front and down)

IMPORTANT NOTE : Please understand that this is my first time using blender
Initially I thought this would be an easy job to add jiggle bones in the QC file as seen in a 2011 tutorial. But since they didnt move naturally I decided to dig a little more and see if I could fix it. I got overwhelmed and now paying the price.

I dont know keyboard shortcuts, what buttons do what and why or how to check if blender source tools imports animation (when you asked me). I hope you understand.


Last edited by Pinay; Mar 17, 2021 @ 3:13am
Pte Jack Mar 17, 2021 @ 3:00pm 
Moving forward and backwards, in the video, it looks like you may have the jiggle values reversed (result of your bone rotations??) same for the left right.

But, remember that SFM is not going to render the actual jiggle movement when just moving the model around in an edit mode. SFM does not real time render. It's only a 32bit program and it's not fast enough for real time. You may have to actually produce a clip to MP4 and watch that for analysis of how they're actually jiggling.
Pinay Mar 18, 2021 @ 1:28pm 
Originally posted by Pte Jack:
Moving forward and backwards, in the video, it looks like you may have the jiggle values reversed (result of your bone rotations??) same for the left right.

But, remember that SFM is not going to render the actual jiggle movement when just moving the model around in an edit mode. SFM does not real time render. It's only a 32bit program and it's not fast enough for real time. You may have to actually produce a clip to MP4 and watch that for analysis of how they're actually jiggling.

I have no idea what you are talking about.

Yes, the problem was with the bone rotations. I went back into blender rotated them properly and now everything works flawlessly. Exactly as I wanted them.
I already fixed 6 out of my 9 models and I am very happy with the results. Will finish the rest tomorrow.
Last edited by Pinay; Mar 18, 2021 @ 1:28pm
< >
Showing 1-10 of 10 comments
Per page: 1530 50

All Discussions > Help > Topic Details