but0n / Ashes

WebGL2.0 3D Engine - Global Illumination - RayTracing
https://codepen.io/but0n/pen/jddYoX
MIT License
331 stars 15 forks source link

glTF model without Indices is not displayed #22

Closed cx20 closed 5 years ago

cx20 commented 5 years ago

I tried to display the glTF file output from Three.js glTF Exporter with Ashes. However, Ashes does not seem to be able to display that model. Perhaps I think that Ashes does not correspond to the glTF model without Indices.

Ashes + glTF Additonal Test Case No.5 http://jsdo.it/cx20/YY6E

Below is the expected result. three.js + VoxelCorgi.gltf result: http://jsdo.it/cx20/ahsW image

but0n commented 5 years ago

I think the glTF model without Indices is already supported right now. Can you provide this glTF file? I need to test the vertices color. Thanks!

cx20 commented 5 years ago

Below, it will be test data and sample. https://cx20.github.io/gltf-test/examples/ashes3d/index.html?url=https://rawcdn.githack.com/cx20/jsdo-static-contents/ef789b017e86ed960bd38df4617fadbbfbd245ec/models/gltf/2.0/VoxelCorgi/glTF_merge/VoxelCorgi.gltf

ashes.main.js:5523 
Uncaught (in promise) TypeError: Cannot read property 'bufferView' of undefined
    at mesh.primitives.map.meshData (ashes.main.js:5523)
    at Array.map (<anonymous>)
    at gltf.meshes.gltf.meshes.map.mesh (ashes.main.js:5501)
    at Array.map (<anonymous>)
    at new gltfScene (ashes.main.js:5500)
    at Function.<anonymous> (ashes.main.js:5936)
    at Generator.next (<anonymous>)
    at fulfilled (ashes.main.js:5203)

image

but0n commented 5 years ago

Is this correct?

image

cx20 commented 5 years ago

Yes. It looks good. I would like to confirm it again when a new version is released.

but0n commented 5 years ago

Hi, a new version is released!

In version 0.1.0 you can adding component to entity with alias:

// EntityMgr.addComponent(entity, component);
entity.addComponent(component);
cx20 commented 5 years ago

I confirmed that this model will be displayed in Ashes v0.1.0. Ashes v0.1.0 + VoxelCorgi.gltf result: image I would like to try out the function of the component later.