瀏覽代碼

GLTF importer: Fix resource naming on case insensitive systems

Panagiotis Christopoulos Charitos 3 年之前
父節點
當前提交
f5a0474f36
共有 100 個文件被更改,包括 391 次插入358 次删除
  1. 71 43
      AnKi/Importer/GltfImporter.cpp
  2. 6 1
      AnKi/Importer/GltfImporter.h
  3. 1 1
      AnKi/Importer/GltfImporterMaterial.cpp
  4. 4 4
      AnKi/Importer/GltfImporterMesh.cpp
  5. 112 112
      Samples/Sponza/Assets/Scene.lua
  6. 0 8
      Samples/Sponza/Assets/arc_2_arch.001.ankimdl
  7. 8 0
      Samples/Sponza/Assets/arc_2_arch.001_7f6cd4617500b9e.ankimdl
  8. 0 0
      Samples/Sponza/Assets/arc_2_lod0_5fe181d03e97a985.ankimesh
  9. 0 0
      Samples/Sponza/Assets/arch.001_efebbb2a6f84fff0.ankimtl
  10. 0 9
      Samples/Sponza/Assets/arch_a_arch.ankimdl
  11. 9 0
      Samples/Sponza/Assets/arch_a_arch_ee9218d363e2c47c.ankimdl
  12. 0 0
      Samples/Sponza/Assets/arch_a_lod0_2340d230b53e2a69.ankimesh
  13. 0 0
      Samples/Sponza/Assets/arch_a_lod1_2340d230b53e2a69.ankimesh
  14. 0 0
      Samples/Sponza/Assets/arch_e0c8c7e29c806284.ankimtl
  15. 0 8
      Samples/Sponza/Assets/arch_support_big_column_c.ankimdl
  16. 8 0
      Samples/Sponza/Assets/arch_support_big_column_c_b5e8839cd276d81.ankimdl
  17. 0 0
      Samples/Sponza/Assets/arch_support_big_lod0_68d8367a811fb94b.ankimesh
  18. 0 8
      Samples/Sponza/Assets/arch_support_med_column_c.ankimdl
  19. 8 0
      Samples/Sponza/Assets/arch_support_med_column_c_7324dbf874b0902d.ankimdl
  20. 0 0
      Samples/Sponza/Assets/arch_support_med_lod0_f674c0ad36e855d5.ankimesh
  21. 0 8
      Samples/Sponza/Assets/arch_support_tiny_column_c.ankimdl
  22. 8 0
      Samples/Sponza/Assets/arch_support_tiny_column_c_74601fe6ddc602fd.ankimdl
  23. 0 0
      Samples/Sponza/Assets/arch_support_tiny_lod0_6e5678a158e0a576.ankimesh
  24. 0 0
      Samples/Sponza/Assets/bricks_8bd6f24aa0ad3654.ankimtl
  25. 0 9
      Samples/Sponza/Assets/carpet_fabric_a.ankimdl
  26. 9 0
      Samples/Sponza/Assets/carpet_fabric_a_7b2d33bd44d3c83a.ankimdl
  27. 0 9
      Samples/Sponza/Assets/carpet_fabric_d.ankimdl
  28. 9 0
      Samples/Sponza/Assets/carpet_fabric_d_327fde8eebe28165.ankimdl
  29. 0 9
      Samples/Sponza/Assets/carpet_fabric_e.ankimdl
  30. 9 0
      Samples/Sponza/Assets/carpet_fabric_e_1daa4785c181ff7c.ankimdl
  31. 0 0
      Samples/Sponza/Assets/carpet_lod0_9773eaac1e11dc54.ankimesh
  32. 0 0
      Samples/Sponza/Assets/carpet_lod1_9773eaac1e11dc54.ankimesh
  33. 0 0
      Samples/Sponza/Assets/ceiling_3fd94cde277a48e1.ankimtl
  34. 0 9
      Samples/Sponza/Assets/ceiling_ceiling.ankimdl
  35. 9 0
      Samples/Sponza/Assets/ceiling_ceiling_652d2c332b14f7c1.ankimdl
  36. 0 0
      Samples/Sponza/Assets/ceiling_lod0_3fd94cde277a48e1.ankimesh
  37. 0 0
      Samples/Sponza/Assets/ceiling_lod1_3fd94cde277a48e1.ankimesh
  38. 0 0
      Samples/Sponza/Assets/chain_33ef478b87fe7c15.ankimtl
  39. 0 8
      Samples/Sponza/Assets/column_a.001_column_a.ankimdl
  40. 8 0
      Samples/Sponza/Assets/column_a.001_column_a_33375155773963c4.ankimdl
  41. 0 0
      Samples/Sponza/Assets/column_a.001_lod0_d7e2987db26e19ee.ankimesh
  42. 0 0
      Samples/Sponza/Assets/column_a_1e1bacae3460b88.ankimtl
  43. 0 8
      Samples/Sponza/Assets/column_a_column_a.ankimdl
  44. 8 0
      Samples/Sponza/Assets/column_a_column_a_e2bba72dc764b614.ankimdl
  45. 0 0
      Samples/Sponza/Assets/column_a_lod0_1e1bacae3460b88.ankimesh
  46. 0 0
      Samples/Sponza/Assets/column_b_c9391d56bff59fc3.ankimtl
  47. 0 9
      Samples/Sponza/Assets/column_b_column_b.ankimdl
  48. 9 0
      Samples/Sponza/Assets/column_b_column_b_2147575ec1137d95.ankimdl
  49. 0 0
      Samples/Sponza/Assets/column_b_lod0_c9391d56bff59fc3.ankimesh
  50. 0 0
      Samples/Sponza/Assets/column_b_lod1_c9391d56bff59fc3.ankimesh
  51. 0 9
      Samples/Sponza/Assets/column_b_top_column_b.ankimdl
  52. 9 0
      Samples/Sponza/Assets/column_b_top_column_b_5a662a93fda5781c.ankimdl
  53. 0 0
      Samples/Sponza/Assets/column_b_top_lod0_b71e6265349a8db8.ankimesh
  54. 0 0
      Samples/Sponza/Assets/column_b_top_lod1_b71e6265349a8db8.ankimesh
  55. 0 0
      Samples/Sponza/Assets/column_c_43f866fc7b9f0169.ankimtl
  56. 0 8
      Samples/Sponza/Assets/column_c_column_c.ankimdl
  57. 8 0
      Samples/Sponza/Assets/column_c_column_c_8cfb4773e7984c6c.ankimdl
  58. 0 0
      Samples/Sponza/Assets/column_c_lod0_43f866fc7b9f0169.ankimesh
  59. 0 9
      Samples/Sponza/Assets/column_c_small_column_b.ankimdl
  60. 9 0
      Samples/Sponza/Assets/column_c_small_column_b_60ac9c1e9bb600f6.ankimdl
  61. 0 0
      Samples/Sponza/Assets/column_c_small_lod0_a940cbc4b06b29e0.ankimesh
  62. 0 0
      Samples/Sponza/Assets/column_c_small_lod1_a940cbc4b06b29e0.ankimesh
  63. 0 9
      Samples/Sponza/Assets/column_c_small_top_column_b.ankimdl
  64. 9 0
      Samples/Sponza/Assets/column_c_small_top_column_b_212d13057d434c4c.ankimdl
  65. 0 0
      Samples/Sponza/Assets/column_c_small_top_lod0_ac474e000598477b.ankimesh
  66. 0 0
      Samples/Sponza/Assets/column_c_small_top_lod1_ac474e000598477b.ankimesh
  67. 0 8
      Samples/Sponza/Assets/column_c_square_column_c.ankimdl
  68. 8 0
      Samples/Sponza/Assets/column_c_square_column_c_31141c63525ac8c7.ankimdl
  69. 0 0
      Samples/Sponza/Assets/column_c_square_lod0_34f84a5277d35506.ankimesh
  70. 0 0
      Samples/Sponza/Assets/details_4242afc5fc479920.ankimtl
  71. 0 8
      Samples/Sponza/Assets/door_b_details.ankimdl
  72. 8 0
      Samples/Sponza/Assets/door_b_details_8719c311905b9f09.ankimdl
  73. 0 0
      Samples/Sponza/Assets/door_b_lod0_43d9d0f054a59e0d.ankimesh
  74. 0 0
      Samples/Sponza/Assets/fabric_a_945c29fc221550fb.ankimtl
  75. 0 9
      Samples/Sponza/Assets/fabric_a_fabric_c.ankimdl
  76. 9 0
      Samples/Sponza/Assets/fabric_a_fabric_c_c4b70d2083f41709.ankimdl
  77. 0 0
      Samples/Sponza/Assets/fabric_a_lod0_945c29fc221550fb.ankimesh
  78. 0 0
      Samples/Sponza/Assets/fabric_a_lod1_945c29fc221550fb.ankimesh
  79. 0 9
      Samples/Sponza/Assets/fabric_b_fabric_f.ankimdl
  80. 9 0
      Samples/Sponza/Assets/fabric_b_fabric_f_3f1537f39a3f726f.ankimdl
  81. 0 0
      Samples/Sponza/Assets/fabric_b_lod0_e8dd2769dc642ab7.ankimesh
  82. 0 0
      Samples/Sponza/Assets/fabric_b_lod1_e8dd2769dc642ab7.ankimesh
  83. 0 0
      Samples/Sponza/Assets/fabric_c_c8bf70dee411d1bd.ankimtl
  84. 0 0
      Samples/Sponza/Assets/fabric_d_8ff4aebb25bf20b0.ankimtl
  85. 0 0
      Samples/Sponza/Assets/fabric_e_d1c5a44841c48230.ankimtl
  86. 0 0
      Samples/Sponza/Assets/fabric_f_d54bbaca38ed4391.ankimtl
  87. 0 8
      Samples/Sponza/Assets/flag_pole_flagpole.ankimdl
  88. 8 0
      Samples/Sponza/Assets/flag_pole_flagpole_aaa6bb6e0416a890.ankimdl
  89. 0 0
      Samples/Sponza/Assets/flag_pole_lod0_b7fcab939d35270d.ankimesh
  90. 0 0
      Samples/Sponza/Assets/flagpole_6c7e0eb8dd33b39e.ankimtl
  91. 0 0
      Samples/Sponza/Assets/floor_71cbd2644e53ab8c.ankimtl
  92. 0 0
      Samples/Sponza/Assets/hanging_vase_lod0_a37dedd7f8c3beeb.ankimesh
  93. 0 0
      Samples/Sponza/Assets/hanging_vase_lod1_a37dedd7f8c3beeb.ankimesh
  94. 0 9
      Samples/Sponza/Assets/hanging_vase_vase_hanging.ankimdl
  95. 9 0
      Samples/Sponza/Assets/hanging_vase_vase_hanging_706736339658bc85.ankimdl
  96. 0 0
      Samples/Sponza/Assets/leaf_3a245efd17475037.ankimtl
  97. 0 9
      Samples/Sponza/Assets/leaf_b_leaf.ankimdl
  98. 9 0
      Samples/Sponza/Assets/leaf_b_leaf_582f73514dcafca7.ankimdl
  99. 0 0
      Samples/Sponza/Assets/leaf_b_lod0_686ab977af97774c.ankimesh
  100. 0 0
      Samples/Sponza/Assets/leaf_b_lod1_686ab977af97774c.ankimesh

