xuzhusheng / gltf-to-3d-tiles

Convert glTF model to Glb, b3dm and 3D tiles format.
MIT License
133 stars 38 forks source link

转换gltf to 3dtils 报错,请问怎么处理 #19

Closed h-pl closed 1 year ago

h-pl commented 1 year ago

`PS \gltf-to-3d-tiles-main> python .\main.py tileset .\0input\shenzhenxiaoxue.gltf Traceback (most recent call last):

File ".\main.py", line 80, in app()

File ".\main.py", line 33, in tileset gltf_to_tileset(fin, fout, measure, up_direction)

File "D:\Users\hpl\Downloads\Compressed\gltf-to-3d-tiles-main_2\gltf-to-3d-tiles-main\converter\gltf_to_tileset.py", line 79, in gltf_to_tileset tiles = list(map(lambda id: Tile(content_id=id, instance_box=gltf_slicer.get_bounding_box(

File "D:\Users\hpl\Downloads\Compressed\gltf-to-3d-tiles-main_2\gltf-to-3d-tiles-main\converter\gltf_to_tileset.py", line 80, in id), instances_matrices=gltf_slicer.get_matrices(id), matrix=Matrix4(), gltf=gltf_slicer.slice_mesh(id).as_bytes(), extras=gltf_slicer.get_extras(id)), range(gltf_slicer.meshes_count)))

File "D:\Users\hpl\Downloads\Compressed\gltf-to-3d-tiles-main_2\gltf-to-3d-tiles-main\gltf\slicer.py", line 125, in slice_mesh return self.slice_primitives(self.meshes[mesh_id].primitives)

File "D:\Users\hpl\Downloads\Compressed\gltf-to-3d-tiles-main_2\gltf-to-3d-tiles-main\gltf\slicer.py", line 89, in slice_primitives return Glb([self.get_buffer(buffer_view_indices)], meshes=self.__get_meshes(primitives, accessor_indices, material_indices), accessors=self.get_accessors(accessor_indices, buffer_view_indices),

File "D:\Users\hpl\Downloads\Compressed\gltf-to-3d-tiles-main_2\gltf-to-3d-tiles-main\gltf\slicer.py", line 152, in __get_buffer view = self.buffer_views[index]

TypeError: list indices must be integers or slices, not NoneType`

h-pl commented 1 year ago

这个运行的模型

xuzhusheng commented 1 year ago

does not support draco compressed model.