Blender

Blender

[BLENDER TO SFM] Bones not appearing where they should in SFM
This is what I'm talking about: https://gyazo.com/2acf72e7a8d693a25315bc6a31285cdf
(the bones are for the wheels and should be in the wheels)
It's a lot more frustrating cause I knew the solution to this before but I forgot.
I set the LocRotScale for the bones in Blender and did the Ctrl+A Rotation and Scale thing. Yet it still shows up like that. Another thing that happens is even when I save the model in Blender at the scale I want, it shows up overly scaled when I open the file again (could it be cause of the rotation and scale appliance?): https://gyazo.com/d7f55d7f3249bfd767109df10ec94adb
The bones are also in the right locations in Blender, of course. How do I get the bones to be where they need to be in SFM?
Last edited by THN Productions; Oct 21, 2019 @ 2:12pm
< >
Showing 1-15 of 38 comments
still__alive Oct 21, 2019 @ 4:10pm 
Try applying the location to the bone too. Your post implies that you didn't do that, only the rotation and scale. Applying the location should get the bones to where they need to be in SFM.

I don't quite get your question about scale. I cannot reproduce any scaling errors as you seem to be describing them. I'd say if the scale still works in SFM, don't worry about it. If the scaling also changes in SFM then I think you might have to post better information about the process you undertake when this happens.
Pte Jack Oct 21, 2019 @ 5:34pm 
If the model has shape keys then you want to scal the model in Blender to the correct size. Using $scale in the QC will break the flexes.
still__alive Oct 21, 2019 @ 6:04pm 
Originally posted by Pte Jack:
If the model has shape keys then you want to scale the model in Blender to the correct size. Using $scale in the QC will break the flexes.

He seems to be saying that the scale is changing in Blender, automatically, after he saves and then reloads the file.

I don't think I've ever heard of this, and this is the only thing related I'm seeing with a quick search: https://blender.stackexchange.com/questions/21095/blender-not-saving-changes-to-objects-origin-point

I was wondering if there is some kind of conflict/mistake between the parenting and scaling of the bones and the mesh and maybe applying (or not) Rot/Loc/Scale. I've had, or seen someone else have, can't remember, weird issues before with some combination of those, but I wasn't able to break it with my quick tests and I'd have to spend a decent amount of effort in trying to reverse engineer this broken combination which I can't quite remember. Might've involved constraints or animation too, I can't remember.

I was also wondering if there is some kind of bug he's getting, or if he's making a mistake somehow and this rescaling isn't actually happening.

So my hope was that the scale still works once the model is brought into SFM, because if not it might be a more difficult issue to narrow down.
Pte Jack Oct 21, 2019 @ 8:33pm 
This is what I suspect is happening... https://steamcommunity.com/sharedfiles/filedetails/?id=1701792043

The Mesh objects are parented to the armature. If he were to unparent the mesh objects, I bet the mesh is going to JUMP in size and Blender will look pretty much like the SFM model.

When I model, I never parent mesh to bones. I leave them outside the armature collection. This way I have to select all objects when I scale in Blender and then all obkects retain their 1:1 relationship with the items being scaled.


Last edited by Pte Jack; Oct 21, 2019 @ 8:39pm
still__alive Oct 21, 2019 @ 9:16pm 
Originally posted by Pte Jack:
This is what I suspect is happening... https://steamcommunity.com/sharedfiles/filedetails/?id=1701792043

The Mesh objects are parented to the armature. If he were to unparent the mesh objects, I bet the mesh is going to JUMP in size and Blender will look pretty much like the SFM model.

Are you trying to address his 1st question, or his 2nd question?
Pte Jack Oct 22, 2019 @ 7:51am 
Both.

If you look at that picture, everything looks correct in Blender, however when the model is spawned in SFM, the armature is smaller than the mesh. This is because the transforms were different in Blender before exporting the model for compile.

Location:
All Objects must have there origin points in the same place.
The origin point will form the Root Transform in the SFM Model and is used to set the model on the floor of the map.
0,0,0 means that where these origin point are, then when the model is defaulted to the map in SFM, the model will rest at the map's default spawn point. and everything above the origin point (Root Transfer) will be above the floor.
If objects have origin points in different locations, when the model is defaulted in SFM, those objects will move to the default spawn point.
Applying the Transforms will set all origin points to 0,0,0 in Blender. If the model is off center from 0,0,0, the offset will be applied to the model when compiled and the model will spawn with that offset from the origin point in SFM.