+ 71 - 43
AnKi/Importer/GltfImporter.cpp

@@ -548,8 +548,8 @@ Error GltfImporter::visitNode(const cgltf_node& node, const Transform& parentTrf
 				m_sceneFile.writeText("\nnode = scene:newStaticCollisionNode(\"%s\")\n", getNodeName(node).cstr()));
 				m_sceneFile.writeText("\nnode = scene:newStaticCollisionNode(\"%s\")\n", getNodeName(node).cstr()));
 
 
 			ANKI_CHECK(m_sceneFile.writeText("comp = scene:getSceneNodeBase():getBodyComponent()\n"));
 			ANKI_CHECK(m_sceneFile.writeText("comp = scene:getSceneNodeBase():getBodyComponent()\n"));
-			ANKI_CHECK(
-				m_sceneFile.writeText("comp:loadMeshResource(\"%s%s.ankimesh\")\n", m_rpath.cstr(), node.mesh->name));
+			const StringAuto meshFname = computeMeshResourceFilename(*node.mesh);
+			ANKI_CHECK(m_sceneFile.writeText("comp:loadMeshResource(\"%s%s\")\n", m_rpath.cstr(), meshFname.cstr()));
 
 
 			Transform localTrf;
 			Transform localTrf;
 			ANKI_CHECK(getNodeTransform(node, localTrf));
 			ANKI_CHECK(getNodeTransform(node, localTrf));
