Domanda

I have an issue with blender scene exporter to babylon.js, exported scene meshes do not have vertices property - and I could not recreate mesh in code.

What I receive is ( for simple cube - default scene in blender ):

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

As far as I know I should get indices ( which I get ), and vertices ( there is no such property )

Am I missing something?

I'm using mesh loader from this article: click me

Also, when I use monkey.babylon from article I got proper object, so there is possibly something wrong with exporting ( maybe? ).

È stato utile?

Soluzione

Ok I found the solution ( used Blender ver: 2.70 ):

Instead of vertices property you have to use positions property, AND uvCount is not available in mesh ( I found that value 3 is making mesh showing properly ).

It's probably issue with this Blender version ( I have found that blender exporter was created for 2.68 )

Altri suggerimenti

Absolutely right. Exporter was built for 2.68+

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top