diff --git a/ToyEngine/Models/pallet_wood/Material_106_baseColor.jpg b/ToyEngine/Models/pallet_wood/Material_106_baseColor.jpg new file mode 100644 index 0000000..8377490 Binary files /dev/null and b/ToyEngine/Models/pallet_wood/Material_106_baseColor.jpg differ diff --git a/ToyEngine/Models/pallet_wood/Material_106_metallicRoughness.png b/ToyEngine/Models/pallet_wood/Material_106_metallicRoughness.png new file mode 100644 index 0000000..ed00b0a Binary files /dev/null and b/ToyEngine/Models/pallet_wood/Material_106_metallicRoughness.png differ diff --git a/ToyEngine/Models/pallet_wood/Material_106_normal.png b/ToyEngine/Models/pallet_wood/Material_106_normal.png new file mode 100644 index 0000000..0c1a405 Binary files /dev/null and b/ToyEngine/Models/pallet_wood/Material_106_normal.png differ diff --git a/ToyEngine/Models/pallet_wood/pallet_wood.bin b/ToyEngine/Models/pallet_wood/pallet_wood.bin new file mode 100644 index 0000000..763c552 Binary files /dev/null and b/ToyEngine/Models/pallet_wood/pallet_wood.bin differ diff --git a/ToyEngine/Models/pallet_wood/pallet_wood.gltf b/ToyEngine/Models/pallet_wood/pallet_wood.gltf new file mode 100644 index 0000000..fc853e9 --- /dev/null +++ b/ToyEngine/Models/pallet_wood/pallet_wood.gltf @@ -0,0 +1,220 @@ +{ + "asset" : { + "generator" : "Khronos glTF Blender I/O v3.4.50", + "version" : "2.0" + }, + "scene" : 0, + "scenes" : [ + { + "name" : "Scene", + "nodes" : [ + 5 + ] + } + ], + "nodes" : [ + { + "mesh" : 0, + "name" : "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd002_Material #106_0", + "translation" : [ + -14.98544692993164, + 7.43948221206665, + 0.0004016915918327868 + ] + }, + { + "children" : [ + 0 + ], + "name" : "Object_4" + }, + { + "children" : [ + 1 + ], + "name" : "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd002", + "rotation" : [ + -0.501552939414978, + 0.49844127893447876, + 0.49844223260879517, + 0.5015538930892944 + ], + "scale" : [ + 1.9006390571594238, + 1.4436899423599243, + 0.13420099020004272 + ] + }, + { + "children" : [ + 2 + ], + "name" : "RootNode" + }, + { + "children" : [ + 3 + ], + "name" : "145a44e480864eafa947fceb6548e111.fbx", + "rotation" : [ + 0.70710688829422, + 0, + 0, + 0.7071066498756409 + ] + }, + { + "children" : [ + 4 + ], + "name" : "Sketchfab_model", + "rotation" : [ + -0.70710688829422, + 0, + 0, + 0.7071066498756409 + ] + } + ], + "materials" : [ + { + "doubleSided" : true, + "name" : "Material_106", + "normalTexture" : { + "index" : 0 + }, + "occlusionTexture" : { + "index" : 1 + }, + "pbrMetallicRoughness" : { + "baseColorTexture" : { + "index" : 2 + }, + "metallicRoughnessTexture" : { + "index" : 1 + } + } + } + ], + "meshes" : [ + { + "name" : "\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd002_Material #106_0", + "primitives" : [ + { + "attributes" : { + "POSITION" : 0, + "TEXCOORD_0" : 1, + "NORMAL" : 2 + }, + "indices" : 3, + "material" : 0 + } + ] + } + ], + "textures" : [ + { + "sampler" : 0, + "source" : 0 + }, + { + "sampler" : 0, + "source" : 1 + }, + { + "sampler" : 0, + "source" : 2 + } + ], + "images" : [ + { + "mimeType" : "image/png", + "name" : "Material_106_normal", + "uri" : "Material_106_normal.png" + }, + { + "mimeType" : "image/png", + "name" : "Material_106_metallicRoughness", + "uri" : "Material_106_metallicRoughness.png" + }, + { + "mimeType" : "image/jpeg", + "name" : "Material_106_baseColor", + "uri" : "Material_106_baseColor.jpg" + } + ], + "accessors" : [ + { + "bufferView" : 0, + "componentType" : 5126, + "count" : 478, + "max" : [ + 49.411319732666016, + 33.26576614379883, + 30.810150146484375 + ], + "min" : [ + -18.004470825195312, + -50.72441864013672, + -109.1097412109375 + ], + "type" : "VEC3" + }, + { + "bufferView" : 1, + "componentType" : 5126, + "count" : 478, + "type" : "VEC2" + }, + { + "bufferView" : 2, + "componentType" : 5126, + "count" : 478, + "type" : "VEC3" + }, + { + "bufferView" : 3, + "componentType" : 5123, + "count" : 540, + "type" : "SCALAR" + } + ], + "bufferViews" : [ + { + "buffer" : 0, + "byteLength" : 5736, + "byteOffset" : 0, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 3824, + "byteOffset" : 5736, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 5736, + "byteOffset" : 9560, + "target" : 34962 + }, + { + "buffer" : 0, + "byteLength" : 1080, + "byteOffset" : 15296, + "target" : 34963 + } + ], + "samplers" : [ + { + "magFilter" : 9729, + "minFilter" : 9987 + } + ], + "buffers" : [ + { + "byteLength" : 16376, + "uri" : "pallet_wood.bin" + } + ] +} diff --git a/ToyEngine/src/DemoWorld.cpp b/ToyEngine/src/DemoWorld.cpp index 26176a1..db2f71d 100644 --- a/ToyEngine/src/DemoWorld.cpp +++ b/ToyEngine/src/DemoWorld.cpp @@ -25,7 +25,7 @@ DemoWorld::DemoWorld() particle->setSpeed(glm::vec3(-1, 0, 0)); particle->setPosition({ 4, 5, 0 }); //particle->addForce(std::make_shared(glm::vec3(0.f, -particle->getMass() * 9.8f, 0.f))); - auto particle2 = std::make_shared(10, "E:\\3D Objects\\pallet_wood\\New Folder\\pallet_wood.gltf"); + auto particle2 = std::make_shared(10, "Models\\pallet_wood\\pallet_wood.gltf"); particle2->setSpeed(glm::vec3(1, 0, 0)); particle2->setPosition({ 6, 5, 0 }); particle2->setScale(glm::vec3{ 0.002 });