我将搅拌器场景导出器导出到babylon.js时遇到问题,导出的场景网格没有vertices属性-无法在代码中重新创建网格。
我收到的是(对于简单的多维数据集-混合器中的默认场景):
id: "Cube"
indices: [0, 1, 2, 3, 4, 5, 6, 7, 5, 0, 5, 4, 4, 3, 2, 6, 2, 3, 6, 0, 2, 7, 3, 5, 0, 6, 5, 1, 0, 4, 1, 4, 2, 7,…]
isEnabled: true
isVisible: true
materialId: "Material"
name: "Cube"
normals: [0.5773, -0.5773, -0.5773, -0.5773, -0.5773, -0.5773, -0.5773, -0.5773, 0.5773, -0.5773, 0.5773,…]
position: [0, 0, 0]
positions: [1, -1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1]
receiveShadows: false
rotation: [0, 0, 0]
scaling: [1, 1, 1]
subMeshes: [{materialIndex:0, verticesStart:0, verticesCount:8, indexStart:0, indexCount:36}]
useFlatShading: false
据我所知,我应该得到索引(我得到)和顶点(没有这样的属性)
我想念什么吗?
我正在使用本文中的网格加载器:click me
另外,当我从文章中使用monkey.babylon时,我得到了适当的对象,因此导出时可能出了点问题(也许?)。
最佳答案
确定,我找到了解决方案(使用Blender版本2.70):
您必须使用positions属性,而不是vertices属性,并且
uvCount在网格中不可用(我发现值3使网格显示正确)。
此Blender版本可能存在问题(我发现Blender Exporter是为2.68创建的)
关于javascript - 导出的场景/网格中没有顶点属性(Blender到Babylon.js导出器),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/23320562/