Scale:
All objects (mesh and armature) must have the same scale.
If a mesh object is parented to the armature and the armature is scaled in object mode, the scale of mesh will appear to be 1 in the Tool data because it using the scale of the armature, BUT, the scale of the armature will be whatever the amount the armature was scaled. The scale relationship will be different between the armature and its child mesh objects.
When the model is exported for compile, the situation in the last picture will exist. Applying the transforms will reset everything so that the scale relationships will be 1:1..

Rotations:
Same thing applies to rotation, If the armature is rotated in Edit mode then fixed in Object mode to fit a mesh object, the Mesh may have a rotation of 0,0,0 but the armature may have a rotation of 90,90,180 (or whatever), when exported without the applying the transforms, the model will rotate off the armature when spawned into SFM. All rotations for mesh and armature should be 0,0,0 in object mode before exporting.

still__alive Oct 22, 2019 @ 12:19pm 
Originally posted by Pte Jack:
Both.

If you look at that picture, everything looks correct in Blender, however when the model is spawned in SFM, the armature is smaller than the mesh. This is because the transforms were different in Blender before exporting the model for compile.

Okay, I wasn't sure if you noticed that he had two questions there. I understand how what you are saying solves his first question, and I agree that is the solution.

I'm confused how what you're saying addresses his second question though. Maybe I'm misunderstanding his second question.

Originally posted by TimmyHeadNose:
Another thing that happens is even when I save the model in Blender at the scale I want, it shows up overly scaled when I open the file again (could it be cause of the rotation and scale appliance?): https://gyazo.com/d7f55d7f3249bfd767109df10ec94adb

I'm reading that part as he saves Blender, quits, and then when he reopens the Blender file later, the scale of his model has changed on him. If that is what he means, I don't think applying Loc/Rot/Scale will solve that. (@OP, nor would applying it be causing that) If I am reading him right, then there is something else going on there.

If he means it gets bigger in SFM, not Blender, then yeah, I agree with you that applying the location, rotation, and scale, to his mesh(s) and to his armature should solve both the bone being misplaced in SFM and the scale changing in SFM.

EDIT: One reason I think he means it is "magically" changing scale within Blender is he does say that he's applied scale and rotation. If true, then it probably shouldn't be changing scale once it hits SFM. Unless, he hasn't applied the scale to both the mesh and the armature.
Last edited by still__alive; Oct 22, 2019 @ 12:22pm
THN Productions Oct 22, 2019 @ 2:20pm 
For more information about the scaling thing, I simple applied the location, rotation etc. and closed Blender. The bones were all normal and everything was where it should be even when applying in Blender (I exported it after applying). Then, because it wasn't correct in SFM, I reopened blender and I saw this: https://gyazo.com/99f356fdb29916f67032ebc330ed4a64
The model was overly scaled, so I selected everything in object mode and scaled it down, this is how the bones looked like. https://gyazo.com/1dd986695dbea5f35f3654a7b94dcc67
Definitely not in the right position. I'll see about the solutions and other stuff you guys gave tomorrow.
still__alive Oct 22, 2019 @ 3:16pm 
Originally posted by TimmyHeadNose:
For more information about the scaling thing, I simple applied the location, rotation etc. and closed Blender. The bones were all normal and everything was where it should be even when applying in Blender (I exported it after applying).

So you applied Loc/Rot/Scale, exported your model, and then closed Blender without saving those changes? Or did you save them?

Also, did you apply Loc/Rot/Scale on every mesh and armature you are exporting? You probably should be, if you are not.

Originally posted by TimmyHeadNose:
I reopened blender and I saw this: https://gyazo.com/99f356fdb29916f67032ebc330ed4a64
The model was overly scaled, so I selected everything in object mode and scaled it down, this is how the bones looked like. https://gyazo.com/1dd986695dbea5f35f3654a7b94dcc67
Definitely not in the right position.

Every time you move, rotate, or scale an object in object mode and not edit mode, you are going to have to apply Loc/Rot/Scale again. If you go and scale and move stuff around again, in object mode, and don't apply Loc/Rot/Scale again before you export, then you probably will end up with issues related to the Loc/Rot/Scale of your model when you import it into another program.

That being said, applying those transforms, saving Blender, then opening the file later should not cause the scale of your stuff to change within Blender. The scale shouldn't be "magically" changing within Blender like that, unless you are taking some specific steps, like Pte Jack was describing, to make it happen. And when you do, that scale change should probably be happening right away, in front of you, not when you close and then reopen Blender.
Pte Jack Oct 22, 2019 @ 4:34pm 
Ctrl+S,
File - Save.
File - Save as

