STEAM 组
Blender Source Tools BleST
STEAM 组
Blender Source Tools BleST
324
游戏中
2,033
在线
成立于
2013 年 11 月 8 日
所有讨论 > Help > 主题详情
Wolƒe Strider 2021 年 1 月 16 日 上午 6:12
Bones being rotated at weird angles after export
I can't figure out why but after I exported this modified model the bones are rotated in weird directions, I've done this before with another model and it didn't cause me problems

Here's the model source file:
https:// mega.nz /file/ZHJlFazQ#Fx6uHHXBNXsPjhubpBTid7mdV0akcMAO9jNoqGBp0aM
(Just remove the spaces^)

Also the left one is what it is supposed to look like and the right one is what got exported:
https://imgur.com/a/eTxvXiu
最后由 Wolƒe Strider 编辑于; 2021 年 1 月 18 日 上午 3:01
引用自 Pte Jack:
Ok, test one, (using the Studiomdl.exe from SFM), I removed the $Definebone statements and compiled your SMDs and got this in SFM.

https://i.imgur.com/8KlrQxi.png

https://i.imgur.com/t05u7sK.png

https://i.imgur.com/Vlzy4f0.png

Everything looks fine in SFM (unless I'm missing something). I'll compile for GMod a little later as I have to go out right now.
< >
正在显示第 1 - 12 条,共 12 条留言
Pte Jack 2021 年 1 月 16 日 上午 9:51 
Looks like you're exporting DMX files (I'm assuming).

If your Mesh object has the same name as the bone that controls it, the model is going to pooch out and the mesh is going to be extruded and rotated differently than it looks in Blender when compiled, This is some sort of bug (not sure if it's within the export of the DMX or the actual Studiomdl compiler screwing up.)

For example. https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1959841658

See how the face of this character is pulled away from the model in that picture. That is because the mesh object that was exported was named head (it created a DMX file called head.DMX) and the bone that it was weight painted to was also named head.

Check your model in Blender and see if this is the case for you. The easy fix is to start using prefixes on your bone names like bip_ or twst_ or hlp_ or def_ or att_ or weyw_
(In my case I look at these identifying what they do, like:
bip = bone in place or biped bone
twst or adj = Twist or adjustment bone
hlp = helper bone
def = deform bone
att = attachment bone
weyw = whatever you want for a prefix to a bone name)

This will ensure that the mesh object and the bone names will never be the same and you won't have this problem when you export DMX files.
最后由 Pte Jack 编辑于; 2021 年 1 月 16 日 上午 9:53
Wolƒe Strider 2021 年 1 月 16 日 下午 8:31 
I am not exporting in DMX files and every time I rename a bone it renames the vertex group anyway
Pte Jack 2021 年 1 月 17 日 上午 7:37 
Vertex groups should have the same names of the bones that are deforming the mesh that is weight painted to them. If they didn't, then the model would not move.
Wolƒe Strider 2021 年 1 月 17 日 下午 4:48 
Yeah I know, I just got confused between mesh object and vertex mesh. Anyway I'm still unsure what is going on with my model, any ideas?
Pte Jack 2021 年 1 月 17 日 下午 10:29 
I would have to actually examine it to give any further advice.
Wolƒe Strider 2021 年 1 月 18 日 上午 3:14 
Whoops, apparently Steam removed my link in my first post, check there you'll see the model source file
Pte Jack 2021 年 1 月 18 日 上午 6:15 
The model appears to be weight painted properly, however (just an observation) you do have some weirdness happening on what looks to be 4 - 8 verts painted to the window and root bone that extrudes something from behind and above the seat. If these are supposed to be rods of some kind then you have to paint them better to get the proper effect .

https://i.imgur.com/WnAN0kD.png

https://i.imgur.com/wNS308r.png

One other thing I did notice is that your Physics mesh (the collision model) is only painted to the root bone, I think the Window and the support collisions need to be painted to the proper bones.. (especially for GMod) ??

https://i.imgur.com/afxNrf5.png

Let me compile this a couple of different ways and see if I'm seeing this twisted bone problem. I may ask for the compiled model your' having problems with if I can't reproduce the problem.

I'm assuming from your picture you are compiling for SFM and or Garry's Mod??

最后由 Pte Jack 编辑于; 2021 年 1 月 18 日 上午 6:32
该讨论串的作者已表示此帖子解答了原先的主题。
Pte Jack 2021 年 1 月 18 日 上午 7:10 
Ok, test one, (using the Studiomdl.exe from SFM), I removed the $Definebone statements and compiled your SMDs and got this in SFM.

https://i.imgur.com/8KlrQxi.png

https://i.imgur.com/t05u7sK.png

https://i.imgur.com/Vlzy4f0.png

Everything looks fine in SFM (unless I'm missing something). I'll compile for GMod a little later as I have to go out right now.
Pte Jack 2021 年 1 月 18 日 上午 9:16 
Yeah, I'm not seeing an issue in GMod either ( other than that weight painting issue in the cockpit I mentioned earlier and again, unless I'm missing something here.)
This is your SMDs compiled using the GMod version of Studiomdl. The only difference being
is that I commented out the $definebones statements.

Model, Hitboxes, Phy mesh and bones look good in HLVM

https://i.imgur.com/DM6MD6F.png

I've used the Advanced bone tool to extend the 3 support legs and rotate the cockpit cover.

https://i.imgur.com/hCkVjTN.png

https://i.imgur.com/X3J3rZP.png

https://i.imgur.com/6RDULa1.png
最后由 Pte Jack 编辑于; 2021 年 1 月 18 日 上午 9:24
Wolƒe Strider 2021 年 1 月 18 日 下午 7:13 
Yes that is perfect! (and yes this is for Garry's Mod) Yeah sorry I guess this is just me being completely new to the Blender and Source modeling scene. Thank you so much for the help, hugely appreciated. Although I do have a few questions, I thought you needed $definebones for the bones to work. Also why do would you weight paint the physics mesh, I thought the physics model wouldn't update anyway
最后由 Wolƒe Strider 编辑于; 2021 年 1 月 18 日 下午 7:16
Pte Jack 2021 年 1 月 18 日 下午 7:25 
THe physic mesh is what is used to have things bump into stuff. if it isn't painted properly then it can't interact with the universe you're using it in. So, if you open the cockpit and the cockpit phys mesh does't move, then a model can't get into the machine but can walk up over the cockpit and through the open canopy.

The only time you need define bones is if you want bone in the model that don't have mesh weight painted to it (like weapon bones). Also, if you define bones, then you have to define all the bones you want to have in the model.
Wolƒe Strider 2021 年 1 月 18 日 下午 7:54 
Yup all I had to do was remove define bones and everything worked like a charm, thanks a lot!
< >
正在显示第 1 - 12 条,共 12 条留言
每页显示数: 1530 50

所有讨论 > Help > 主题详情
发帖日期: 2021 年 1 月 16 日 上午 6:12
回复数: 12