@@ -716,22 +716,18 @@ Error GltfImporter::visitNode(const cgltf_node& node, const Transform& parentTrf
 				Ctx& self = *static_cast<Ctx*>(userData);
 				Ctx& self = *static_cast<Ctx*>(userData);
 
 
 				// LOD 0
 				// LOD 0
-				Error err = self.m_importer->writeMesh(*self.m_mesh, CString(), self.m_importer->computeLodFactor(0));
+				Error err = self.m_importer->writeMesh(*self.m_mesh, 0, self.m_importer->computeLodFactor(0));
 
 
 				// LOD 1
 				// LOD 1
 				if(!err && self.m_importer->m_lodCount > 1 && !self.m_importer->skipMeshLod(*self.m_mesh, 1))
 				if(!err && self.m_importer->m_lodCount > 1 && !self.m_importer->skipMeshLod(*self.m_mesh, 1))
 				{
 				{
-					StringAuto name(self.m_importer->m_alloc);
-					name.sprintf("%s_lod1", self.m_mesh->name);
-					err = self.m_importer->writeMesh(*self.m_mesh, name, self.m_importer->computeLodFactor(1));
+					err = self.m_importer->writeMesh(*self.m_mesh, 1, self.m_importer->computeLodFactor(1));
 				}
 				}
 
 
 				// LOD 2
 				// LOD 2
 				if(!err && self.m_importer->m_lodCount > 2 && !self.m_importer->skipMeshLod(*self.m_mesh, 2))
 				if(!err && self.m_importer->m_lodCount > 2 && !self.m_importer->skipMeshLod(*self.m_mesh, 2))
 				{
 				{
-					StringAuto name(self.m_importer->m_alloc);
-					name.sprintf("%s_lod2", self.m_mesh->name);
-					err = self.m_importer->writeMesh(*self.m_mesh, name, self.m_importer->computeLodFactor(2));
+					err = self.m_importer->writeMesh(*self.m_mesh, 2, self.m_importer->computeLodFactor(2));
 				}
 				}
 
 
 				for(U32 i = 0; i < self.m_materialCount && !err; ++i)
 				for(U32 i = 0; i < self.m_materialCount && !err; ++i)
@@ -778,16 +774,11 @@ Error GltfImporter::visitNode(const cgltf_node& node, const Transform& parentTrf
 												 getNodeName(node).cstr()));
 												 getNodeName(node).cstr()));
 
 
 				ANKI_CHECK(m_sceneFile.writeText("comp = node2:getSceneNodeBase():getBodyComponent()\n"));
 				ANKI_CHECK(m_sceneFile.writeText("comp = node2:getSceneNodeBase():getBodyComponent()\n"));
-				if(maxLod == 0)
-				{
-					ANKI_CHECK(m_sceneFile.writeText("comp:loadMeshResource(\"%s%s.ankimesh\")\n", m_rpath.cstr(),
-													 node.mesh->name));
-				}
-				else
-				{
-					ANKI_CHECK(m_sceneFile.writeText("comp:loadMeshResource(\"%s%s_lod%u.ankimesh\")\n", m_rpath.cstr(),
-													 node.mesh->name, maxLod));
-				}
+
+				const StringAuto meshFname = computeMeshResourceFilename(*node.mesh, maxLod);
+
+				ANKI_CHECK(
+					m_sceneFile.writeText("comp:loadMeshResource(\"%s%s\")\n", m_rpath.cstr(), meshFname.cstr()));
 				ANKI_CHECK(m_sceneFile.writeText("comp:setWorldTransform(trf)\n"));
 				ANKI_CHECK(m_sceneFile.writeText("comp:setWorldTransform(trf)\n"));
 			}
 			}
 		}
 		}
@@ -863,20 +854,21 @@ Error GltfImporter::writeModel(const cgltf_mesh& mesh)
 			ANKI_CHECK(file.writeText("\t\t<modelPatch subMeshIndex=\"%u\">\n", primIdx));
 			ANKI_CHECK(file.writeText("\t\t<modelPatch subMeshIndex=\"%u\">\n", primIdx));
 		}
 		}
 
 
-		ANKI_CHECK(file.writeText("\t\t\t<mesh>%s%s.ankimesh</mesh>\n", m_rpath.cstr(), mesh.name));
+		{
+			const StringAuto meshFname = computeMeshResourceFilename(mesh);
+			ANKI_CHECK(file.writeText("\t\t\t<mesh>%s%s</mesh>\n", m_rpath.cstr(), meshFname.cstr()));
+		}
 
 
 		if(m_lodCount > 1 && !skipMeshLod(mesh, 1))
 		if(m_lodCount > 1 && !skipMeshLod(mesh, 1))
 		{
 		{
-			StringAuto name(m_alloc);
-			name.sprintf("%s_lod1", mesh.name);
-			ANKI_CHECK(file.writeText("\t\t\t<mesh1>%s%s.ankimesh</mesh1>\n", m_rpath.cstr(), name.cstr()));
+			const StringAuto meshFname = computeMeshResourceFilename(mesh, 1);
+			ANKI_CHECK(file.writeText("\t\t\t<mesh1>%s%s</mesh1>\n", m_rpath.cstr(), meshFname.cstr()));
 		}
 		}
 
 
 		if(m_lodCount > 2 && !skipMeshLod(mesh, 2))
 		if(m_lodCount > 2 && !skipMeshLod(mesh, 2))
 		{
 		{
-			StringAuto name(m_alloc);
-			name.sprintf("%s_lod2", mesh.name);
-			ANKI_CHECK(file.writeText("\t\t\t<mesh2>%s%s.ankimesh</mesh2>\n", m_rpath.cstr(), name.cstr()));
+			const StringAuto meshFname = computeMeshResourceFilename(mesh, 2);
+			ANKI_CHECK(file.writeText("\t\t\t<mesh2>%s%s</mesh2>\n", m_rpath.cstr(), meshFname.cstr()));
 		}
 		}
 
 
 		HashMapAuto<CString, StringAuto> materialExtras(m_alloc);
 		HashMapAuto<CString, StringAuto> materialExtras(m_alloc);
