Blender 导出器 (v70) 到 json three.js 蒙皮动画
Posted
技术标签:
【中文标题】Blender 导出器 (v70) 到 json three.js 蒙皮动画【英文标题】:Blender exporter (v70) to json three.js skinning animations 【发布时间】:2015-04-29 22:56:00 【问题描述】:我花了几个星期来掌握 Blender 到 json 蒙皮导出过程,但最终结果在 3.js 导出器 v70 之前运行良好。
我不得不重建我的开发机器并安装了 Blender three.js exporter v70。
今天,我正在对带有蒙皮动画的搅拌机文件进行简单更新,该动画在更新之前运行良好,但我无法像以前那样导出多个动画。
我已经用一个简单的对象和动画测试了 Blender 导出器,我得到了相同的结果。
出口商输出:
"metadata":
"bones": 3,
"faces": 10,
"vertices": 12,
"generator": "io_three",
"normals": 12,
"type": "Geometry",
"version": 3
,
"name": "CubeGeometry.3",
"bones": [
"pos": [0.0,0.0,-0.0],
"name": "center",
"rotq": [0,0,0,1],
"parent": -1
,
"pos": [0.0,1.0,-0.0],
"name": "right",
"rotq": [0,0,0,1],
"parent": 0
,
"pos": [0.0,1.0,-0.0],
"name": "left",
"rotq": [0,0,0,1],
"parent": 0
],
"animation":
"name": "right",
"length": 4.125,
"hierarchy": [
"keys": [
"scl": [1,1,1],
"pos": [0.0,0.0,-0.0],
"rot": [0.0,0.0,-0.0,1.0],
"time": 0.0
,
"pos": [0.0,0.0,-0.0],
"rot": [0.0,0.0,-0.0,1.0],
"time": 2.0416666666666665
,
"scl": [1,1,1],
"pos": [0.0,0.0,-0.0],
"rot": [0.0,0.0,-0.0,1.0],
"time": 4.125
],
"parent": -1
,
"keys": [
"scl": [1,1,1],
"pos": [0.0,1.0,-0.0],
"rot": [0.0,0.0,-0.0,1.0],
"time": 0.0
,
"pos": [0.0,1.0,-0.0],
"rot": [0.0,0.0,0.33748486638069153,0.9413309693336487],
"time": 2.0416666666666665
,
"scl": [1,1,1],
"pos": [0.0,1.0,-0.0],
"rot": [0.0,0.0,-0.0,1.0],
"time": 4.125
],
"parent": 0
,
"keys": [
"scl": [1,1,1],
"pos": [0.0,1.0,-0.0],
"rot": [-6.0461669172803476e-15,1.149220128782158e-11,0.00026304941275157034,0.9999613761901855],
"time": 0.0
,
"pos": [0.0,1.0,-0.0],
"rot": [-6.0461669172803476e-15,1.149220128782158e-11,0.00026304941275157034,0.9999613761901855],
"time": 2.0416666666666665
,
"scl": [1,1,1],
"pos": [0.0,1.0,-0.0],
"rot": [-6.0461669172803476e-15,1.149220128782158e-11,0.00026304941275157034,0.9999613761901855],
"time": 4.125
],
"parent": 1
],
"fps": 24
,
"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,6,7,11,10,6,5,8,9,33,4,0,3,7,4,0,3,5,33,8,10,11,9,10,9,8,11,33,7,3,9,11,5,3,11,8,33,2,6,10,8,2,6,9,10,33,3,2,8,9,3,2,10,11],
"vertices": [1.8709198236465454,-0.05566583573818207,-0.9999999403953552,1.8709198236465454,-0.055665746331214905,0.9999999403953552,-0.12908029556274414,-0.055665746331214905,0.9999998211860657,-0.12907981872558594,-0.05566583573818207,-1.0000003576278687,1.8709203004837036,1.9443342685699463,-0.9999995231628418,1.8709192276000977,1.9443342685699463,1.0000004768371582,-0.12908053398132324,1.9443342685699463,0.9999995827674866,-0.12908011674880981,1.9443342685699463,-1.0000001192092896,-1.9279574155807495,-0.055665984749794006,0.9999994039535522,-1.9279569387435913,-0.05566607415676117,-1.0000007152557373,-1.9279578924179077,1.9443340301513672,0.9999991655349731,-1.9279574155807495,1.9443340301513672,-1.0000004768371582],
"influencesPerVertex": 2,
"skinWeights": [1.0,0,1.0,0,1.0,0,1.0,0,1.0,0,1.0,0,1.0,0,1.0,0,1.0,0,1.0,0,1.0,0,1.0,0],
"normals": [0.5773491859436035,-0.5773491859436035,-0.5773491859436035,0.5773491859436035,-0.5773491859436035,0.5773491859436035,0.0,-0.7070833444595337,0.7070833444595337,0.0,-0.7070833444595337,-0.7070833444595337,0.5773491859436035,0.5773491859436035,-0.5773491859436035,0.0,0.7070833444595337,-0.7070833444595337,0.0,0.7070833444595337,0.7070833444595337,0.5773491859436035,0.5773491859436035,0.5773491859436035,-0.5773491859436035,0.5773491859436035,-0.5773491859436035,-0.5773491859436035,0.5773491859436035,0.5773491859436035,-0.5773491859436035,-0.5773491859436035,0.5773491859436035,-0.5773491859436035,-0.5773491859436035,-0.5773491859436035],
"skinIndices": [2,0,2,0,0,0,0,0,2,0,2,0,0,0,0,0,1,0,1,0,1,0,1,0]
知道我应该怎么做才能让多个蒙皮动画再次工作吗?
谨此, j3zusla
【问题讨论】:
我回到了出口商 v69,一切都恢复了。我相信这是一个版本问题。多重动画功能是不久前添加到导出器的新功能。它在 v70 中肯定被省略了。 【参考方案1】:在 r71 发布之前,建议使用 dev 版本。已恢复多个动画,并解决了许多优化、功能和错误修复(特别是动画导出)。
【讨论】:
我已经下载并安装了 blender-exporter dev 快照 27/02/2015。不幸的是,导出蒙皮动画时,导出功能不断给出错误“Armature 不是有效的网格对象”。我试图改变选项,但结果是一样的。 因为您选择了骨架。在导出器的当前状态下,您需要明确选择网格。我知道旧的出口商这不是一个要求,但它不是一个高优先级项目,直到我们解决了所有的错误和扭结。 我明白了……太好了,我确认动画 太好了,我确认开发导出版本从蒙皮动画的角度完全可以正常工作。谢谢你在这件事上的帮助。另外,我想让 Three.js 团队和社区知道你正在做的事情是巨大的。大多数人不知道要让每个人都满意并且仍然让球滚动需要多少。你可以为你在这个框架上工作的各个方面感到自豪。就我而言,我还没有准备好参与,但有一天我会给你和你提供的一样多(或更多)!爱 j3zusla以上是关于Blender 导出器 (v70) 到 json three.js 蒙皮动画的主要内容,如果未能解决你的问题,请参考以下文章
TypeError:顶点未定义 - Blender 的三个.js 导出器
Three.js (r64) - Blender JSON 导出丢失法线以实现平滑着色
Blender 导出到 JSON 以获取 THREE.js 缺少的材料