STEAM 组
Blender Source Tools BleST
STEAM 组
Blender Source Tools BleST
206
游戏中
1,473
在线
成立于
2013 年 11 月 8 日
所有讨论 > Help > 主题详情
The303 2018 年 7 月 6 日 下午 10:45
Unrigged Meshes to have auto Nodes in one SMD exporting? (Very useful for physics sim)
I want to know how (or request an option if not possible currently) to export separate unrigged meshes as nodes in one SMD just like in 3ds exporting. Currently the only way ive found is a painful process of creating a bone for each piece with a constraint.

Now I have found a hacky workaround to get Baked blender physics sim into Source or GoldSrc models: I exported my simulaton as an ASCII 6.0FBX with "animation optimization" turned off and then imported into another modelling program called fragMOTION which at some point turned all these loose meshes into node objects. It also kept the heiarchy that i parented in blender for the meshes, but now they have nodes.

Having to skip the export to another program would save a buch of steps and other software needed. Also, here is how my current method is done:
http://the303.org/imaeg/blender_wallphys.jpg
最后由 The303 编辑于; 2018 年 7 月 6 日 下午 10:45
引用自 Artfunkel:
Right, I see what you want now. This scene is set up incorrectly for skeletal animation export. You need one armature with a bone for each brick, and one animation of that armature. (If you were targeting Source I would tell you to create a vertex animation and save all of this bother, but that's not supported in GoldSrc.)

I wrote a script to create all of the bones you need and add constraints to them:

import bpy for ob in bpy.data.objects: if ob.name.startswith("b"): bpy.ops.armature.bone_primitive_add() bpy.context.active_object.data.edit_bones[-1].name = ob.name bpy.ops.object.mode_set(mode='POSE') for bone in bpy.context.active_object.pose.bones: con = bone.constraints.new('COPY_TRANSFORMS') con.target = bpy.data.objects[bone.name]

You'll need to create an armature, enter edit mode on it, and delete the starting bone Blender made for you before running that script.

There is work to do beyond that point. You'll need to play back the animation and capture it as bone keyframes; then remove the bone constraints; then add an armature modifier and vertex group (named after a bone) to each brick. At that point the bricks will be following the bones instead of vice versa and the animation export should start to work correctly.

You may prefer to keep doing the workaround instead!
< >
正在显示第 1 - 7 条,共 7 条留言
Artfunkel 2018 年 7 月 7 日 上午 6:01 
Add them to a group.
The303 2018 年 7 月 7 日 上午 10:56 
When I tried exporting the group but everything was skinned to only on 1 node object in the SMD (need wall, brick1,2,3,ect). Also in group exportable list I couldn't export the animation sequence it seemed, only mesh.
Artfunkel 2018 年 7 月 8 日 上午 2:01 
I don't understand what you mean. SMD doesn't support multiple sub-objects, it just merges them all into one.

Are you trying to create bodygroups?
The303 2018 年 7 月 8 日 下午 12:20 
"Are you trying to create bodygroups?"
No, I'm trying to get each mesh to export in a way so each mesh has its own node. When I export there is only 1 node/bone object. Heres a pic:
http://the303.org/imaeg/smd_nodes_export.png
On the left is what the SMD I need should look like with all meshnodes (this example I could only create by exporting out of fragmotion from FBX from blender -that hacky thing I am doing in the meantime). On the right is what SMD exporting right out of blender BST does, as you can see it writes all meshes to skin to 1 node.

If you need, Ive packed up my blend file with all sources and in the "fragmotion" folder is the fully compiled working models GoldSrc & Source engine models from that fragmotion export:
http://the303.org/stuff/baked_physics_blend.rar
最后由 The303 编辑于; 2018 年 7 月 8 日 下午 12:22
此论坛的一名版主已表示此帖子解答了原先的主题。
Artfunkel 2018 年 7 月 9 日 上午 6:39 
Right, I see what you want now. This scene is set up incorrectly for skeletal animation export. You need one armature with a bone for each brick, and one animation of that armature. (If you were targeting Source I would tell you to create a vertex animation and save all of this bother, but that's not supported in GoldSrc.)

I wrote a script to create all of the bones you need and add constraints to them:

import bpy for ob in bpy.data.objects: if ob.name.startswith("b"): bpy.ops.armature.bone_primitive_add() bpy.context.active_object.data.edit_bones[-1].name = ob.name bpy.ops.object.mode_set(mode='POSE') for bone in bpy.context.active_object.pose.bones: con = bone.constraints.new('COPY_TRANSFORMS') con.target = bpy.data.objects[bone.name]

You'll need to create an armature, enter edit mode on it, and delete the starting bone Blender made for you before running that script.

There is work to do beyond that point. You'll need to play back the animation and capture it as bone keyframes; then remove the bone constraints; then add an armature modifier and vertex group (named after a bone) to each brick. At that point the bricks will be following the bones instead of vice versa and the animation export should start to work correctly.

You may prefer to keep doing the workaround instead!
最后由 Artfunkel 编辑于; 2018 年 7 月 9 日 上午 6:45
The303 2018 年 7 月 9 日 上午 11:13 
Ah, I see. Thanks for the help. Yeah In *my* case Ill probably keep using my workaround but I think others can take a look at this. Can I quote you for a tutorial Im writing on this bakedphys script method?
Artfunkel 2018 年 7 月 9 日 上午 11:43 
Of course.
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50

所有讨论 > Help > 主题详情
发帖日期: 2018 年 7 月 6 日 下午 10:45
回复数: 7