@@ -888,8 +880,8 @@ Error GltfImporter::writeModel(const cgltf_mesh& mesh)
 		}
 		}
 		else
 		else
 		{
 		{
-			ANKI_CHECK(file.writeText("\t\t\t<material>%s%s.ankimtl</material>\n", m_rpath.cstr(),
-									  mesh.primitives[primIdx].material->name));
+			const StringAuto mtlFname = computeMaterialResourceFilename(*mesh.primitives[primIdx].material);
+			ANKI_CHECK(file.writeText("\t\t\t<material>%s%s</material>\n", m_rpath.cstr(), mtlFname.cstr()));
 		}
 		}
 
 
 		ANKI_CHECK(file.writeText("\t\t</modelPatch>\n"));
 		ANKI_CHECK(file.writeText("\t\t</modelPatch>\n"));
@@ -981,7 +973,7 @@ static void optimizeChannel(DynamicArrayAuto<GltfAnimKey<T>>& arr, const T& iden
 Error GltfImporter::writeAnimation(const cgltf_animation& anim)
 Error GltfImporter::writeAnimation(const cgltf_animation& anim)
 {
 {
 	StringAuto fname(m_alloc);
 	StringAuto fname(m_alloc);
-	fname.sprintf("%s%s.ankianim", m_outDir.cstr(), anim.name);
+	fname.sprintf("%s%s", m_outDir.cstr(), computeAnimationResourceFilename(anim).cstr());
 	fname = fixFilename(fname);
 	fname = fixFilename(fname);
 	ANKI_IMPORTER_LOGI("Importing animation %s", fname.cstr());
 	ANKI_IMPORTER_LOGI("Importing animation %s", fname.cstr());
 
 
@@ -1211,7 +1203,7 @@ Error GltfImporter::writeAnimation(const cgltf_animation& anim)
 Error GltfImporter::writeSkeleton(const cgltf_skin& skin)
 Error GltfImporter::writeSkeleton(const cgltf_skin& skin)
 {
 {
 	StringAuto fname(m_alloc);
 	StringAuto fname(m_alloc);
-	fname.sprintf("%s%s.ankiskel", m_outDir.cstr(), skin.name);
+	fname.sprintf("%s%s", m_outDir.cstr(), computeSkeletonResourceFilename(skin).cstr());
 	ANKI_IMPORTER_LOGI("Importing skeleton %s", fname.cstr());
 	ANKI_IMPORTER_LOGI("Importing skeleton %s", fname.cstr());
 
 
 	// Get matrices
 	// Get matrices
@@ -1449,9 +1441,8 @@ Error GltfImporter::writeModelNode(const cgltf_node& node, const HashMapAuto<CSt
 
 
 	if(node.skin)
 	if(node.skin)
 	{
 	{
-		ANKI_CHECK(m_sceneFile.writeText(
-			"node:getSceneNodeBase():getSkinComponent():loadSkeletonResource(\"%s%s.ankiskel\")\n", m_rpath.cstr(),
-			node.skin->name));
+		ANKI_CHECK(m_sceneFile.writeText("node:getSceneNodeBase():getSkinComponent():loadSkeletonResource(\"%s%s\")\n",
+										 m_rpath.cstr(), computeSkeletonResourceFilename(*node.skin).cstr()));
 	}
 	}
 
 
 	return Error::NONE;
 	return Error::NONE;
@@ -1468,20 +1459,57 @@ StringAuto GltfImporter::computeModelResourceFilename(const cgltf_mesh& mesh) co
 		list.pushBackSprintf("_%s", mesh.primitives[i].material->name);
 		list.pushBackSprintf("_%s", mesh.primitives[i].material->name);
 	}
 	}
 
 
+	StringAuto joined(m_alloc);
+	list.join("", joined);
+
+	const U64 hash = computeHash(joined.getBegin(), joined.getLength());
+
 	StringAuto out(m_alloc);
 	StringAuto out(m_alloc);
-	list.join("", out);
+	out.sprintf("%.64s_%" PRIx64 ".ankimdl", joined.cstr(), hash); // Limit the filename size
 
 
-	// If the name is too big then we need to trimm it
-	if(out.getLength() > 64)
-	{
-		const U64 hash = computeHash(out.getBegin(), out.getLength());
-		StringAuto out2(m_alloc);
-		out2.sprintf("%.64s_%" PRIu64, out.cstr(), hash);
+	return out;
+}
 
 
-		out = std::move(out2);
-	}
+StringAuto GltfImporter::computeMeshResourceFilename(const cgltf_mesh& mesh, U32 lod) const
+{
+	const U64 hash = computeHash(mesh.name, strlen(mesh.name));
+
+	StringAuto out(m_alloc);
+
+	out.sprintf("%.64s_lod%u_%" PRIx64 ".ankimesh", mesh.name, lod, hash); // Limit the filename size
+
+	return out;
+}
+
+StringAuto GltfImporter::computeMaterialResourceFilename(const cgltf_material& mtl) const
+{
+	const U64 hash = computeHash(mtl.name, strlen(mtl.name));
+
+	StringAuto out(m_alloc);
+
+	out.sprintf("%.64s_%" PRIx64 ".ankimtl", mtl.name, hash); // Limit the filename size
+
+	return out;
+}
+
+StringAuto GltfImporter::computeAnimationResourceFilename(const cgltf_animation& anim) const
+{
+	const U64 hash = computeHash(anim.name, strlen(anim.name));
+
+	StringAuto out(m_alloc);
+
+	out.sprintf("%.64s_%" PRIx64 ".ankianim", anim.name, hash); // Limit the filename size
+
+	return out;
+}
+
+StringAuto GltfImporter::computeSkeletonResourceFilename(const cgltf_skin& skin) const
+{
+	const U64 hash = computeHash(skin.name, strlen(skin.name));
+
+	StringAuto out(m_alloc);
 
 
-	out.append(".ankimdl");
+	out.sprintf("%.64s_%" PRIx64 ".ankiskel", skin.name, hash); // Limit the filename size
 
 
 	return out;
 	return out;
 }
 }

+ 6 - 1
AnKi/Importer/GltfImporter.h

@@ -128,10 +128,15 @@ private:
 
 
 	static U32 getMeshTotalVertexCount(const cgltf_mesh& mesh);
 	static U32 getMeshTotalVertexCount(const cgltf_mesh& mesh);
 
 
+	// Compute filenames for various resources. Use a hash to solve the casing issue and remove unwanted special chars
 	StringAuto computeModelResourceFilename(const cgltf_mesh& mesh) const;
 	StringAuto computeModelResourceFilename(const cgltf_mesh& mesh) const;
+	StringAuto computeMeshResourceFilename(const cgltf_mesh& mesh, U32 lod = 0) const;
+	StringAuto computeMaterialResourceFilename(const cgltf_material& mtl) const;
+	StringAuto computeAnimationResourceFilename(const cgltf_animation& anim) const;
+	StringAuto computeSkeletonResourceFilename(const cgltf_skin& skin) const;
 
 
 	// Resources
 	// Resources
-	ANKI_USE_RESULT Error writeMesh(const cgltf_mesh& mesh, CString nameOverride, F32 decimateFactor);
+	ANKI_USE_RESULT Error writeMesh(const cgltf_mesh& mesh, U32 lod, F32 decimateFactor);
 	ANKI_USE_RESULT Error writeMaterial(const cgltf_material& mtl, RayTypeBit usedRayTypes);
 	ANKI_USE_RESULT Error writeMaterial(const cgltf_material& mtl, RayTypeBit usedRayTypes);
 	ANKI_USE_RESULT Error writeModel(const cgltf_mesh& mesh);
 	ANKI_USE_RESULT Error writeModel(const cgltf_mesh& mesh);
 	ANKI_USE_RESULT Error writeAnimation(const cgltf_animation& anim);
 	ANKI_USE_RESULT Error writeAnimation(const cgltf_animation& anim);

+ 1 - 1
AnKi/Importer/GltfImporterMaterial.cpp

@@ -97,7 +97,7 @@ static Error findConstantColorsInImage(CString fname, Vec4& constantColor, Gener
 Error GltfImporter::writeMaterial(const cgltf_material& mtl, RayTypeBit usedRayTypes)
 Error GltfImporter::writeMaterial(const cgltf_material& mtl, RayTypeBit usedRayTypes)
 {
 {
 	StringAuto fname(m_alloc);
 	StringAuto fname(m_alloc);
-	fname.sprintf("%s%s.ankimtl", m_outDir.cstr(), mtl.name);
+	fname.sprintf("%s%s", m_outDir.cstr(), computeMaterialResourceFilename(mtl).cstr());
 	ANKI_IMPORTER_LOGI("Importing material %s", fname.cstr());
 	ANKI_IMPORTER_LOGI("Importing material %s", fname.cstr());
 
 
 	if(!mtl.has_pbr_metallic_roughness)
 	if(!mtl.has_pbr_metallic_roughness)

+ 4 - 4
AnKi/Importer/GltfImporterMesh.cpp

@@ -271,12 +271,12 @@ U32 GltfImporter::getMeshTotalVertexCount(const cgltf_mesh& mesh)
 	return totalVertexCount;
 	return totalVertexCount;
 }
 }
 
 
-Error GltfImporter::writeMesh(const cgltf_mesh& mesh, CString nameOverride, F32 decimateFactor)
+Error GltfImporter::writeMesh(const cgltf_mesh& mesh, U32 lod, F32 decimateFactor)
 {
 {
 	StringAuto fname(m_alloc);
 	StringAuto fname(m_alloc);
-	fname.sprintf("%s%s.ankimesh", m_outDir.cstr(), (nameOverride.isEmpty()) ? mesh.name : nameOverride.cstr());
-	ANKI_IMPORTER_LOGI("Importing mesh (%s, decimate factor %f): %s", (m_optimizeMeshes) ? "optimze" : "WON'T optimize",
-					   decimateFactor, fname.cstr());
+	fname.sprintf("%s%s", m_outDir.cstr(), computeMeshResourceFilename(mesh, lod).cstr());
+	ANKI_IMPORTER_LOGI("Importing mesh (%s, decimate factor %f): %s",
+					   (m_optimizeMeshes) ? "optimize" : "WON'T optimize", decimateFactor, fname.cstr());
 
 
 	ListAuto<SubMesh> submeshes(m_alloc);
 	ListAuto<SubMesh> submeshes(m_alloc);
 	U32 totalIndexCount = 0;
 	U32 totalIndexCount = 0;

文件差異過大導致無法顯示
+ 112 - 112
Samples/Sponza/Assets/Scene.lua


+ 0 - 8
Samples/Sponza/Assets/arc_2_arch.001.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/arc_2.ankimesh</mesh>
-			<material>Assets/arch.001.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/arc_2_arch.001_7f6cd4617500b9e.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/arc_2_lod0_5fe181d03e97a985.ankimesh</mesh>
+			<material>Assets/arch.001_efebbb2a6f84fff0.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/arc_2.ankimesh → Samples/Sponza/Assets/arc_2_lod0_5fe181d03e97a985.ankimesh


+ 0 - 0
Samples/Sponza/Assets/arch.001.ankimtl → Samples/Sponza/Assets/arch.001_efebbb2a6f84fff0.ankimtl


+ 0 - 9
Samples/Sponza/Assets/arch_a_arch.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/arch_a.ankimesh</mesh>
-			<mesh1>Assets/arch_a_lod1.ankimesh</mesh1>
-			<material>Assets/arch.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/arch_a_arch_ee9218d363e2c47c.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/arch_a_lod0_2340d230b53e2a69.ankimesh</mesh>
+			<mesh1>Assets/arch_a_lod1_2340d230b53e2a69.ankimesh</mesh1>
+			<material>Assets/arch_e0c8c7e29c806284.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/arch_a.ankimesh → Samples/Sponza/Assets/arch_a_lod0_2340d230b53e2a69.ankimesh


+ 0 - 0
Samples/Sponza/Assets/arch_a_lod1.ankimesh → Samples/Sponza/Assets/arch_a_lod1_2340d230b53e2a69.ankimesh


+ 0 - 0
Samples/Sponza/Assets/arch.ankimtl → Samples/Sponza/Assets/arch_e0c8c7e29c806284.ankimtl


+ 0 - 8
Samples/Sponza/Assets/arch_support_big_column_c.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/arch_support_big.ankimesh</mesh>
-			<material>Assets/column_c.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/arch_support_big_column_c_b5e8839cd276d81.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/arch_support_big_lod0_68d8367a811fb94b.ankimesh</mesh>
+			<material>Assets/column_c_43f866fc7b9f0169.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/arch_support_big.ankimesh → Samples/Sponza/Assets/arch_support_big_lod0_68d8367a811fb94b.ankimesh


+ 0 - 8
Samples/Sponza/Assets/arch_support_med_column_c.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/arch_support_med.ankimesh</mesh>
-			<material>Assets/column_c.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/arch_support_med_column_c_7324dbf874b0902d.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/arch_support_med_lod0_f674c0ad36e855d5.ankimesh</mesh>
+			<material>Assets/column_c_43f866fc7b9f0169.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/arch_support_med.ankimesh → Samples/Sponza/Assets/arch_support_med_lod0_f674c0ad36e855d5.ankimesh


+ 0 - 8
Samples/Sponza/Assets/arch_support_tiny_column_c.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/arch_support_tiny.ankimesh</mesh>
-			<material>Assets/column_c.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/arch_support_tiny_column_c_74601fe6ddc602fd.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/arch_support_tiny_lod0_6e5678a158e0a576.ankimesh</mesh>
+			<material>Assets/column_c_43f866fc7b9f0169.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/arch_support_tiny.ankimesh → Samples/Sponza/Assets/arch_support_tiny_lod0_6e5678a158e0a576.ankimesh


+ 0 - 0
Samples/Sponza/Assets/bricks.ankimtl → Samples/Sponza/Assets/bricks_8bd6f24aa0ad3654.ankimtl


+ 0 - 9
Samples/Sponza/Assets/carpet_fabric_a.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/carpet.ankimesh</mesh>
-			<mesh1>Assets/carpet_lod1.ankimesh</mesh1>
-			<material>Assets/fabric_a.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/carpet_fabric_a_7b2d33bd44d3c83a.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/carpet_lod0_9773eaac1e11dc54.ankimesh</mesh>
+			<mesh1>Assets/carpet_lod1_9773eaac1e11dc54.ankimesh</mesh1>
+			<material>Assets/fabric_a_945c29fc221550fb.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 9
Samples/Sponza/Assets/carpet_fabric_d.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/carpet.ankimesh</mesh>
-			<mesh1>Assets/carpet_lod1.ankimesh</mesh1>
-			<material>Assets/fabric_d.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/carpet_fabric_d_327fde8eebe28165.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/carpet_lod0_9773eaac1e11dc54.ankimesh</mesh>
+			<mesh1>Assets/carpet_lod1_9773eaac1e11dc54.ankimesh</mesh1>
+			<material>Assets/fabric_d_8ff4aebb25bf20b0.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 9
Samples/Sponza/Assets/carpet_fabric_e.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/carpet.ankimesh</mesh>
-			<mesh1>Assets/carpet_lod1.ankimesh</mesh1>
-			<material>Assets/fabric_e.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/carpet_fabric_e_1daa4785c181ff7c.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/carpet_lod0_9773eaac1e11dc54.ankimesh</mesh>
+			<mesh1>Assets/carpet_lod1_9773eaac1e11dc54.ankimesh</mesh1>
+			<material>Assets/fabric_e_d1c5a44841c48230.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/carpet.ankimesh → Samples/Sponza/Assets/carpet_lod0_9773eaac1e11dc54.ankimesh


+ 0 - 0
Samples/Sponza/Assets/carpet_lod1.ankimesh → Samples/Sponza/Assets/carpet_lod1_9773eaac1e11dc54.ankimesh


+ 0 - 0
Samples/Sponza/Assets/ceiling.ankimtl → Samples/Sponza/Assets/ceiling_3fd94cde277a48e1.ankimtl


+ 0 - 9
Samples/Sponza/Assets/ceiling_ceiling.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/ceiling.ankimesh</mesh>
-			<mesh1>Assets/ceiling_lod1.ankimesh</mesh1>
-			<material>Assets/ceiling.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/ceiling_ceiling_652d2c332b14f7c1.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/ceiling_lod0_3fd94cde277a48e1.ankimesh</mesh>
+			<mesh1>Assets/ceiling_lod1_3fd94cde277a48e1.ankimesh</mesh1>
+			<material>Assets/ceiling_3fd94cde277a48e1.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/ceiling.ankimesh → Samples/Sponza/Assets/ceiling_lod0_3fd94cde277a48e1.ankimesh


+ 0 - 0
Samples/Sponza/Assets/ceiling_lod1.ankimesh → Samples/Sponza/Assets/ceiling_lod1_3fd94cde277a48e1.ankimesh


+ 0 - 0
Samples/Sponza/Assets/chain.ankimtl → Samples/Sponza/Assets/chain_33ef478b87fe7c15.ankimtl


+ 0 - 8
Samples/Sponza/Assets/column_a.001_column_a.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/column_a.001.ankimesh</mesh>
-			<material>Assets/column_a.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/column_a.001_column_a_33375155773963c4.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/column_a.001_lod0_d7e2987db26e19ee.ankimesh</mesh>
+			<material>Assets/column_a_1e1bacae3460b88.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/column_a.001.ankimesh → Samples/Sponza/Assets/column_a.001_lod0_d7e2987db26e19ee.ankimesh


+ 0 - 0
Samples/Sponza/Assets/column_a.ankimtl → Samples/Sponza/Assets/column_a_1e1bacae3460b88.ankimtl


+ 0 - 8
Samples/Sponza/Assets/column_a_column_a.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/column_a.ankimesh</mesh>
-			<material>Assets/column_a.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/column_a_column_a_e2bba72dc764b614.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/column_a_lod0_1e1bacae3460b88.ankimesh</mesh>
+			<material>Assets/column_a_1e1bacae3460b88.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/column_a.ankimesh → Samples/Sponza/Assets/column_a_lod0_1e1bacae3460b88.ankimesh


+ 0 - 0
Samples/Sponza/Assets/column_b.ankimtl → Samples/Sponza/Assets/column_b_c9391d56bff59fc3.ankimtl


+ 0 - 9
Samples/Sponza/Assets/column_b_column_b.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/column_b.ankimesh</mesh>
-			<mesh1>Assets/column_b_lod1.ankimesh</mesh1>
-			<material>Assets/column_b.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/column_b_column_b_2147575ec1137d95.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/column_b_lod0_c9391d56bff59fc3.ankimesh</mesh>
+			<mesh1>Assets/column_b_lod1_c9391d56bff59fc3.ankimesh</mesh1>
+			<material>Assets/column_b_c9391d56bff59fc3.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/column_b.ankimesh → Samples/Sponza/Assets/column_b_lod0_c9391d56bff59fc3.ankimesh


+ 0 - 0
Samples/Sponza/Assets/column_b_lod1.ankimesh → Samples/Sponza/Assets/column_b_lod1_c9391d56bff59fc3.ankimesh


+ 0 - 9
Samples/Sponza/Assets/column_b_top_column_b.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/column_b_top.ankimesh</mesh>
-			<mesh1>Assets/column_b_top_lod1.ankimesh</mesh1>
-			<material>Assets/column_b.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/column_b_top_column_b_5a662a93fda5781c.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/column_b_top_lod0_b71e6265349a8db8.ankimesh</mesh>
+			<mesh1>Assets/column_b_top_lod1_b71e6265349a8db8.ankimesh</mesh1>
+			<material>Assets/column_b_c9391d56bff59fc3.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/column_b_top.ankimesh → Samples/Sponza/Assets/column_b_top_lod0_b71e6265349a8db8.ankimesh


+ 0 - 0
Samples/Sponza/Assets/column_b_top_lod1.ankimesh → Samples/Sponza/Assets/column_b_top_lod1_b71e6265349a8db8.ankimesh


+ 0 - 0
Samples/Sponza/Assets/column_c.ankimtl → Samples/Sponza/Assets/column_c_43f866fc7b9f0169.ankimtl


+ 0 - 8
Samples/Sponza/Assets/column_c_column_c.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/column_c.ankimesh</mesh>
-			<material>Assets/column_c.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/column_c_column_c_8cfb4773e7984c6c.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/column_c_lod0_43f866fc7b9f0169.ankimesh</mesh>
+			<material>Assets/column_c_43f866fc7b9f0169.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/column_c.ankimesh → Samples/Sponza/Assets/column_c_lod0_43f866fc7b9f0169.ankimesh


+ 0 - 9
Samples/Sponza/Assets/column_c_small_column_b.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/column_c_small.ankimesh</mesh>
-			<mesh1>Assets/column_c_small_lod1.ankimesh</mesh1>
-			<material>Assets/column_b.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/column_c_small_column_b_60ac9c1e9bb600f6.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/column_c_small_lod0_a940cbc4b06b29e0.ankimesh</mesh>
+			<mesh1>Assets/column_c_small_lod1_a940cbc4b06b29e0.ankimesh</mesh1>
+			<material>Assets/column_b_c9391d56bff59fc3.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/column_c_small.ankimesh → Samples/Sponza/Assets/column_c_small_lod0_a940cbc4b06b29e0.ankimesh


+ 0 - 0
Samples/Sponza/Assets/column_c_small_lod1.ankimesh → Samples/Sponza/Assets/column_c_small_lod1_a940cbc4b06b29e0.ankimesh


+ 0 - 9
Samples/Sponza/Assets/column_c_small_top_column_b.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/column_c_small_top.ankimesh</mesh>
-			<mesh1>Assets/column_c_small_top_lod1.ankimesh</mesh1>
-			<material>Assets/column_b.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/column_c_small_top_column_b_212d13057d434c4c.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/column_c_small_top_lod0_ac474e000598477b.ankimesh</mesh>
+			<mesh1>Assets/column_c_small_top_lod1_ac474e000598477b.ankimesh</mesh1>
+			<material>Assets/column_b_c9391d56bff59fc3.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/column_c_small_top.ankimesh → Samples/Sponza/Assets/column_c_small_top_lod0_ac474e000598477b.ankimesh


+ 0 - 0
Samples/Sponza/Assets/column_c_small_top_lod1.ankimesh → Samples/Sponza/Assets/column_c_small_top_lod1_ac474e000598477b.ankimesh


+ 0 - 8
Samples/Sponza/Assets/column_c_square_column_c.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/column_c_square.ankimesh</mesh>
-			<material>Assets/column_c.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/column_c_square_column_c_31141c63525ac8c7.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/column_c_square_lod0_34f84a5277d35506.ankimesh</mesh>
+			<material>Assets/column_c_43f866fc7b9f0169.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/column_c_square.ankimesh → Samples/Sponza/Assets/column_c_square_lod0_34f84a5277d35506.ankimesh


+ 0 - 0
Samples/Sponza/Assets/details.ankimtl → Samples/Sponza/Assets/details_4242afc5fc479920.ankimtl


+ 0 - 8
Samples/Sponza/Assets/door_b_details.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/door_b.ankimesh</mesh>
-			<material>Assets/details.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/door_b_details_8719c311905b9f09.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/door_b_lod0_43d9d0f054a59e0d.ankimesh</mesh>
+			<material>Assets/details_4242afc5fc479920.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/door_b.ankimesh → Samples/Sponza/Assets/door_b_lod0_43d9d0f054a59e0d.ankimesh


+ 0 - 0
Samples/Sponza/Assets/fabric_a.ankimtl → Samples/Sponza/Assets/fabric_a_945c29fc221550fb.ankimtl


+ 0 - 9
Samples/Sponza/Assets/fabric_a_fabric_c.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/fabric_a.ankimesh</mesh>
-			<mesh1>Assets/fabric_a_lod1.ankimesh</mesh1>
-			<material>Assets/fabric_c.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/fabric_a_fabric_c_c4b70d2083f41709.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/fabric_a_lod0_945c29fc221550fb.ankimesh</mesh>
+			<mesh1>Assets/fabric_a_lod1_945c29fc221550fb.ankimesh</mesh1>
+			<material>Assets/fabric_c_c8bf70dee411d1bd.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/fabric_a.ankimesh → Samples/Sponza/Assets/fabric_a_lod0_945c29fc221550fb.ankimesh


+ 0 - 0
Samples/Sponza/Assets/fabric_a_lod1.ankimesh → Samples/Sponza/Assets/fabric_a_lod1_945c29fc221550fb.ankimesh


+ 0 - 9
Samples/Sponza/Assets/fabric_b_fabric_f.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/fabric_b.ankimesh</mesh>
-			<mesh1>Assets/fabric_b_lod1.ankimesh</mesh1>
-			<material>Assets/fabric_f.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/fabric_b_fabric_f_3f1537f39a3f726f.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/fabric_b_lod0_e8dd2769dc642ab7.ankimesh</mesh>
+			<mesh1>Assets/fabric_b_lod1_e8dd2769dc642ab7.ankimesh</mesh1>
+			<material>Assets/fabric_f_d54bbaca38ed4391.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/fabric_b.ankimesh → Samples/Sponza/Assets/fabric_b_lod0_e8dd2769dc642ab7.ankimesh


+ 0 - 0
Samples/Sponza/Assets/fabric_b_lod1.ankimesh → Samples/Sponza/Assets/fabric_b_lod1_e8dd2769dc642ab7.ankimesh


+ 0 - 0
Samples/Sponza/Assets/fabric_c.ankimtl → Samples/Sponza/Assets/fabric_c_c8bf70dee411d1bd.ankimtl


+ 0 - 0
Samples/Sponza/Assets/fabric_d.ankimtl → Samples/Sponza/Assets/fabric_d_8ff4aebb25bf20b0.ankimtl


+ 0 - 0
Samples/Sponza/Assets/fabric_e.ankimtl → Samples/Sponza/Assets/fabric_e_d1c5a44841c48230.ankimtl


+ 0 - 0
Samples/Sponza/Assets/fabric_f.ankimtl → Samples/Sponza/Assets/fabric_f_d54bbaca38ed4391.ankimtl


+ 0 - 8
Samples/Sponza/Assets/flag_pole_flagpole.ankimdl

@@ -1,8 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/flag_pole.ankimesh</mesh>
-			<material>Assets/flagpole.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 8 - 0
Samples/Sponza/Assets/flag_pole_flagpole_aaa6bb6e0416a890.ankimdl

@@ -0,0 +1,8 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/flag_pole_lod0_b7fcab939d35270d.ankimesh</mesh>
+			<material>Assets/flagpole_6c7e0eb8dd33b39e.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/flag_pole.ankimesh → Samples/Sponza/Assets/flag_pole_lod0_b7fcab939d35270d.ankimesh


+ 0 - 0
Samples/Sponza/Assets/flagpole.ankimtl → Samples/Sponza/Assets/flagpole_6c7e0eb8dd33b39e.ankimtl


+ 0 - 0
Samples/Sponza/Assets/floor.ankimtl → Samples/Sponza/Assets/floor_71cbd2644e53ab8c.ankimtl


+ 0 - 0
Samples/Sponza/Assets/hanging_vase.ankimesh → Samples/Sponza/Assets/hanging_vase_lod0_a37dedd7f8c3beeb.ankimesh


+ 0 - 0
Samples/Sponza/Assets/hanging_vase_lod1.ankimesh → Samples/Sponza/Assets/hanging_vase_lod1_a37dedd7f8c3beeb.ankimesh


+ 0 - 9
Samples/Sponza/Assets/hanging_vase_vase_hanging.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/hanging_vase.ankimesh</mesh>
-			<mesh1>Assets/hanging_vase_lod1.ankimesh</mesh1>
-			<material>Assets/vase_hanging.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/hanging_vase_vase_hanging_706736339658bc85.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/hanging_vase_lod0_a37dedd7f8c3beeb.ankimesh</mesh>
+			<mesh1>Assets/hanging_vase_lod1_a37dedd7f8c3beeb.ankimesh</mesh1>
+			<material>Assets/vase_hanging_c2d2b40b27cacd7d.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/leaf.ankimtl → Samples/Sponza/Assets/leaf_3a245efd17475037.ankimtl


+ 0 - 9
Samples/Sponza/Assets/leaf_b_leaf.ankimdl

@@ -1,9 +0,0 @@
-<model>
-	<modelPatches>
-		<modelPatch>
-			<mesh>Assets/leaf_b.ankimesh</mesh>
-			<mesh1>Assets/leaf_b_lod1.ankimesh</mesh1>
-			<material>Assets/leaf.ankimtl</material>
-		</modelPatch>
-	</modelPatches>
-</model>

+ 9 - 0
Samples/Sponza/Assets/leaf_b_leaf_582f73514dcafca7.ankimdl

@@ -0,0 +1,9 @@
+<model>
+	<modelPatches>
+		<modelPatch>
+			<mesh>Assets/leaf_b_lod0_686ab977af97774c.ankimesh</mesh>
+			<mesh1>Assets/leaf_b_lod1_686ab977af97774c.ankimesh</mesh1>
+			<material>Assets/leaf_3a245efd17475037.ankimtl</material>
+		</modelPatch>
+	</modelPatches>
+</model>

+ 0 - 0
Samples/Sponza/Assets/leaf_b.ankimesh → Samples/Sponza/Assets/leaf_b_lod0_686ab977af97774c.ankimesh


+ 0 - 0
Samples/Sponza/Assets/leaf_b_lod1.ankimesh → Samples/Sponza/Assets/leaf_b_lod1_686ab977af97774c.ankimesh


部分文件因文件數量過多而無法顯示