【问题标题】:My exported three.js V71 from Blender 2.75 does not contain animations我从 Blender 2.75 导出的 three.js V71 不包含动画
【发布时间】:2015-10-10 20:57:46
【问题描述】:

我正在使用最新的three.js 导出器,用于插入Blender 2.75 的three.js v71。我有一个简单的 Blender 文件,里面有一个立方体、骨架和单根骨头。当我将文件导出到 three.js 时,骨骼和动画数据永远不会导出。

我强调的选项是:

https://www.dropbox.com/s/99wma7fqaw2wur5/blenderoptions.jpg?dl=0

输出的js文件,没有骨骼或动画,是:

    "data": {
        "skinIndices": [],
        "vertices": [1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,0.999999,1,0.999999,-1,1,-1,-1,1,-1,1,1],
        "animations": [],
        "normals": [0.577349,0.577349,-0.577349,0.577349,-0.577349,-0.577349,-0.577349,-0.577349,-0.577349,-0.577349,0.577349,-0.577349,0.577349,0.577349,0.577349,-0.577349,0.577349,0.577349,-0.577349,-0.577349,0.577349,0.577349,-0.577349,0.577349],
        "faces": [33,0,1,2,3,0,1,2,3,33,4,7,6,5,4,5,6,7,33,0,4,5,1,0,4,7,1,33,1,5,6,2,1,7,6,2,33,2,6,7,3,2,6,5,3,33,4,0,3,7,4,0,3,5],
        "influencesPerVertex": 2,
        "metadata": {
            "version": 3,
            "vertices": 8,
            "uvs": 0,
            "faces": 6,
            "normals": 8,
            "bones": 0,
            "generator": "io_three"
        },
        "uvs": [],
        "name": "CubeGeometry",
        "bones": [],
        "skinWeights": []
    }

我还需要做什么?我尝试了所有选项组合,包括变形动画,但没有任何效果。我已将 Blender 文件和 js 输出上传到:https://www.dropbox.com/s/yr90088smoa9941/simplecube.zip?dl=0

【问题讨论】:

    标签: animation three.js blender


    【解决方案1】:

    哇,Blender 真的不容易,是吗?

    我最终通过使用 Ctrl-P 将网格的父级设置为骨架,然后选择自动权重,而不是自己选择父级。我一直选择父级为 Armature->Bone->Bonename。显然它必须只是Armature-> Object。 Ctrl-P 自动为我解决了这个问题,当文件被导出时(连同骨骼和蒙皮框被勾选),动画细节也被放入 json 文件中。

    进一步的问题:如果文件与场景信息一起导出,那么 Threejs 必须使用 Objloader,否则在加载模型时会出现“未定义长度”错误。如果导出的文件没有场景信息,则使用 JsonLoader。

    【讨论】:

      猜你喜欢
      • 2012-09-06
      • 2014-06-09
      • 2019-08-09
      • 2017-12-21
      • 2015-04-29
      • 2014-07-04
      • 2016-03-04
      • 2013-09-16
      • 2012-04-04
      相关资源
      最近更新 更多