all play an important part of the operation. Blender does not automatically save a file when you close it.

You could have tried to reopen the last session or the last auto-save which may have had the changes you made, depending on if the autosave was turn on and the frequency it does its thing. Another option is if you had Auto Backups turned on and the number of backups you had set. Theses are the .blend1, .blend2 files you may find on your computer. Just remove the digit behind the .blend file extension to open it.


THN Productions Oct 23, 2019 @ 11:45am 
Yes, I make sure I save every time before I close Blender. I have no idea why the changes only happen after reopening. It seems to only happen when I apply the location, rotation and scale and not when I insert a keyframe (LocRotScale) for the bones.
Don't think I have any auto backup thing since I always open the actual blend file instead of any autosaves.
If needed I can send the blend file or record a video of it happening.
On the thread one of you linked about changes not being saved it talked about keyframes being a part of the problem so is it cause of that? The tutorial for porting I follow states it's necessary to keyframe the bones though, so idk...
still__alive Oct 23, 2019 @ 12:22pm 
Originally posted by TimmyHeadNose:
Yes, I make sure I save every time before I close Blender. I have no idea why the changes only happen after reopening. It seems to only happen when I apply the location, rotation and scale and not when I insert a keyframe (LocRotScale) for the bones.

Applying LocRotScale should not be causing this.

Originally posted by TimmyHeadNose:
On the thread one of you linked about changes not being saved it talked about keyframes being a part of the problem so is it cause of that? The tutorial for porting I follow states it's necessary to keyframe the bones though, so idk...

To animate you use keyframes, so if you are exporting an animated object you probably do want to use keyframes. However, if you keyframed the WRONG thing accidentally, then maybe a keyframe is part of the problem.

I just did a quick test. Took a cube, scaled it up, and keyframed the LocRotScale. I DID NOT apply the LocRotScale after scaling it up. Then I scaled the cube back to normal, saved the Blender file, quit, and reopened the file. So the scale at which I keyframed it was like 10, then after I scaled it back down, scale was 1, then I saved it.

Doing this causes the cube to jump back up to the large scaling that I keyframed, instead of the normal scale cube that I saved the file at. I feel the reason why this happens makes a lot of sense but might be hard to explain properly. Keyframing the scale at 10 is sort of a savepoint in and of itself. And the keyframe "save" overrides what you save after scaling back to 1 and saving the file. Thus when you reopen the file your object's scale gets set to the keyframe scale instead of what you thought you saved it as.

So I believe that if you've done your application of the LocRotScale and then the keyframing in the wrong order/combination, this could possibly lead to the jump in scale you see when you open your file the next time.

I'm not 100% sure on this though, I'm not super familiar with animating. I know enough about Blender and keyframing to be able to hop into it and tests things, but I'm far from fluent in keyframe animation - I'm not familiar enough with the process to be able to predict where things can go wrong. It is just a theory as to what your issue could be, it might not be what happened with your project. Could still be something other than a keyframe issue too.

Originally posted by TimmyHeadNose:
If needed I can send the blend file or record a video of it happening.

If you were willing to share your .blend file, that would probably be the easiest way for others to try and troubleshoot it.
Last edited by still__alive; Oct 23, 2019 @ 12:25pm
THN Productions Oct 23, 2019 @ 1:48pm 
Well it'd be strange if the keyframes caused it, since I never actually played any animation and always keyframe it at the first frame.
Here's the blend file:
https://www.mediafire .com/file/ho15n7voa0i0kg0/portingattempotTWO.rar/file
Just put the link together.
Apply rotation, location and scale and insert a keyframe for LocRotScale for the bones and then reopen blender and see what happens to your model.
If it doesn't happen, then it'd be great if you could record what you did (cause maybe you did something differently than me) and I can try your way (if you did it differently) myself and see if it works.
still__alive Oct 23, 2019 @ 1:56pm 
Originally posted by TimmyHeadNose:
Well it'd be strange if the keyframes caused it, since I never actually played any animation and always keyframe it at the first frame.
Here's the blend file:
https://www.mediafire .com/file/ho15n7voa0i0kg0/portingattempotTWO.rar/file
Just put the link together.

I'll take a look at it now. Does this file open with everything at the correct sizes?
THN Productions Oct 23, 2019 @ 2:15pm 
That is a backup save I made and it should open with everything correct, right before applying everything.
< >
Showing 1-15 of 38 comments
Per page: 1530 50

Date Posted: Oct 21, 2019 @ 2:12pm
Posts: 38