json - How to fix the invalid mesh construction? -


there sample here: http://amegas.github.io/gera/custom.geometry

it shows rotating swords, represented custom loaded geometry mapped uv-texture.

as can see sample uses part of texture ignoring other parts of image. want load other models using the sample github, last attempt unsuccessful. result shown here:

enter image description here

i rather don't understand how solve problem. have learned information library used in sample. must prepare vertex/texture coordinates rendering custom 3d model. thought try use other webgl drawing mode ( triangles, triangle_strip, triangle_fan , etc.. ), because library sample provides optional way set custom draw mode each mesh:

var mesh = new gera.mesh({     geometry: new gera.geometry({         type: gera.geometry.type.custom,         vertices: object3d.jsonmodel.vertices,         indices: object3d.jsonmodel.indices,         uvcoordinates: object3d.jsonmodel.uvcoordinates     }),     material: new gera.material( object3d.texture ),     drawmode: gera.renderer.drawmode.trianglestrip }); 

but no success. i'm thinking i've prepared model of cat not correctly. i've used obj2json mesh file converter other github project. result shown above.

what should solve problem?

seems obj2json parser works bad. i've tried convert several wavefront models using parser , must say, doesn't make correct triangulation complex models. if 3d model kind of box or similar, obj2json triangulates correctly export model. if use models of cats, dragons , other stuff - there problems.

also, want give piece of advice you, not use custom drawing mode when work gera library, because 3d models use 2 modes: triangles (1) , lines (2) in addition wireframe mode. there few situations when should start use custom drawing mode.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -