我刚刚在3ds Max中设计了简单的3d模型,并尝试在Unity中导入。但请注意一件与我无关的事情,我得到了X度的-90度旋转,模型的比例也不合适。
我不知道这背后的原因是什么,虽然我是3ds max软件的初学者。

根据上面的图像,我希望你理解我的观点,所以我需要在3ds max软件中进行什么样的设置,以便它在X度0旋转和(1,1,1)比例下导入。
在这方面给我一些建议。
发布于 2018-09-20 18:54:25
我已经使用了Blender的这个插件,它对我来说很好用:
Unity Rotation Fix for Blender
如果找不到3DS Max的插件,可以尝试自己编写类似的插件,或者将模型导出到Blender,然后使用该插件。
以下是原始Python代码,以防该链接被弃用:
import bpy
bl_info = {
"name": "Unity Tools",
"author": "Karol \"Mirgar\" Głażewski",
"version": (1, 0, 2),
"blender": (2, 6, 5),
"location": "3D View > Tool Shelf > Unity Tools",
"description": "Tools to ease workflow with Unity Engine",
"warning": "",
"wiki_url": "",
"tracker_url": "",
"category": "Object"}
# fixes rotation on X axis, +X is -X in Unity compared to Blender
class UnityRotationFixerX(bpy.types.Operator):
bl_description = "Fixes rotation of object so it will not \"lay on its face\" in Unity, +X axis is -X compared to Unity"
bl_label = "Simple rotation fix"
bl_idname = "object.unity_rotation_fix_x"
bl_options = {'REGISTER', 'UNDO'}
def FixRotationForUnity3D(self):
bpy.ops.object.transform_apply(rotation = True)
bpy.ops.transform.rotate(value = -1.5708, axis = (1, 0, 0), constraint_axis = (True, False, False), constraint_orientation = 'GLOBAL')
bpy.ops.object.transform_apply(rotation = True)
bpy.ops.transform.rotate(value = 1.5708, axis = (1, 0, 0), constraint_axis = (True, False, False), constraint_orientation = 'GLOBAL')
@classmethod
def poll(cls, context):
return context.mode == 'OBJECT' and context.area.type == 'VIEW_3D'
def execute(self, context):
self.FixRotationForUnity3D()
return {'FINISHED'}
# fixes rotation on X and Z axis, front is now +Y
class UnityRotationFixerXZ(bpy.types.Operator):
bl_description = "Fixes rotation of object, +Y is now front"
bl_label = "Full rotation fix"
bl_idname = "object.unity_rotation_fix_xz"
bl_options = {'REGISTER', 'UNDO'}
def FixRotationForUnity3D(self):
bpy.ops.object.transform_apply(rotation = True)
bpy.ops.transform.rotate(value = -1.5708, axis = (1, 0, 0), constraint_axis = (True, False, False), constraint_orientation = 'GLOBAL')
bpy.ops.transform.rotate(value = -3.1416, axis = (0, 1, 0), constraint_axis = (False, True, False), constraint_orientation = 'GLOBAL')
bpy.ops.object.transform_apply(rotation = True)
bpy.ops.transform.rotate(value = 1.5708, axis = (1, 0, 0), constraint_axis = (True, False, False), constraint_orientation = 'GLOBAL')
bpy.ops.transform.rotate(value = 3.1416, axis = (0, 0, 1), constraint_axis = (False, False, True), constraint_orientation = 'GLOBAL')
@classmethod
def poll(cls, context):
return context.mode == 'OBJECT' and context.area.type == 'VIEW_3D'
def execute(self, context):
self.FixRotationForUnity3D()
return {'FINISHED'}
class UnityPanel(bpy.types.Panel):
bl_idname = "OBJECT_PT_unity_tools"
bl_label = "Unity Tools"
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
bl_context = "objectmode"
bl_options = {'DEFAULT_CLOSED'}
def draw(self, context):
layout = self.layout
col = layout.column(align=True)
col.label(text="Rotation:")
col.operator("object.unity_rotation_fix_x")
col.operator("object.unity_rotation_fix_xz")
#registers
def register():
bpy.utils.register_class(UnityRotationFixerX)
bpy.utils.register_class(UnityRotationFixerXZ)
bpy.utils.register_class(UnityPanel)
def unregister():
bpy.utils.unregister_class(UnityRotationFixerX)
bpy.utils.unregister_class(UnityRotationFixerXZ)
bpy.utils.unregister_class(UnityPanel)
if __name__ == "__main__":
register()和安装指南:
安装这个插件解压到你的搅拌机插件文件夹,例如"C:\Program Files\Blender Foundation\Blender\2.67\scripts\ addons“或使用”加载项“选项卡下”用户首选项“中的”从文件安装“按钮。
安装后,插件属于Object类别,启用后,可以从"Unity Tools“面板下的Tool Shelf访问。
请注意,X和Z轴上的完全旋转修复将交换对象,因此它将面对+Y轴而不是-Y,如果您通过fbx导出,请记住在使用完全旋转修复时将向前Z和向上Y设置为导出轴。
发布于 2018-09-20 17:17:04
Unity具有不同于3D Max (和Blender等)的轴。为了解决这个问题,Unity默认是旋转模型。就是Unity的事。如果它与您相邻,您可以始终将您的模型设置为空对象的子级。
发布于 2018-09-20 21:23:50
在3d max中加载球,将其在x轴上旋转-90度,重置变换并重新导出。至于规模,
https://docs.unity3d.com/Manual/FBXImporter-Model.html
在检查器中选择模型并检查其属性,特别是导入属性...做一些数学运算并调整导入比例。
https://stackoverflow.com/questions/52421474
复制相似问题