From cff46e570e54b4ef5f0da79b9c4da388aea6c483 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sun, 7 Nov 2021 23:09:52 +0100 Subject: [PATCH 01/48] AssimpImporter: add light names --- .../AssimpImporter/AssimpImporter.cpp | 17 +++++++++++++++++ .../AssimpImporter/AssimpImporter.h | 2 ++ .../AssimpImporter/Test/AssimpImporterTest.cpp | 9 +++++++++ 3 files changed, 28 insertions(+) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index c7bc935bf..c9a8ce2ae 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -112,6 +112,7 @@ struct AssimpImporter::File { Containers::Optional> animationsForName, + lightsForName, meshesForName, skinsForName; @@ -731,6 +732,22 @@ UnsignedInt AssimpImporter::doLightCount() const { return _f->scene->mNumLights; } +Int AssimpImporter::doLightForName(const std::string& name) { + if(!_f->lightsForName) { + _f->lightsForName.emplace(); + _f->lightsForName->reserve(_f->scene->mNumLights); + for(std::size_t i = 0; i != _f->scene->mNumLights; ++i) + _f->lightsForName->emplace(std::string(_f->scene->mLights[i]->mName.C_Str()), i); + } + + const auto found = _f->lightsForName->find(name); + return found == _f->lightsForName->end() ? -1 : found->second; +} + +std::string AssimpImporter::doLightName(const UnsignedInt id) { + return _f->scene->mLights[id]->mName.C_Str(); +} + Containers::Optional AssimpImporter::doLight(UnsignedInt id) { const aiLight* l = _f->scene->mLights[id]; diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h index d23113c2e..a2da1d250 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h @@ -455,6 +455,8 @@ class MAGNUM_ASSIMPIMPORTER_EXPORT AssimpImporter: public AbstractImporter { MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Pointer doObject3D(UnsignedInt id) override; MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doLightCount() const override; + MAGNUM_ASSIMPIMPORTER_LOCAL Int doLightForName(const std::string& name) override; + MAGNUM_ASSIMPIMPORTER_LOCAL std::string doLightName(UnsignedInt id) override; MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional doLight(UnsignedInt id) override; MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doMeshCount() const override; diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index a8c8ab7b8..244f9ea81 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -1503,9 +1503,12 @@ void AssimpImporterTest::light() { CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "light.dae"))); CORRADE_COMPARE(importer->lightCount(), 4); + CORRADE_COMPARE(importer->lightForName(""), -1); /* Spot light */ { + CORRADE_COMPARE(importer->lightName(0), "Spot"); + CORRADE_COMPARE(importer->lightForName("Spot"), 0); auto light = importer->light(0); CORRADE_VERIFY(light); CORRADE_COMPARE(light->type(), LightData::Type::Spot); @@ -1520,6 +1523,8 @@ void AssimpImporterTest::light() { /* Point light */ } { + CORRADE_COMPARE(importer->lightName(1), "Point"); + CORRADE_COMPARE(importer->lightForName("Point"), 1); auto light = importer->light(1); CORRADE_VERIFY(light); CORRADE_COMPARE(light->type(), LightData::Type::Point); @@ -1530,6 +1535,8 @@ void AssimpImporterTest::light() { /* Directional light */ } { + CORRADE_COMPARE(importer->lightName(2), "Sun"); + CORRADE_COMPARE(importer->lightForName("Sun"), 2); auto light = importer->light(2); CORRADE_VERIFY(light); CORRADE_COMPARE(light->type(), LightData::Type::Directional); @@ -1540,6 +1547,8 @@ void AssimpImporterTest::light() { /* Ambient light -- imported as Point with no attenuation */ } { + CORRADE_COMPARE(importer->lightName(3), "Ambient"); + CORRADE_COMPARE(importer->lightForName("Ambient"), 3); auto light = importer->light(3); CORRADE_VERIFY(light); CORRADE_COMPARE(light->type(), LightData::Type::Point); From 67c5985e8315964aeda9b76e8c4ee69c7d7e37a0 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 13 Nov 2021 19:04:49 +0100 Subject: [PATCH 02/48] AssimpImporter: import ambient lights as LightData::Type::Ambient --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 2 +- src/MagnumPlugins/AssimpImporter/AssimpImporter.h | 2 -- src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index c9a8ce2ae..93703cbdb 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -763,7 +763,7 @@ Containers::Optional AssimpImporter::doLight(UnsignedInt id) { lightType = LightData::Type::Spot; color = Color3{l->mColorDiffuse}; } else if(l->mType == aiLightSource_AMBIENT) { - lightType = LightData::Type::Point; + lightType = LightData::Type::Ambient; color = Color3{l->mColorAmbient}; } else { /** @todo area lights */ diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h index a2da1d250..0dbdc53c0 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h @@ -278,8 +278,6 @@ verbosity levels in each instance. - @ref LightData::intensity() is always @cpp 1.0f @ce, instead Assimp premultiplies @ref LightData::color() with the intensity -- Ambient lights are imported as @ref LightData::Type::Point with attenuation - set to @cpp {1.0f, 0.0f, 0.0f} @ce - The following properties are ignored: - Specular color - Custom light orientation vectors --- the orientation is always only diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 244f9ea81..a4fb247ec 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -1545,13 +1545,13 @@ void AssimpImporterTest::light() { CORRADE_COMPARE(light->color(), (Color3{1.0f, 0.15f, 0.45f})*10.0f); CORRADE_COMPARE(light->intensity(), 1.0f); - /* Ambient light -- imported as Point with no attenuation */ + /* Ambient light */ } { CORRADE_COMPARE(importer->lightName(3), "Ambient"); CORRADE_COMPARE(importer->lightForName("Ambient"), 3); auto light = importer->light(3); CORRADE_VERIFY(light); - CORRADE_COMPARE(light->type(), LightData::Type::Point); + CORRADE_COMPARE(light->type(), LightData::Type::Ambient); CORRADE_COMPARE(light->color(), (Color3{0.01f, 0.02f, 0.05f})); CORRADE_COMPARE(light->intensity(), 1.0f); CORRADE_COMPARE(light->attenuation(), (Vector3{1.0f, 0.0f, 0.0f})); From 060bf346b0a83a6ab0cd2d02adbbd584014e82de Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 13 Nov 2021 19:08:03 +0100 Subject: [PATCH 03/48] AssimpImporter: import camera name and aspect ratio --- .../AssimpImporter/AssimpImporter.cpp | 23 +++++++++- .../AssimpImporter/AssimpImporter.h | 4 +- .../Test/AssimpImporterTest.cpp | 44 ++++++++++++++----- .../AssimpImporter/Test/camera.dae | 15 +++++++ 4 files changed, 72 insertions(+), 14 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 93703cbdb..1d557eced 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -112,6 +112,7 @@ struct AssimpImporter::File { Containers::Optional> animationsForName, + camerasForName, lightsForName, meshesForName, skinsForName; @@ -644,10 +645,28 @@ UnsignedInt AssimpImporter::doCameraCount() const { return _f->scene->mNumCameras; } +Int AssimpImporter::doCameraForName(const std::string& name) { + if(!_f->camerasForName) { + _f->camerasForName.emplace(); + _f->camerasForName->reserve(_f->scene->mNumCameras); + for(std::size_t i = 0; i != _f->scene->mNumCameras; ++i) + _f->camerasForName->emplace(std::string(_f->scene->mCameras[i]->mName.C_Str()), i); + } + + const auto found = _f->camerasForName->find(name); + return found == _f->camerasForName->end() ? -1 : found->second; +} + +std::string AssimpImporter::doCameraName(const UnsignedInt id) { + return _f->scene->mCameras[id]->mName.C_Str(); +} + Containers::Optional AssimpImporter::doCamera(UnsignedInt id) { const aiCamera* cam = _f->scene->mCameras[id]; - /** @todo aspect and up vector are not used... */ - return CameraData{CameraType::Perspective3D, Rad(cam->mHorizontalFOV), 1.0f, cam->mClipPlaneNear, cam->mClipPlaneFar, cam}; + /** @todo up vector is not used */ + /** @todo assimp 5.1RC1 has mOrthographicWidth, import as Orthographic3D */ + const Float aspect = cam->mAspect > 0.0f ? cam->mAspect : 1.0f; + return CameraData{CameraType::Perspective3D, Rad(cam->mHorizontalFOV), aspect, cam->mClipPlaneNear, cam->mClipPlaneFar, cam}; } UnsignedInt AssimpImporter::doObject3DCount() const { diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h index 0dbdc53c0..32a405648 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h @@ -286,7 +286,7 @@ verbosity levels in each instance. @subsection Trade-AssimpImporter-behavior-cameras Camera import -- Aspect and up vector properties are not imported +- Up vector property is not imported @subsection Trade-AssimpImporter-behavior-meshes Mesh import @@ -445,6 +445,8 @@ class MAGNUM_ASSIMPIMPORTER_EXPORT AssimpImporter: public AbstractImporter { MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional doScene(UnsignedInt id) override; MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doCameraCount() const override; + MAGNUM_ASSIMPIMPORTER_LOCAL Int doCameraForName(const std::string& name) override; + MAGNUM_ASSIMPIMPORTER_LOCAL std::string doCameraName(UnsignedInt id) override; MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional doCamera(UnsignedInt id) override; MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doObject3DCount() const override; diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index a4fb247ec..551aabd69 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -1484,18 +1484,38 @@ void AssimpImporterTest::camera() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "camera.dae"))); - CORRADE_COMPARE(importer->cameraCount(), 1); - Containers::Optional camera = importer->camera(0); - CORRADE_VERIFY(camera); - CORRADE_COMPARE(camera->fov(), 49.13434_degf); - CORRADE_COMPARE(camera->near(), 0.123f); - CORRADE_COMPARE(camera->far(), 123.0f); + CORRADE_COMPARE(importer->cameraCount(), 2); + + CORRADE_COMPARE(importer->cameraName(0), "Camera"); + CORRADE_COMPARE(importer->cameraForName("Camera"), 0); + CORRADE_COMPARE(importer->cameraName(1), "Camera-no-aspect"); + CORRADE_COMPARE(importer->cameraForName("Camera-no-aspect"), 1); + CORRADE_COMPARE(importer->cameraForName(""), -1); + + Containers::Optional camera1 = importer->camera(0); + CORRADE_VERIFY(camera1); + CORRADE_COMPARE(camera1->fov(), 49.13434_degf); + CORRADE_COMPARE(camera1->aspectRatio(), 1.77777f); + CORRADE_COMPARE(camera1->near(), 0.123f); + CORRADE_COMPARE(camera1->far(), 123.0f); + + Containers::Optional camera2 = importer->camera(1); + CORRADE_VERIFY(camera2); + CORRADE_COMPARE(camera2->fov(), 12.347_degf); + /* No aspect ratio, defaults to 1 */ + CORRADE_COMPARE(camera2->aspectRatio(), 1.0f); + CORRADE_COMPARE(camera2->near(), 0.1f); + CORRADE_COMPARE(camera2->far(), 2.0f); - CORRADE_COMPARE(importer->object3DCount(), 1); + CORRADE_COMPARE(importer->object3DCount(), 2); + + Containers::Pointer cameraObject1 = importer->object3D(0); + CORRADE_COMPARE(cameraObject1->instanceType(), ObjectInstanceType3D::Camera); + CORRADE_COMPARE(cameraObject1->instance(), 0); - Containers::Pointer cameraObject = importer->object3D(0); - CORRADE_COMPARE(cameraObject->instanceType(), ObjectInstanceType3D::Camera); - CORRADE_COMPARE(cameraObject->instance(), 0); + Containers::Pointer cameraObject2 = importer->object3D(1); + CORRADE_COMPARE(cameraObject2->instanceType(), ObjectInstanceType3D::Camera); + CORRADE_COMPARE(cameraObject2->instance(), 1); } void AssimpImporterTest::light() { @@ -3144,7 +3164,7 @@ void AssimpImporterTest::openTwice() { void AssimpImporterTest::importTwice() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "camera.dae"))); - CORRADE_COMPARE(importer->cameraCount(), 1); + CORRADE_COMPARE(importer->cameraCount(), 2); /* Verify that everything is working the same way on second use. It's only testing a single data type, but better than nothing at all. */ @@ -3152,12 +3172,14 @@ void AssimpImporterTest::importTwice() { Containers::Optional camera = importer->camera(0); CORRADE_VERIFY(camera); CORRADE_COMPARE(camera->fov(), 49.13434_degf); + CORRADE_COMPARE(camera->aspectRatio(), 1.77777f); CORRADE_COMPARE(camera->near(), 0.123f); CORRADE_COMPARE(camera->far(), 123.0f); } { Containers::Optional camera = importer->camera(0); CORRADE_VERIFY(camera); CORRADE_COMPARE(camera->fov(), 49.13434_degf); + CORRADE_COMPARE(camera->aspectRatio(), 1.77777f); CORRADE_COMPARE(camera->near(), 0.123f); CORRADE_COMPARE(camera->far(), 123.0f); } diff --git a/src/MagnumPlugins/AssimpImporter/Test/camera.dae b/src/MagnumPlugins/AssimpImporter/Test/camera.dae index 4dd004ed4..9f0350715 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/camera.dae +++ b/src/MagnumPlugins/AssimpImporter/Test/camera.dae @@ -13,6 +13,17 @@ + + + + + 12.347 + 0.1 + 2.0 + + + + @@ -20,6 +31,10 @@ -0.2988363 -0.2988363 0.9063078 0.1 0.6408563 0.6408564 0.4226183 0.2 -0.7071068 0.7071068 -3.09086e-8 0.3 0 0 0 1 + + -0.2988363 -0.2988363 0.9063078 0.1 0.6408563 0.6408564 0.4226183 0.2 -0.7071068 0.7071068 -3.09086e-8 0.3 0 0 0 1 + + From 3923e073e19fc6fca7ad32e19ae5220580fa922a Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 13 Nov 2021 19:16:44 +0100 Subject: [PATCH 04/48] AssimpImporter: fix try_compile for assimp 5.1.0 --- src/MagnumPlugins/AssimpImporter/CMakeLists.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt index 6ef8ab1c1..a9ced8c6f 100644 --- a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt @@ -59,6 +59,18 @@ else() set(_ASSIMP_TRY_COMPILE_LINK_OR_INCLUDE LINK_LIBRARIES Assimp::Assimp) endif() +# Newer versions of Assimp add C compile features that end up being propagated +# to installed CMake targets: +# https://github.com/assimp/assimp/commit/799384f2b85b8d3ee9c5b9e18bbe532b4dc7c63c +# This can fail in try_compile because it uses the file extension to determine +# the language and then doesn't look for a C compiler for the required feature. +# CMAKE_PROJECT_[PROJECT]_INCLUDE allows us to include a script after any +# project() calls in try_compile, which then injects a call to +# enable_language(C). CMAKE_TRY_COMPILE is the name of the project in the +# temporary CMakeList.txt created by try_compile: +# https://github.com/Kitware/CMake/blob/v3.4.0/Source/cmCoreTryCompile.cxx#L313 +file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/checkAssimpVersionLanguageOverride.cmake "enable_language(C)") + # Go through all versions of interest and pick the highest one that compiles foreach(_version 20201123 20190915 20151031) try_compile(_works ${CMAKE_CURRENT_BINARY_DIR} @@ -71,6 +83,8 @@ foreach(_version 20201123 20190915 20151031) # CORRADE_CXX_STANDARD property doesn't get passed through. So I # have to use an internal variable for that instead. ${CORRADE_CXX11_STANDARD_FLAG} + CMAKE_FLAGS + -DCMAKE_PROJECT_CMAKE_TRY_COMPILE_INCLUDE=${CMAKE_CURRENT_BINARY_DIR}/checkAssimpVersionLanguageOverride.cmake OUTPUT_VARIABLE _version_output) if(_works) set(ASSIMP_VERSION ${_version}) From aadd9584675ad5c1c62d0a4b40d5f754b3bf2307 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 13 Nov 2021 19:20:59 +0100 Subject: [PATCH 05/48] AssimpImporter: streamline version check in tests --- .../AssimpImporter/CMakeLists.txt | 2 +- .../Test/AssimpImporterTest.cpp | 146 +++++++++--------- .../AssimpImporter/checkAssimpVersion.cpp | 6 + .../AssimpImporter/configureInternal.h.cmake | 1 + 4 files changed, 78 insertions(+), 77 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt index a9ced8c6f..caf015f85 100644 --- a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt @@ -72,7 +72,7 @@ endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/checkAssimpVersionLanguageOverride.cmake "enable_language(C)") # Go through all versions of interest and pick the highest one that compiles -foreach(_version 20201123 20190915 20151031) +foreach(_version 20201123 20191122 20190915 20151031) try_compile(_works ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/checkAssimpVersion.cpp ${_ASSIMP_TRY_COMPILE_LINK_OR_INCLUDE} diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 551aabd69..d66678bdb 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -162,6 +162,8 @@ struct AssimpImporterTest: TestSuite::Tester { /* Needs to load AnyImageImporter from system-wide location */ PluginManager::Manager _manager; + + unsigned int _assimpVersion; }; constexpr struct { @@ -313,8 +315,21 @@ AssimpImporterTest::AssimpImporterTest() { #ifdef STBIMAGEIMPORTER_PLUGIN_FILENAME CORRADE_INTERNAL_ASSERT_OUTPUT(_manager.load(STBIMAGEIMPORTER_PLUGIN_FILENAME) & PluginManager::LoadState::Loaded); #endif + + _assimpVersion = aiGetVersionMajor()*100 + aiGetVersionMinor()*10 + #if ASSIMP_HAS_VERSION_PATCH + + aiGetVersionPatch() + #endif + ; + + /* Assimp 5.0.0 reports itself as 4.1.0 */ + #if ASSIMP_IS_VERSION_5 + _assimpVersion = Math::max(_assimpVersion, 500u); + #endif } +using namespace Containers::Literals; + void AssimpImporterTest::openFile() { auto&& data = VerboseData[testCaseInstanceId()]; setTestCaseDescription(data.name); @@ -381,27 +396,26 @@ void AssimpImporterTest::openDataFailed() { /* This does not indicate general assimp animation support, only used to skip tests on certain versions and test files. */ -bool supportsAnimation(const Containers::StringView fileName) { +bool supportsAnimation(const Containers::StringView fileName, unsigned int assimpVersion) { /* 5.0.0 supports all of Collada, FBX, glTF */ - #if ASSIMP_IS_VERSION_5 - static_cast(fileName); - return true; - #else - if(fileName.hasSuffix(".gltf")) return false; - - const unsigned int version = aiGetVersionMajor()*100 + aiGetVersionMinor(); - CORRADE_INTERNAL_ASSERT(fileName.hasSuffix(".dae") || fileName.hasSuffix(".fbx")); - /* That's as far back as I checked, both Collada and FBX animations - supported */ - return version >= 302; - #endif + if(assimpVersion >= 500) { + static_cast(fileName); + return true; + } else if(fileName.hasSuffix(".gltf"_s)) { + return false; + } else { + CORRADE_INTERNAL_ASSERT(fileName.hasSuffix(".dae"_s) || fileName.hasSuffix(".fbx"_s)); + /* That's as far back as I checked, both Collada and FBX animations + supported */ + return assimpVersion >= 320; + } } void AssimpImporterTest::animation() { auto&& data = ExportedFileData[testCaseInstanceId()]; setTestCaseDescription(data.name); - if(!supportsAnimation(data.suffix)) + if(!supportsAnimation(data.suffix, _assimpVersion)) CORRADE_SKIP("Animation for this file type is not supported with the current version of Assimp"); /* Animation created and exported with Blender. Most animation tracks got @@ -560,7 +574,7 @@ const Containers::StaticArray<3, AnimationTarget> AnimationGltfLinearTargets{ }; void AssimpImporterTest::animationGltf() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); /* Using the same files as TinyGltfImporterTest, but modified to include a @@ -684,7 +698,7 @@ void AssimpImporterTest::animationGltf() { } void AssimpImporterTest::animationGltfNoScene() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); /* This reuses the TinyGltfImporter test files, not the corrected ones used by other tests. */ @@ -697,11 +711,12 @@ void AssimpImporterTest::animationGltfNoScene() { } void AssimpImporterTest::animationGltfBrokenSplineWarning() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); - if(!ASSIMP_HAS_BROKEN_GLTF_SPLINES) - CORRADE_SKIP("Current version of assimp correctly imports glTF spline-interpolated animations."); + #if !ASSIMP_HAS_BROKEN_GLTF_SPLINES + CORRADE_SKIP("Current version of assimp correctly imports glTF spline-interpolated animations."); + #endif Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -717,7 +732,7 @@ void AssimpImporterTest::animationGltfBrokenSplineWarning() { } void AssimpImporterTest::animationGltfSpline() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -830,15 +845,10 @@ void AssimpImporterTest::animationGltfTicksPerSecondPatching() { auto&& data = VerboseData[testCaseInstanceId()]; setTestCaseDescription(data.name); - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); - /* This was fixed right after 5.0.0, but 5.0.1 only selected compilation - fixes and didn't bump the minor version. Boldly assuming the next - minor version will have fixes from 2019. */ - const unsigned int version = aiGetVersionMajor()*100 + aiGetVersionMinor(); - const bool hasInvalidTicksPerSecond = version <= 500; - if(!hasInvalidTicksPerSecond) + if(_assimpVersion > 500) CORRADE_SKIP("Current version of assimp correctly sets glTF ticks per second."); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -863,7 +873,7 @@ void AssimpImporterTest::animationDummyTracksRemovalEnabled() { auto&& data = VerboseData[testCaseInstanceId()]; setTestCaseDescription(data.name); - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); /* Correct removal is already implicitly tested in animationGltf(), @@ -923,7 +933,7 @@ void AssimpImporterTest::animationDummyTracksRemovalDisabled() { auto&& data = VerboseData[testCaseInstanceId()]; setTestCaseDescription(data.name); - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -979,7 +989,7 @@ void AssimpImporterTest::animationDummyTracksRemovalDisabled() { } void AssimpImporterTest::animationShortestPathOptimizationEnabled() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -1031,7 +1041,7 @@ void AssimpImporterTest::animationShortestPathOptimizationEnabled() { } void AssimpImporterTest::animationShortestPathOptimizationDisabled() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -1104,7 +1114,7 @@ void AssimpImporterTest::animationShortestPathOptimizationDisabled() { } void AssimpImporterTest::animationQuaternionNormalizationEnabled() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -1142,7 +1152,7 @@ void AssimpImporterTest::animationQuaternionNormalizationEnabled() { } void AssimpImporterTest::animationQuaternionNormalizationDisabled() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -1169,7 +1179,7 @@ void AssimpImporterTest::animationQuaternionNormalizationDisabled() { } void AssimpImporterTest::animationMergeEmpty() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -1183,7 +1193,7 @@ void AssimpImporterTest::animationMergeEmpty() { } void AssimpImporterTest::animationMerge() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -1285,8 +1295,8 @@ void AssimpImporterTest::animationMerge() { } /* The checks are identical to animation support so re-use that. */ -bool supportsSkinning(const Containers::StringView fileName) { - return supportsAnimation(fileName); +bool supportsSkinning(const Containers::StringView fileName, unsigned int assimpVersion) { + return supportsAnimation(fileName, assimpVersion); } void calculateTransforms(Containers::ArrayView transforms, Containers::ArrayView objects, UnsignedInt objectId, const Matrix4& parentTransform = {}) { @@ -1300,7 +1310,7 @@ void AssimpImporterTest::skin() { auto&& data = ExportedFileData[testCaseInstanceId()]; setTestCaseDescription(data.name); - if(!supportsSkinning(data.suffix)) + if(!supportsSkinning(data.suffix, _assimpVersion)) CORRADE_SKIP("Skin data for this file type is not supported with the current version of Assimp"); /* Skinned mesh imported into Blender and then exported */ @@ -1395,7 +1405,7 @@ void AssimpImporterTest::skin() { } void AssimpImporterTest::skinNoMeshes() { - if(!supportsSkinning(".gltf")) + if(!supportsSkinning(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 skinning is not supported with the current version of Assimp"); /* Reusing the TinyGltfImporter test file without meshes */ @@ -1424,7 +1434,7 @@ void AssimpImporterTest::skinMergeEmpty() { } void AssimpImporterTest::skinMerge() { - if(!supportsAnimation(".gltf")) + if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("GLTF skinning is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -1617,9 +1627,8 @@ void AssimpImporterTest::materialColor() { CORRADE_COMPARE(phong.specularColor(), (Color4{0.15f, 0.1f, 0.05f, 0.5f})); CORRADE_COMPARE(phong.shininess(), 50.0f); - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /* Ancient assimp version add "-material" suffix */ - if(version < 302) { + if(_assimpVersion < 320) { CORRADE_COMPARE(importer->materialForName("Material-material"), 0); CORRADE_COMPARE(importer->materialName(0), "Material-material"); } else { @@ -1682,8 +1691,7 @@ void AssimpImporterTest::materialColorTexture() { /* Newer versions import also useless zero texcoords. Not sure if it's since 4.0 or 5.0, but definitely 3.2 returns 7. */ - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); - if(version < 400) + if(_assimpVersion < 400) CORRADE_COMPARE(material->attributeCount(), 7); else CORRADE_COMPARE(material->attributeCount(), 10); @@ -1717,11 +1725,8 @@ void AssimpImporterTest::materialStlWhiteAmbientPatch() { CORRADE_VERIFY(material); CORRADE_COMPARE(material->types(), MaterialType::Phong); - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); { - /* aiGetVersion*() returns 401 for assimp 5, FFS, so we have to check - differently. See CMakeLists.txt for details. */ - CORRADE_EXPECT_FAIL_IF(version < 401 || ASSIMP_IS_VERSION_5, + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 410 || _assimpVersion >= 500, "Assimp < 4.1 and >= 5.0 behaves properly regarding STL material ambient"); CORRADE_COMPARE(out.str(), "Trade::AssimpImporter::material(): white ambient detected, forcing back to black\n"); } @@ -1729,13 +1734,13 @@ void AssimpImporterTest::materialStlWhiteAmbientPatch() { const auto& phong = material->as(); CORRADE_VERIFY(!phong.hasAttribute(MaterialAttribute::AmbientTexture)); /* WHY SO COMPLICATED, COME ON */ - if(version < 401 || ASSIMP_IS_VERSION_5) + if(_assimpVersion < 410 || _assimpVersion >= 500) CORRADE_COMPARE(phong.ambientColor(), Color3{0.05f}); else CORRADE_COMPARE(phong.ambientColor(), 0x000000_srgbf); /* ASS IMP WHAT?! WHY 3.2 is different from 3.0 and 4.0?! */ - if(version == 302) { + if(_assimpVersion == 320) { CORRADE_COMPARE(phong.specularColor(), Color3{0.6f}); CORRADE_COMPARE(phong.diffuseColor(), Color3{0.6f}); } else { @@ -1951,9 +1956,8 @@ void AssimpImporterTest::mesh() { {0.5f, 1.0f}, {0.75f, 0.5f}, {0.5f, 0.9f} }), TestSuite::Compare::Container); - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); { - CORRADE_EXPECT_FAIL_IF(version < 302, + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 320, "Assimp < 3.2 loads incorrect alpha value for the last color."); CORRADE_COMPARE_AS(mesh->attribute(MeshAttribute::Color), Containers::arrayView({ @@ -2072,7 +2076,7 @@ void AssimpImporterTest::meshSkinningAttributes() { auto&& data = ExportedFileData[testCaseInstanceId()]; setTestCaseDescription(data.name); - if(!supportsSkinning(data.suffix)) + if(!supportsSkinning(data.suffix, _assimpVersion)) CORRADE_SKIP("Skin data for this file type is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -2147,7 +2151,7 @@ void AssimpImporterTest::meshSkinningAttributesMultiple() { } void AssimpImporterTest::meshSkinningAttributesMultipleGltf() { - if(!supportsSkinning(".gltf")) + if(!supportsSkinning(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 skinning is not supported with the current version of Assimp"); /* Assimp glTF 2 importer only reads the last(!) set of joint weights */ @@ -2244,7 +2248,7 @@ void AssimpImporterTest::meshSkinningAttributesMaxJointWeights() { } void AssimpImporterTest::meshSkinningAttributesDummyWeightRemoval() { - if(!supportsSkinning(".gltf")) + if(!supportsSkinning(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 skinning is not supported with the current version of Assimp"); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -2332,7 +2336,7 @@ void AssimpImporterTest::meshSkinningAttributesMerge() { void AssimpImporterTest::meshMultiplePrimitives() { /* Possibly broken in other versions too (4.1 and 5 works, 3.2 doesn't) */ - if(aiGetVersionMajor()*100 + aiGetVersionMinor() <= 302) + if(_assimpVersion <= 320) CORRADE_SKIP("Assimp 3.2 doesn't recognize primitives used in the test COLLADA file."); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -2475,8 +2479,7 @@ void AssimpImporterTest::emptyCollada() { } void AssimpImporterTest::emptyGltf() { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); - if(version < 401) + if(_assimpVersion < 410) CORRADE_SKIP("glTF 2 is supported since Assimp 4.1."); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -2560,9 +2563,8 @@ void AssimpImporterTest::sceneCollapsedNode() { /* Name of the scene is used for the root object */ { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /** @todo Possibly works with other versions (definitely not 3.0) */ - CORRADE_EXPECT_FAIL_IF(version <= 302, + CORRADE_EXPECT_FAIL_IF(_assimpVersion <= 320, "Assimp 3.2 and below doesn't use name of the root node for collapsed nodes."); CORRADE_COMPARE(importer->object3DForName("Scene"), 0); CORRADE_COMPARE(importer->object3DName(0), "Scene"); @@ -2684,8 +2686,7 @@ void AssimpImporterTest::imageEmbedded() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); - if(version <= 302) + if(_assimpVersion <= 320) CORRADE_SKIP("Assimp < 3.2 can't load embedded textures in blend files, Assimp 3.2 can't detect blend file format when opening a memory location."); /* Open as data, so we verify opening embedded images from data does not @@ -2701,9 +2702,8 @@ void AssimpImporterTest::imageEmbedded() { } void AssimpImporterTest::imageExternal() { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /** @todo Possibly works with earlier versions (definitely not 3.0) */ - if(version < 302) + if(_assimpVersion < 320) CORRADE_SKIP("Current version of assimp would SEGFAULT on this test."); if(_manager.loadState("PngImporter") == PluginManager::LoadState::NotFound) @@ -2721,9 +2721,8 @@ void AssimpImporterTest::imageExternal() { } void AssimpImporterTest::imageExternalNotFound() { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /** @todo Possibly fails on more versions (definitely w/ 3.0 and 3.2) */ - if(version <= 302) + if(_assimpVersion <= 320) CORRADE_SKIP("Assimp <= 3.2 would SEGFAULT on this test."); if(_manager.loadState("PngImporter") == PluginManager::LoadState::NotFound) @@ -2744,9 +2743,8 @@ void AssimpImporterTest::imageExternalNotFound() { } void AssimpImporterTest::imageExternalNoPathNoCallback() { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /** @todo Possibly works with earlier versions (definitely not 3.0) */ - if(version < 302) + if(_assimpVersion < 320) CORRADE_SKIP("Current version of assimp would SEGFAULT on this test."); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -2835,9 +2833,8 @@ void AssimpImporterTest::imageMipLevels() { } void AssimpImporterTest::texture() { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /** @todo Possibly works with earlier versions (definitely not 3.0) */ - if(version < 302) + if(_assimpVersion < 320) CORRADE_SKIP("Current version of assimp would SEGFAULT on this test."); if(_manager.loadState("PngImporter") == PluginManager::LoadState::NotFound) @@ -2936,9 +2933,8 @@ void AssimpImporterTest::openState() { } void AssimpImporterTest::openStateTexture() { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /** @todo Possibly works with earlier versions (definitely not 3.0) */ - if(version < 302) + if(_assimpVersion < 320) CORRADE_SKIP("Current version of assimp would SEGFAULT on this test."); if(_manager.loadState("PngImporter") == PluginManager::LoadState::NotFound) @@ -3097,9 +3093,8 @@ void AssimpImporterTest::fileCallbackReset() { } void AssimpImporterTest::fileCallbackImage() { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /** @todo Possibly works with earlier versions (definitely not 3.0) */ - if(version < 302) + if(_assimpVersion < 320) CORRADE_SKIP("Current version of assimp would SEGFAULT on this test."); if(_manager.loadState("PngImporter") == PluginManager::LoadState::NotFound) @@ -3127,9 +3122,8 @@ void AssimpImporterTest::fileCallbackImage() { } void AssimpImporterTest::fileCallbackImageNotFound() { - const UnsignedInt version = aiGetVersionMajor()*100 + aiGetVersionMinor(); /** @todo Possibly works with earlier versions (definitely not 3.0) */ - if(version < 302) + if(_assimpVersion < 320) CORRADE_SKIP("Current version of assimp would SEGFAULT on this test."); if(_manager.loadState("PngImporter") == PluginManager::LoadState::NotFound) diff --git a/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp b/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp index f8394aadd..e3f63bf73 100644 --- a/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp +++ b/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp @@ -48,6 +48,12 @@ int main() { scene.mName = ""; #endif + /* Support for patch version information. + https://github.com/assimp/assimp/commit/5cfb0fd633372bbbec87f08015139d71d330d4a6 */ + #if CHECK_VERSION >= 20191122 + ret = static_cast(aiGetVersionPatch()); + #endif + /* Assimp 5. Of all the things that could break, this version reports itself as 4.1. Since some of the insane awful bugs got fixed in version 5, the test has to check against the version in order to adjust expectations. The only way I diff --git a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake index 46ed01a81..273470990 100644 --- a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake +++ b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake @@ -26,4 +26,5 @@ #define ASSIMP_VERSION ${ASSIMP_VERSION} #define ASSIMP_IS_VERSION_5 (ASSIMP_VERSION >= 20190915) +#define ASSIMP_HAS_VERSION_PATCH (ASSIMP_VERSION >= 20191122) #define ASSIMP_HAS_BROKEN_GLTF_SPLINES (ASSIMP_VERSION < 20201123) From 32314c4b0bb610fb780f472e17e84f43e9a84ccc Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 13 Nov 2021 19:22:24 +0100 Subject: [PATCH 06/48] AssimpImporter: import scene name --- .../AssimpImporter/AssimpImporter.cpp | 16 ++++++++++++++++ .../AssimpImporter/AssimpImporter.h | 2 ++ .../Test/AssimpImporterTest.cpp | 19 +++++++++++++++++++ .../AssimpImporter/Test/CMakeLists.txt | 1 + .../AssimpImporter/Test/scene-name.gltf | 19 +++++++++++++++++++ .../AssimpImporter/configureInternal.h.cmake | 1 + 6 files changed, 58 insertions(+) create mode 100644 src/MagnumPlugins/AssimpImporter/Test/scene-name.gltf diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 1d557eced..173d06c7c 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -624,6 +624,22 @@ Int AssimpImporter::doDefaultScene() const { return _f->scene->mRootNode ? 0 : - UnsignedInt AssimpImporter::doSceneCount() const { return _f->scene->mRootNode ? 1 : 0; } +Int AssimpImporter::doSceneForName(const std::string& name) { + #if ASSIMP_HAS_SCENE_NAME + if(_f->scene->mRootNode && name == _f->scene->mName.C_Str()) + return 0; + #endif + return -1; +} + +std::string AssimpImporter::doSceneName(UnsignedInt) { + #if ASSIMP_HAS_SCENE_NAME + return _f->scene->mName.C_Str(); + #else + return {}; + #endif +} + Containers::Optional AssimpImporter::doScene(UnsignedInt) { const aiNode* root = _f->scene->mRootNode; diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h index 32a405648..9c422dfde 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h @@ -442,6 +442,8 @@ class MAGNUM_ASSIMPIMPORTER_EXPORT AssimpImporter: public AbstractImporter { MAGNUM_ASSIMPIMPORTER_LOCAL Int doDefaultScene() const override; MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doSceneCount() const override; + MAGNUM_ASSIMPIMPORTER_LOCAL Int doSceneForName(const std::string& name) override; + MAGNUM_ASSIMPIMPORTER_LOCAL std::string doSceneName(UnsignedInt id) override; MAGNUM_ASSIMPIMPORTER_LOCAL Containers::Optional doScene(UnsignedInt id) override; MAGNUM_ASSIMPIMPORTER_LOCAL UnsignedInt doCameraCount() const override; diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index d66678bdb..e59cb3de0 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -131,6 +131,7 @@ struct AssimpImporterTest: TestSuite::Tester { void emptyCollada(); void emptyGltf(); void scene(); + void sceneName(); void sceneCollapsedNode(); void upDirectionPatching(); void upDirectionPatchingPreTransformVertices(); @@ -265,6 +266,7 @@ AssimpImporterTest::AssimpImporterTest() { &AssimpImporterTest::emptyCollada, &AssimpImporterTest::emptyGltf, &AssimpImporterTest::scene, + &AssimpImporterTest::sceneName, &AssimpImporterTest::sceneCollapsedNode}); addInstancedTests({&AssimpImporterTest::upDirectionPatching, @@ -2506,6 +2508,9 @@ void AssimpImporterTest::scene() { CORRADE_VERIFY(scene); CORRADE_COMPARE(scene->children3D(), {0}); + /* Currently only glTF supports scene names */ + CORRADE_COMPARE(importer->sceneName(0), ""); + Containers::Pointer parent = importer->object3D(0); CORRADE_COMPARE(parent->children(), {1}); CORRADE_COMPARE(parent->instanceType(), ObjectInstanceType3D::Empty); @@ -2526,6 +2531,20 @@ void AssimpImporterTest::scene() { CORRADE_COMPARE(importer->object3DForName("Ghost"), -1); } +void AssimpImporterTest::sceneName() { + #if !ASSIMP_HAS_SCENE_NAME + CORRADE_SKIP("Current version of assimp doesn't expose scene names."); + #endif + + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "scene-name.gltf"))); + + CORRADE_COMPARE(importer->sceneCount(), 1); + CORRADE_COMPARE(importer->sceneName(0), "This is the scene"); + CORRADE_COMPARE(importer->sceneForName("This is the scene"), 0); + CORRADE_COMPARE(importer->sceneForName("Other scene"), -1); +} + void AssimpImporterTest::sceneCollapsedNode() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); diff --git a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt index af675c211..c19c4d1ae 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt @@ -86,6 +86,7 @@ corrade_add_test(AssimpImporterTest AssimpImporterTest.cpp points.obj scene.dae scene+mesh.dae + scene-name.gltf skin.dae # Converted from skin.blend skin.fbx skin.gltf diff --git a/src/MagnumPlugins/AssimpImporter/Test/scene-name.gltf b/src/MagnumPlugins/AssimpImporter/Test/scene-name.gltf new file mode 100644 index 000000000..a488cbd62 --- /dev/null +++ b/src/MagnumPlugins/AssimpImporter/Test/scene-name.gltf @@ -0,0 +1,19 @@ +{ + "asset" : { + "version" : "2.0" + }, + "scene" : 0, + "scenes" : [ + { + "name" : "This is the scene", + "nodes" : [ 0 ] + }, + { + "name" : "Other scene", + "nodes" : [ 1 ] + } + ], + "nodes" : [ + {}, {} + ] +} diff --git a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake index 273470990..d8cd8ba21 100644 --- a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake +++ b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake @@ -27,4 +27,5 @@ #define ASSIMP_VERSION ${ASSIMP_VERSION} #define ASSIMP_IS_VERSION_5 (ASSIMP_VERSION >= 20190915) #define ASSIMP_HAS_VERSION_PATCH (ASSIMP_VERSION >= 20191122) +#define ASSIMP_HAS_SCENE_NAME (ASSIMP_VERSION >= 20201123) #define ASSIMP_HAS_BROKEN_GLTF_SPLINES (ASSIMP_VERSION < 20201123) From 5621134d4380dce7dd480a1b7988e0b4c6c9bad8 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 13 Nov 2021 20:37:57 +0100 Subject: [PATCH 07/48] AssimpImporter: import orthographic cameras --- .../AssimpImporter/AssimpImporter.cpp | 17 ++++++++-- .../AssimpImporter/AssimpImporter.h | 2 ++ .../AssimpImporter/CMakeLists.txt | 2 +- .../Test/AssimpImporterTest.cpp | 34 +++++++++++++++++++ .../AssimpImporter/Test/CMakeLists.txt | 1 + .../Test/camera-orthographic.gltf | 24 +++++++++++++ .../AssimpImporter/checkAssimpVersion.cpp | 7 ++++ .../AssimpImporter/configureInternal.h.cmake | 1 + 8 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 src/MagnumPlugins/AssimpImporter/Test/camera-orthographic.gltf diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 173d06c7c..e25d6bd70 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -679,10 +679,21 @@ std::string AssimpImporter::doCameraName(const UnsignedInt id) { Containers::Optional AssimpImporter::doCamera(UnsignedInt id) { const aiCamera* cam = _f->scene->mCameras[id]; - /** @todo up vector is not used */ - /** @todo assimp 5.1RC1 has mOrthographicWidth, import as Orthographic3D */ const Float aspect = cam->mAspect > 0.0f ? cam->mAspect : 1.0f; - return CameraData{CameraType::Perspective3D, Rad(cam->mHorizontalFOV), aspect, cam->mClipPlaneNear, cam->mClipPlaneFar, cam}; + /** @todo up vector is not used */ + + #if ASSIMP_HAS_ORTHOGRAPHIC_CAMERA + if(cam->mOrthographicWidth > 0.0f) + return CameraData{CameraType::Orthographic3D, + Vector2{cam->mOrthographicWidth, cam->mOrthographicWidth/aspect}*2.0f, + cam->mClipPlaneNear, cam->mClipPlaneFar, + cam}; + #endif + + return CameraData{CameraType::Perspective3D, + Rad(cam->mHorizontalFOV), aspect, + cam->mClipPlaneNear, cam->mClipPlaneFar, + cam}; } UnsignedInt AssimpImporter::doObject3DCount() const { diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h index 9c422dfde..9c92177f9 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h @@ -287,6 +287,8 @@ verbosity levels in each instance. @subsection Trade-AssimpImporter-behavior-cameras Camera import - Up vector property is not imported +- Orthographic camera support requires Assimp 5.1.0. Earlier versions import + them as perspective cameras with arbitrary field of view and aspect ratio. @subsection Trade-AssimpImporter-behavior-meshes Mesh import diff --git a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt index caf015f85..4b1f3b115 100644 --- a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt @@ -72,7 +72,7 @@ endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/checkAssimpVersionLanguageOverride.cmake "enable_language(C)") # Go through all versions of interest and pick the highest one that compiles -foreach(_version 20201123 20191122 20190915 20151031) +foreach(_version 20201123 20200225 20191122 20190915 20151031) try_compile(_works ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/checkAssimpVersion.cpp ${_ASSIMP_TRY_COMPILE_LINK_OR_INCLUDE} diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index e59cb3de0..6acba490e 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -106,6 +106,7 @@ struct AssimpImporterTest: TestSuite::Tester { void skinMerge(); void camera(); + void cameraOrthographic(); void light(); void lightUnsupported(); void materialColor(); @@ -237,6 +238,7 @@ AssimpImporterTest::AssimpImporterTest() { &AssimpImporterTest::skinMerge, &AssimpImporterTest::camera, + &AssimpImporterTest::cameraOrthographic, &AssimpImporterTest::light, &AssimpImporterTest::lightUnsupported, @@ -1506,6 +1508,7 @@ void AssimpImporterTest::camera() { Containers::Optional camera1 = importer->camera(0); CORRADE_VERIFY(camera1); + CORRADE_COMPARE(camera1->type(), CameraType::Perspective3D); CORRADE_COMPARE(camera1->fov(), 49.13434_degf); CORRADE_COMPARE(camera1->aspectRatio(), 1.77777f); CORRADE_COMPARE(camera1->near(), 0.123f); @@ -1513,6 +1516,7 @@ void AssimpImporterTest::camera() { Containers::Optional camera2 = importer->camera(1); CORRADE_VERIFY(camera2); + CORRADE_COMPARE(camera2->type(), CameraType::Perspective3D); CORRADE_COMPARE(camera2->fov(), 12.347_degf); /* No aspect ratio, defaults to 1 */ CORRADE_COMPARE(camera2->aspectRatio(), 1.0f); @@ -1530,6 +1534,36 @@ void AssimpImporterTest::camera() { CORRADE_COMPARE(cameraObject2->instance(), 1); } +void AssimpImporterTest::cameraOrthographic() { + if(_assimpVersion < 410) + CORRADE_SKIP("glTF 2 is supported since Assimp 4.1."); + + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + /* Assimp 5.1.0 refuses to load glTF files without a default scene so we can't + reuse TinyGltfImporter's test file */ + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "camera-orthographic.gltf"))); + CORRADE_COMPARE(importer->cameraCount(), 1); + + Containers::Optional camera = importer->camera(0); + CORRADE_VERIFY(camera); + { + #if !ASSIMP_HAS_ORTHOGRAPHIC_CAMERA + CORRADE_EXPECT_FAIL("Current version of assimp imports orthograpic cameras as perspective cameras"); + #endif + CORRADE_COMPARE(camera->type(), CameraType::Orthographic3D); + CORRADE_COMPARE(camera->size(), (Vector2{4.0f, 3.0f})); + } + + #if !ASSIMP_HAS_ORTHOGRAPHIC_CAMERA + CORRADE_COMPARE(camera->type(), CameraType::Perspective3D); + /* FOV and aspect ratio arbitrarily differ between importers. No use + testing specific values as they'll break with the next version anyway. */ + #endif + + CORRADE_COMPARE(camera->near(), 0.01f); + CORRADE_COMPARE(camera->far(), 100.0f); +} + void AssimpImporterTest::light() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "light.dae"))); diff --git a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt index c19c4d1ae..b761c725c 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt @@ -62,6 +62,7 @@ corrade_add_test(AssimpImporterTest AssimpImporterTest.cpp animation-patching.bin animation-patching.gltf camera.dae + camera-orthographic.gltf diffuse_texture.png embedded-texture.blend exported-animation.dae # Converted from exported-animation.blend diff --git a/src/MagnumPlugins/AssimpImporter/Test/camera-orthographic.gltf b/src/MagnumPlugins/AssimpImporter/Test/camera-orthographic.gltf new file mode 100644 index 000000000..ae797f31e --- /dev/null +++ b/src/MagnumPlugins/AssimpImporter/Test/camera-orthographic.gltf @@ -0,0 +1,24 @@ +{ + "asset" : { + "version" : "2.0" + }, + "cameras" : [ + { + "name" : "orthographic", + "orthographic" : { + "xmag" : 2.0, + "ymag" : 1.5, + "zfar" : 100.0, + "znear" : 0.01 + }, + "type" : "orthographic" + } + ], + "scene": 0, + "scenes": [ + { "nodes": [ 0 ] } + ], + "nodes": [{ + "camera": 0 + }] +} diff --git a/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp b/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp index e3f63bf73..aafefeaa9 100644 --- a/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp +++ b/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp @@ -48,6 +48,13 @@ int main() { scene.mName = ""; #endif + /* Support for orthographic camera width. + https://github.com/assimp/assimp/commit/ae50c4ebdf23c7f6f61300dede5bf32e0d306eb2 */ + #if CHECK_VERSION >= 20200225 + aiCamera camera; + camera.mOrthographicWidth = 1.0f; + #endif + /* Support for patch version information. https://github.com/assimp/assimp/commit/5cfb0fd633372bbbec87f08015139d71d330d4a6 */ #if CHECK_VERSION >= 20191122 diff --git a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake index d8cd8ba21..0a2649929 100644 --- a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake +++ b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake @@ -27,5 +27,6 @@ #define ASSIMP_VERSION ${ASSIMP_VERSION} #define ASSIMP_IS_VERSION_5 (ASSIMP_VERSION >= 20190915) #define ASSIMP_HAS_VERSION_PATCH (ASSIMP_VERSION >= 20191122) +#define ASSIMP_HAS_ORTHOGRAPHIC_CAMERA (ASSIMP_VERSION >= 20200225) #define ASSIMP_HAS_SCENE_NAME (ASSIMP_VERSION >= 20201123) #define ASSIMP_HAS_BROKEN_GLTF_SPLINES (ASSIMP_VERSION < 20201123) From 977ee6fa9e2c7e5a7ab4e645b40348ea9cb2edef Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sun, 14 Nov 2021 14:44:46 +0100 Subject: [PATCH 08/48] AssimpImporter: ignore flags in aiPrimitiveType mask Comparing for equality used to be fine, since aiProcess_SortByPType made sure that only one flag was ever set. But assimp 5.1.0 now always sets a new aiPrimitiveType_NGONEncodingFlag for triangulated meshes, leading to an "unsupported aiPrimitiveType" error. --- .../AssimpImporter/AssimpImporter.cpp | 15 ++++++--- .../Test/AssimpImporterTest.cpp | 32 +++++++++++++++++++ .../AssimpImporter/Test/CMakeLists.txt | 1 + .../AssimpImporter/Test/polygon.obj | 6 ++++ 4 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 src/MagnumPlugins/AssimpImporter/Test/polygon.obj diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index e25d6bd70..9e54e2502 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -849,13 +849,20 @@ std::string AssimpImporter::doMeshName(const UnsignedInt id) { Containers::Optional AssimpImporter::doMesh(const UnsignedInt id, UnsignedInt) { const aiMesh* mesh = _f->scene->mMeshes[id]; - /* Primitive */ + /* Primitive. mPrimitiveTypes is a mask but aiProcess_SortByPType (enabled + by default) should make sure only one type is set. However, since 5.1.0 + triangles can also have aiPrimitiveType_NGONEncodingFlag set which + indicates that consecutive triangles form an ngon. That flag is always + set for triangulated meshes. Masking all known types to future-proof + this against more random flags getting added. */ MeshPrimitive primitive; - if(mesh->mPrimitiveTypes == aiPrimitiveType_POINT) { + const aiPrimitiveType primitiveType = aiPrimitiveType(mesh->mPrimitiveTypes & + (aiPrimitiveType_POINT | aiPrimitiveType_LINE | aiPrimitiveType_TRIANGLE)); + if(primitiveType == aiPrimitiveType_POINT) { primitive = MeshPrimitive::Points; - } else if(mesh->mPrimitiveTypes == aiPrimitiveType_LINE) { + } else if(primitiveType == aiPrimitiveType_LINE) { primitive = MeshPrimitive::Lines; - } else if(mesh->mPrimitiveTypes == aiPrimitiveType_TRIANGLE) { + } else if(primitiveType == aiPrimitiveType_TRIANGLE) { primitive = MeshPrimitive::Triangles; } else { Error() << "Trade::AssimpImporter::mesh(): unsupported aiPrimitiveType" << mesh->mPrimitiveTypes; diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 6acba490e..60e729758 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -120,6 +120,7 @@ struct AssimpImporterTest: TestSuite::Tester { void mesh(); void pointMesh(); void lineMesh(); + void polygonMesh(); void meshCustomAttributes(); void meshSkinningAttributes(); void meshSkinningAttributesMultiple(); @@ -254,6 +255,7 @@ AssimpImporterTest::AssimpImporterTest() { &AssimpImporterTest::mesh, &AssimpImporterTest::pointMesh, &AssimpImporterTest::lineMesh, + &AssimpImporterTest::polygonMesh, &AssimpImporterTest::meshCustomAttributes}); addInstancedTests({&AssimpImporterTest::meshSkinningAttributes}, @@ -2061,6 +2063,36 @@ void AssimpImporterTest::lineMesh() { CORRADE_COMPARE(meshObject->instance(), 0); } +void AssimpImporterTest::polygonMesh() { + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "polygon.obj"))); + + /* Just testing that triangulation doesn't break anything */ + + CORRADE_COMPARE(importer->meshCount(), 1); + CORRADE_COMPARE(importer->object3DCount(), 1); + + Containers::Optional mesh = importer->mesh(0); + CORRADE_VERIFY(mesh); + CORRADE_COMPARE(mesh->primitive(), MeshPrimitive::Triangles); + + CORRADE_VERIFY(mesh->isIndexed()); + CORRADE_COMPARE_AS(mesh->indices(), + Containers::arrayView({0, 1, 2, 0, 2, 3}), + TestSuite::Compare::Container); + + CORRADE_COMPARE(mesh->attributeCount(), 1); + CORRADE_COMPARE_AS(mesh->attribute(MeshAttribute::Position), + Containers::arrayView({ + {-1.0f, 1.0f, 0.0f}, { 1.0f, 1.0f, 0.0f}, + { 1.0f, -1.0f, 0.0f}, {-1.0f, -1.0f, 0.0f} + }), TestSuite::Compare::Container); + + Containers::Pointer meshObject = importer->object3D(0); + CORRADE_COMPARE(meshObject->instanceType(), ObjectInstanceType3D::Mesh); + CORRADE_COMPARE(meshObject->instance(), 0); +} + void AssimpImporterTest::meshCustomAttributes() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, diff --git a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt index b761c725c..c5e787610 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt @@ -85,6 +85,7 @@ corrade_add_test(AssimpImporterTest AssimpImporterTest.cpp mips.dds multiple-textures.mtl r.png g.png b.png y.png points.obj + polygon.obj scene.dae scene+mesh.dae scene-name.gltf diff --git a/src/MagnumPlugins/AssimpImporter/Test/polygon.obj b/src/MagnumPlugins/AssimpImporter/Test/polygon.obj new file mode 100644 index 000000000..cb5c9ef97 --- /dev/null +++ b/src/MagnumPlugins/AssimpImporter/Test/polygon.obj @@ -0,0 +1,6 @@ +v -1.000000 -1.000000 0.000000 +v -1.000000 1.000000 0.000000 +v 1.000000 1.000000 0.000000 +v 0.999999 -1.000001 0.000000 + +f 2 3 4 1 From 86f1e58ed874a5c042004e02d7145f6597ac3b82 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 15 Nov 2021 17:24:41 +0100 Subject: [PATCH 09/48] [wip] AssimpImporter: fix tests for 5.1.1 This needs minor changes to TinyGltfImporter test files, coming in the next commit. The last remaining failing test is an Assimp bug, fix follows in another commit. We'll ignore 5.1.0 since there are only a few days in between and it's not worth special-casing the Collada light test because of this. --- .../Test/AssimpImporterTest.cpp | 156 ++++++++++++------ .../AssimpImporter/Test/CMakeLists.txt | 4 +- .../Test/animation-patching.bin | Bin 228 -> 240 bytes .../Test/animation-patching.gltf | 31 ++-- .../Test/camera-orthographic.gltf | 24 --- .../AssimpImporter/Test/empty.gltf | 8 + 6 files changed, 135 insertions(+), 88 deletions(-) delete mode 100644 src/MagnumPlugins/AssimpImporter/Test/camera-orthographic.gltf create mode 100644 src/MagnumPlugins/AssimpImporter/Test/empty.gltf diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 60e729758..493134478 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -64,6 +64,7 @@ #include /* in assimp 3.0, version.h is missing this include for ASSIMP_API */ #include +#include #include #include #include @@ -390,6 +391,12 @@ void AssimpImporterTest::openData() { } void AssimpImporterTest::openDataFailed() { + /* With Assimp 5.1.0 this fires an assert in because Assimp tries + to load *anything* with X3DImporter and it doesn't perform any checks: + https://github.com/assimp/assimp/issues/4177 */ + if(_assimpVersion >= 510 && aiGetImporterDesc("x3d")) + CORRADE_SKIP("Current version of assimp would assert on this test."); + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); std::ostringstream out; @@ -405,7 +412,6 @@ void AssimpImporterTest::openDataFailed() { bool supportsAnimation(const Containers::StringView fileName, unsigned int assimpVersion) { /* 5.0.0 supports all of Collada, FBX, glTF */ if(assimpVersion >= 500) { - static_cast(fileName); return true; } else if(fileName.hasSuffix(".gltf"_s)) { return false; @@ -706,6 +712,8 @@ void AssimpImporterTest::animationGltf() { void AssimpImporterTest::animationGltfNoScene() { if(!supportsAnimation(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 animation is not supported with the current version of Assimp"); + if(_assimpVersion >= 510) + CORRADE_SKIP("Current version of assimp wouldn't load this file."); /* This reuses the TinyGltfImporter test files, not the corrected ones used by other tests. */ Containers::Pointer importer = _manager.instantiate("AssimpImporter"); @@ -788,10 +796,10 @@ void AssimpImporterTest::animationGltfSpline() { #endif constexpr Quaternion rotationValues[]{ - {{0.780076f, 0.0260025f, 0.598059f}, 0.182018f}, - {{-0.711568f, 0.391362f, 0.355784f}, 0.462519f}, - {{0.598059f, 0.182018f, 0.0260025f}, 0.780076f}, - {{0.711568f, -0.355784f, -0.462519f}, -0.391362f} + {{ 0.780076f, 0.0260025f, 0.598059f}, 0.182018f}, + {{ 0.711568f, -0.391362f, -0.355784f}, -0.462519f}, + {{-0.598059f, -0.182018f, -0.026003f}, -0.780076f}, + {{-0.711568f, 0.355784f, 0.462519f}, 0.391362f} }; CORRADE_COMPARE_AS(rotation.values(), Containers::stridedArrayView(rotationValues), TestSuite::Compare::Container); } @@ -1001,6 +1009,10 @@ void AssimpImporterTest::animationShortestPathOptimizationEnabled() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); /* Enabled by default */ CORRADE_VERIFY(importer->configuration().value("optimizeQuaternionShortestPath")); + /* Can't reuse the TinyGltfImporter test file because it has differently + sized accessors. Assimp < 5.1.0 used to allow this but newer versions + don't. This file is taken from CgltfImporter but with a default scene + added, otherwise Assimp 5.1.0 won't load it. */ CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "animation-patching.gltf"))); @@ -1191,7 +1203,7 @@ void AssimpImporterTest::animationMergeEmpty() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); /* Enable animation merging */ importer->configuration().setValue("mergeAnimationClips", true); - CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR, + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "empty.gltf"))); CORRADE_COMPARE(importer->animationCount(), 0); @@ -1300,7 +1312,7 @@ void AssimpImporterTest::animationMerge() { CORRADE_COMPARE(scaling2.interpolation(), Animation::Interpolation::Linear); } -/* The checks are identical to animation support so re-use that. */ +/* The checks are identical to animation support so re-use that */ bool supportsSkinning(const Containers::StringView fileName, unsigned int assimpVersion) { return supportsAnimation(fileName, assimpVersion); } @@ -1312,6 +1324,20 @@ void calculateTransforms(Containers::ArrayView transforms, Containers:: calculateTransforms(transforms, objects, childId, transform); } +/* Since 5.1.0 the Collada importer uses the mesh ID as the name. Imitate the + Blender(?) exporter that generated the IDs from the name. A bit hacky but + still better than special-casing every test that loads meshes by name. */ +std::string fixMeshName(const Containers::StringView meshName, const Containers::StringView fileName, unsigned int assimpVersion) { + std::string fixed = meshName; + if(assimpVersion >= 510 && fileName.hasSuffix(".dae"_s)) { + for(char& c: fixed) + if(c != '-' && !std::isalnum(unsigned char(c))) c = '_'; + fixed += "-mesh"; + } + + return fixed; +} + void AssimpImporterTest::skin() { auto&& data = ExportedFileData[testCaseInstanceId()]; setTestCaseDescription(data.name); @@ -1349,8 +1375,10 @@ void AssimpImporterTest::skin() { calculateTransforms(globalTransforms, objects, i); } - constexpr const char* meshNames[]{"Mesh_1", "Mesh_2"}; - constexpr const char* jointNames[][2]{ + constexpr Containers::StringView objectNames[]{ + "Mesh_1"_s, "Mesh_2"_s, "Plane"_s + }; + const std::string jointNames[][2]{ {"Node_1", "Node_2"}, {"Node_3", "Node_4"} }; @@ -1359,12 +1387,13 @@ void AssimpImporterTest::skin() { the comment for ExportedFileData. */ const Matrix4 correction{data.correction.toMatrix()}; - for(UnsignedInt i = 0; i != Containers::arraySize(meshNames); ++i) { + for(UnsignedInt i = 0; i != Containers::arraySize(objectNames) - 1; ++i) { /* Skin names are taken from mesh names, skin order is arbitrary */ - const Int index = importer->skin3DForName(meshNames[i]); + const std::string meshName = fixMeshName(objectNames[i], data.suffix, _assimpVersion); + const Int index = importer->skin3DForName(meshName); CORRADE_VERIFY(index != -1); - CORRADE_COMPARE(importer->skin3DName(index), meshNames[i]); - CORRADE_VERIFY(importer->meshForName(meshNames[i]) != -1); + CORRADE_COMPARE(importer->skin3DName(index), meshName); + CORRADE_VERIFY(importer->meshForName(meshName) != -1); auto skin = importer->skin3D(index); CORRADE_VERIFY(skin); @@ -1373,7 +1402,7 @@ void AssimpImporterTest::skin() { /* Don't check joint order, only presence */ auto joints = skin->joints(); CORRADE_COMPARE(joints.size(), Containers::arraySize(jointNames[i])); - for(const char* name: jointNames[i]) { + for(const std::string& name: jointNames[i]) { auto found = std::find_if(joints.begin(), joints.end(), [&](UnsignedInt joint) { /* Blender's Collada exporter adds an Armature_ prefix to object names */ @@ -1388,7 +1417,7 @@ void AssimpImporterTest::skin() { transform. */ auto bindMatrices = skin->inverseBindMatrices(); CORRADE_COMPARE(bindMatrices.size(), joints.size()); - auto meshObject = importer->object3D(meshNames[i]); + auto meshObject = importer->object3D(objectNames[i]); CORRADE_VERIFY(meshObject); CORRADE_COMPARE(meshObject->instanceType(), ObjectInstanceType3D::Mesh); CORRADE_COMPARE(static_cast(*meshObject).skin(), index); @@ -1401,9 +1430,10 @@ void AssimpImporterTest::skin() { { /* Unskinned meshes and mesh nodes shouldn't have a skin */ - CORRADE_VERIFY(importer->meshForName("Plane") != -1); - CORRADE_COMPARE(importer->skin3DForName("Plane"), -1); - auto meshObject = importer->object3D("Plane"); + const std::string meshName = fixMeshName(objectNames[2], data.suffix, _assimpVersion); + CORRADE_VERIFY(importer->meshForName(meshName) != -1); + CORRADE_COMPARE(importer->skin3DForName(meshName), -1); + auto meshObject = importer->object3D(objectNames[2]); CORRADE_VERIFY(meshObject); CORRADE_COMPARE(meshObject->instanceType(), ObjectInstanceType3D::Mesh); CORRADE_COMPARE(static_cast(*meshObject).skin(), -1); @@ -1541,12 +1571,14 @@ void AssimpImporterTest::cameraOrthographic() { CORRADE_SKIP("glTF 2 is supported since Assimp 4.1."); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); - /* Assimp 5.1.0 refuses to load glTF files without a default scene so we can't - reuse TinyGltfImporter's test file */ - CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "camera-orthographic.gltf"))); - CORRADE_COMPARE(importer->cameraCount(), 1); + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR, "camera.gltf"))); + CORRADE_COMPARE(importer->cameraCount(), 4); - Containers::Optional camera = importer->camera(0); + /* For some reason glTF camera names are set to the names of the nodes that + hold them. This file has no node names, so it becomes nodes[0]. + Versions before 5.1.0, of course, named them differently... */ + const char* name = _assimpVersion >= 510 ? "nodes[0]" : "nodes_0"; + Containers::Optional camera = importer->camera(name); CORRADE_VERIFY(camera); { #if !ASSIMP_HAS_ORTHOGRAPHIC_CAMERA @@ -1573,6 +1605,13 @@ void AssimpImporterTest::light() { CORRADE_COMPARE(importer->lightCount(), 4); CORRADE_COMPARE(importer->lightForName(""), -1); + /* Collada light import is broken in Assimp 5.1.0: + https://github.com/assimp/assimp/issues/4179 + This was fixed a few days later in 5.1.1 but (as is customary with that + library) they didn't update the version so both report as 5.1.0. + To keep our sanity, we assume 5.1.0 means 5.1.1 and ignore this was + ever broken. */ + /* Spot light */ { CORRADE_COMPARE(importer->lightName(0), "Spot"); @@ -1582,11 +1621,11 @@ void AssimpImporterTest::light() { CORRADE_COMPARE(light->type(), LightData::Type::Spot); CORRADE_COMPARE(light->color(), (Color3{0.12f, 0.24f, 0.36f})); CORRADE_COMPARE(light->intensity(), 1.0f); - CORRADE_COMPARE(light->attenuation(), (Vector3{0.1f, 0.3f, 0.5f})); CORRADE_COMPARE(light->range(), Constants::inf()); + CORRADE_COMPARE(light->attenuation(), (Vector3{0.1f, 0.3f, 0.5f})); CORRADE_COMPARE(light->innerConeAngle(), 45.0_degf); - /* Not sure how it got calculated from 0.15 falloff exponent, but let's - just trust Assimp for once */ + /* Not sure how it got calculated from 0.15 falloff exponent, but + let's just trust Assimp for once */ CORRADE_COMPARE(light->outerConeAngle(), 135.0_degf); /* Point light */ @@ -1598,8 +1637,8 @@ void AssimpImporterTest::light() { CORRADE_COMPARE(light->type(), LightData::Type::Point); CORRADE_COMPARE(light->color(), (Color3{0.5f, 0.25f, 0.05f})); CORRADE_COMPARE(light->intensity(), 1.0f); - CORRADE_COMPARE(light->attenuation(), (Vector3{0.1f, 0.7f, 0.9f})); CORRADE_COMPARE(light->range(), Constants::inf()); + CORRADE_COMPARE(light->attenuation(), (Vector3{0.1f, 0.7f, 0.9f})); /* Directional light */ } { @@ -1954,8 +1993,9 @@ void AssimpImporterTest::mesh() { CORRADE_COMPARE(importer->meshCount(), 1); CORRADE_COMPARE(importer->object3DCount(), 1); - CORRADE_COMPARE(importer->meshName(0), "Cube"); - CORRADE_COMPARE(importer->meshForName("Cube"), 0); + const std::string name = fixMeshName("Cube", ".dae", _assimpVersion); + CORRADE_COMPARE(importer->meshName(0), name); + CORRADE_COMPARE(importer->meshForName(name), 0); CORRADE_COMPARE(importer->meshForName("nonexistent"), -1); Containers::Optional mesh = importer->mesh(0); @@ -2154,7 +2194,12 @@ void AssimpImporterTest::meshSkinningAttributes() { const MeshAttribute jointsAttribute = importer->meshAttributeForName("JOINTS"); const MeshAttribute weightsAttribute = importer->meshAttributeForName("WEIGHTS"); - for(const char* meshName: {"Mesh_1", "Mesh_2"}) { + const std::string meshNames[]{ + fixMeshName("Mesh_1"_s, data.suffix, _assimpVersion), + fixMeshName("Mesh_2"_s, data.suffix, _assimpVersion) + }; + + for(const std::string& meshName: meshNames) { Containers::Optional mesh; std::ostringstream out; { @@ -2180,7 +2225,7 @@ void AssimpImporterTest::meshSkinningAttributes() { } /* No skin joint node using this mesh */ - auto mesh = importer->mesh("Plane"); + auto mesh = importer->mesh(fixMeshName("Plane"_s, data.suffix, _assimpVersion)); CORRADE_VERIFY(mesh); CORRADE_VERIFY(!mesh->hasAttribute(jointsAttribute)); } @@ -2197,7 +2242,7 @@ void AssimpImporterTest::meshSkinningAttributesMultiple() { constexpr UnsignedInt AttributeCount = 3; - auto mesh = importer->mesh("Mesh_1"); + auto mesh = importer->mesh(fixMeshName("Mesh_1"_s, ".dae"_s, _assimpVersion)); CORRADE_VERIFY(mesh); CORRADE_VERIFY(mesh->hasAttribute(jointsAttribute)); CORRADE_COMPARE(mesh->attributeCount(jointsAttribute), AttributeCount); @@ -2222,10 +2267,18 @@ void AssimpImporterTest::meshSkinningAttributesMultipleGltf() { if(!supportsSkinning(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 skinning is not supported with the current version of Assimp"); - /* Assimp glTF 2 importer only reads the last(!) set of joint weights */ + /* Assimp glTF 2 importer only reads the last(!) set of joint weights. On + 5.1.0 it outright fails to import because of broken extra validation: + https://github.com/assimp/assimp/issues/4178 */ Containers::Pointer importer = _manager.instantiate("AssimpImporter"); importer->configuration().setValue("maxJointWeights", 0); + + if(_assimpVersion >= 510) { + CORRADE_VERIFY(!importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "skin-multiple-sets.gltf"))); + CORRADE_SKIP("Current version of assimp fails to import files with multiple sets of skinning attributes"); + } + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "skin-multiple-sets.gltf"))); const MeshAttribute jointsAttribute = importer->meshAttributeForName("JOINTS"); @@ -2291,7 +2344,7 @@ void AssimpImporterTest::meshSkinningAttributesMaxJointWeights() { /* 6 weights = 2 sets of 4, last two weights zero */ constexpr UnsignedInt AttributeCount = 2; - auto mesh = importer->mesh("Mesh_1"); + auto mesh = importer->mesh(fixMeshName("Mesh_1"_s, ".dae"_s, _assimpVersion)); CORRADE_VERIFY(mesh); CORRADE_VERIFY(mesh->hasAttribute(jointsAttribute)); CORRADE_COMPARE(mesh->attributeCount(jointsAttribute), AttributeCount); @@ -2365,7 +2418,7 @@ void AssimpImporterTest::meshSkinningAttributesMerge() { } { - const Int id = importer->meshForName("Mesh_1"); + const Int id = importer->meshForName(fixMeshName("Mesh_1"_s, ".dae"_s, _assimpVersion)); CORRADE_VERIFY(id != -1); auto mesh = importer->mesh(id); CORRADE_VERIFY(mesh); @@ -2382,7 +2435,7 @@ void AssimpImporterTest::meshSkinningAttributesMerge() { Containers::arrayView(MeshSkinningAttributesWeightData), TestSuite::Compare::Container); } { - const Int id = importer->meshForName("Mesh_2"); + const Int id = importer->meshForName(fixMeshName("Mesh_2"_s, ".dae"_s, _assimpVersion)); CORRADE_VERIFY(id != -1); auto mesh = importer->mesh(id); CORRADE_VERIFY(mesh); @@ -2412,12 +2465,13 @@ void AssimpImporterTest::meshMultiplePrimitives() { CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "mesh-multiple-primitives.dae"))); - /* Four meshes, but one has three primitives and one two. */ + /* Two meshes, but one has two primitives and one three. */ CORRADE_COMPARE(importer->meshCount(), 5); { - CORRADE_COMPARE(importer->meshName(0), "Multi-primitive triangle fan, line strip"); - CORRADE_COMPARE(importer->meshName(1), "Multi-primitive triangle fan, line strip"); - CORRADE_COMPARE(importer->meshForName("Multi-primitive triangle fan, line strip"), 0); + const std::string name = fixMeshName("Multi-primitive triangle fan, line strip", ".dae", _assimpVersion); + CORRADE_COMPARE(importer->meshName(0), name); + CORRADE_COMPARE(importer->meshName(1), name); + CORRADE_COMPARE(importer->meshForName(name), 0); auto mesh0 = importer->mesh(0); CORRADE_VERIFY(mesh0); @@ -2426,10 +2480,11 @@ void AssimpImporterTest::meshMultiplePrimitives() { CORRADE_VERIFY(mesh1); CORRADE_COMPARE(mesh1->primitive(), MeshPrimitive::Lines); } { - CORRADE_COMPARE(importer->meshName(2), "Multi-primitive lines, triangles, triangle strip"); - CORRADE_COMPARE(importer->meshName(3), "Multi-primitive lines, triangles, triangle strip"); - CORRADE_COMPARE(importer->meshName(4), "Multi-primitive lines, triangles, triangle strip"); - CORRADE_COMPARE(importer->meshForName("Multi-primitive lines, triangles, triangle strip"), 2); + const std::string name = fixMeshName("Multi-primitive lines, triangles, triangle strip", ".dae", _assimpVersion); + CORRADE_COMPARE(importer->meshName(2), name); + CORRADE_COMPARE(importer->meshName(3), name); + CORRADE_COMPARE(importer->meshName(4), name); + CORRADE_COMPARE(importer->meshForName(name), 2); auto mesh2 = importer->mesh(2); CORRADE_VERIFY(mesh2); @@ -2552,10 +2607,15 @@ void AssimpImporterTest::emptyGltf() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); - CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR, "empty.gltf"))); - CORRADE_COMPARE(importer->defaultScene(), -1); - CORRADE_COMPARE(importer->sceneCount(), 0); - CORRADE_COMPARE(importer->object3DCount(), 0); + /* We can't reuse TinyGltfImporter's empty.gltf since Assimp 5.1 complains + about a missing scene property (which is not required by the glTF spec) */ + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "empty.gltf"))); + { + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, "Assimp versions before 5.1.0 ignore empty glTF scenes."); + CORRADE_COMPARE(importer->defaultScene(), 0); + CORRADE_COMPARE(importer->sceneCount(), 1); + CORRADE_COMPARE(importer->object3DCount(), 1); + } /* No crazy meshes created for an empty glTF file, unlike with COLLADA files that have no meshes */ diff --git a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt index c5e787610..4b64be52e 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt @@ -55,16 +55,16 @@ file(GENERATE OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/$/configure.h corrade_add_test(AssimpImporterTest AssimpImporterTest.cpp LIBRARIES Magnum::Trade FILES - empty.dae animation.gltf # Same as in TinyGltfImporterTest, but added a scene animation.bin animation-no-scene.gltf animation-patching.bin animation-patching.gltf camera.dae - camera-orthographic.gltf diffuse_texture.png embedded-texture.blend + empty.dae + empty.gltf exported-animation.dae # Converted from exported-animation.blend exported-animation.fbx exported-animation.gltf diff --git a/src/MagnumPlugins/AssimpImporter/Test/animation-patching.bin b/src/MagnumPlugins/AssimpImporter/Test/animation-patching.bin index a8a20ee74eaea71d4b9bc9b12eaf19cb2847a158..a08b0a7343e9e7146e3a99a5a6ac3508be543595 100644 GIT binary patch delta 20 acmaFD_ Date: Mon, 22 Nov 2021 15:40:51 +0100 Subject: [PATCH 10/48] TinyGltfImporter: make test files compatible with AssimpImporter Assimp's glTF importer needs a default scene to load a file at all, and cameras need to be referenced by nodes to be imported --- src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf | 10 ++++++++++ src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf b/src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf index 91c1802e1..92dfe589e 100644 --- a/src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf +++ b/src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf @@ -42,5 +42,15 @@ }, "type" : "perspective" } + ], + "scene": 0, + "scenes": [ + { "nodes": [0, 1, 2, 3] } + ], + "nodes": [ + { "camera": 0 }, + { "camera": 1 }, + { "camera": 2 }, + { "camera": 3 } ] } diff --git a/src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf b/src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf index b07939eb2..366c55443 100644 --- a/src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf +++ b/src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf @@ -51,5 +51,7 @@ "count": 3, "type": "MAT4" } - ] + ], + "scene": 0, + "scenes": [{}] } From c579a93694d9523c01bd662ba8c23e92c75328c6 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 22 Nov 2021 15:46:07 +0100 Subject: [PATCH 11/48] AssimpImporter: patch broken FBX animation mTicksPerSecond This got broken sometime after 5.1.0. Similarly to glTF mTicksPerSecond patching, this emits a warning if detected. --- .../AssimpImporter/AssimpImporter.cpp | 29 +++++++----- .../AssimpImporter/CMakeLists.txt | 2 +- .../Test/AssimpImporterTest.cpp | 44 ++++++++++++++++--- .../AssimpImporter/checkAssimpVersion.cpp | 11 +++++ .../AssimpImporter/configureInternal.h.cmake | 3 +- 5 files changed, 69 insertions(+), 20 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 9e54e2502..d8f44669b 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -94,8 +94,8 @@ using namespace Containers::Literals; struct AssimpImporter::File { Containers::Optional filePath; - const char* importerName = nullptr; bool importerIsGltf = false; + bool importerIsFbx = false; const aiScene* scene = nullptr; std::vector nodes; /* (materialPointer, propertyIndexInsideMaterial, imageIndex) tuple, @@ -408,15 +408,15 @@ void AssimpImporter::doOpenData(Containers::Array&& data, DataFlags) { /* Get name of importer. Useful for workarounds based on importer/file type. If the _importer isn't populated, we got called from doOpenState() and we can't really do much here. */ - _f->importerName = "unknown"; if(_importer) { const int importerIndex = _importer->GetPropertyInteger("importerIndex", -1); if(importerIndex != -1) { const aiImporterDesc* info = _importer->GetImporterInfo(importerIndex); - if(info) _f->importerName = info->mName; + if(info) { + _f->importerIsGltf = info->mName == "glTF2 Importer"_s; + _f->importerIsFbx = info->mName == "Autodesk FBX Importer"_s; + } } - - _f->importerIsGltf = _f->importerName == "glTF2 Importer"_s; } /* Fill hashmaps for index lookup for materials/textures/meshes/nodes */ @@ -1672,14 +1672,21 @@ Containers::Optional AssimpImporter::doAnimation(UnsignedInt id) /* For glTF files mTicksPerSecond is completely useless before https://github.com/assimp/assimp/commit/09d80ff478d825a80bce6fb787e8b19df9f321a8 - but can be assumed to always be 1000. */ - constexpr Double GltfTicksPerSecond = 1000.0; - if(_f->importerIsGltf && !Math::equal(ticksPerSecond, GltfTicksPerSecond)) { + but can be assumed to always be 1000. + + FBX files since https://github.com/assimp/assimp/commit/b3e1ee3ca0d825d384044867fc30cd0bc8417be6 + report incorrect mTicksPerSecond but it should be 1000: + https://github.com/assimp/assimp/issues/4197 */ + constexpr Double CorrectTicksPerSecond = 1000.0; + if((_f->importerIsGltf || (_f->importerIsFbx && ASSIMP_HAS_BROKEN_FBX_TICKS_PER_SECOND)) && + !Math::equal(ticksPerSecond, CorrectTicksPerSecond)) + { if(verbose) Debug{} << "Trade::AssimpImporter::animation():" << Float(ticksPerSecond) - << "ticks per second is incorrect for glTF, patching to" - << Float(GltfTicksPerSecond); - ticksPerSecond = GltfTicksPerSecond; + << "ticks per second is incorrect for" + << (_f->importerIsGltf ? "glTF," : "FBX,") << "patching to" + << Float(CorrectTicksPerSecond); + ticksPerSecond = CorrectTicksPerSecond; } const TargetTypes targetTypes = channelTargetTypes[currentChannel++]; diff --git a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt index 4b1f3b115..d0e97fa77 100644 --- a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt @@ -72,7 +72,7 @@ endif() file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/checkAssimpVersionLanguageOverride.cmake "enable_language(C)") # Go through all versions of interest and pick the highest one that compiles -foreach(_version 20201123 20200225 20191122 20190915 20151031) +foreach(_version 20210102 20201123 20200225 20191122 20190915 20151031) try_compile(_works ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/checkAssimpVersion.cpp ${_ASSIMP_TRY_COMPILE_LINK_OR_INCLUDE} diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 493134478..b48a9afa0 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -90,7 +90,9 @@ struct AssimpImporterTest: TestSuite::Tester { void animationGltfNoScene(); void animationGltfBrokenSplineWarning(); void animationGltfSpline(); + void animationGltfTicksPerSecondPatching(); + void animationFbxTicksPerSecondPatching(); void animationDummyTracksRemovalEnabled(); void animationDummyTracksRemovalDisabled(); @@ -221,6 +223,7 @@ AssimpImporterTest::AssimpImporterTest() { &AssimpImporterTest::animationGltfSpline}); addInstancedTests({&AssimpImporterTest::animationGltfTicksPerSecondPatching, + &AssimpImporterTest::animationFbxTicksPerSecondPatching, &AssimpImporterTest::animationDummyTracksRemovalEnabled, &AssimpImporterTest::animationDummyTracksRemovalDisabled}, Containers::arraySize(VerboseData)); @@ -330,7 +333,7 @@ AssimpImporterTest::AssimpImporterTest() { ; /* Assimp 5.0.0 reports itself as 4.1.0 */ - #if ASSIMP_IS_VERSION_5 + #if ASSIMP_IS_VERSION_5_OR_GREATER _assimpVersion = Math::max(_assimpVersion, 500u); #endif } @@ -518,7 +521,7 @@ void AssimpImporterTest::animation() { constexpr UnsignedInt KeyCount = 4; constexpr Float keys[KeyCount]{0.0f, 2.5f, 5.0f, 7.5f}; - CORRADE_VERIFY(player.duration().contains({ keys[0], keys[Containers::arraySize(keys) - 1] })); + CORRADE_VERIFY(player.duration().contains({keys[0], keys[Containers::arraySize(keys) - 1]})); player.play(0.0f); /* Some Blender exporters (e.g. FBX) and our manual Collada correction @@ -552,6 +555,8 @@ void AssimpImporterTest::animation() { }; for(UnsignedInt i = 0; i < Containers::arraySize(keys); i++) { + CORRADE_ITERATION(i); + player.advance(keys[i]); for(Node& n: nodes) correctNode(n); @@ -883,6 +888,32 @@ void AssimpImporterTest::animationGltfTicksPerSecondPatching() { CORRADE_VERIFY(out.str().empty()); } +void AssimpImporterTest::animationFbxTicksPerSecondPatching() { + auto&& data = VerboseData[testCaseInstanceId()]; + setTestCaseDescription(data.name); + + #if !ASSIMP_HAS_BROKEN_FBX_TICKS_PER_SECOND + CORRADE_SKIP("Current version of assimp correctly sets FBX ticks per second."); + #endif + + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + importer->setFlags(data.flags); + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, + "exported-animation.fbx"))); + + std::ostringstream out; + { + Debug redirectDebug{&out}; + CORRADE_VERIFY(importer->animation(0)); + } + + if(data.flags >= ImporterFlag::Verbose) { + CORRADE_VERIFY(Containers::StringView{out.str()}.contains( + " ticks per second is incorrect for FBX, patching to 1000\n")); + } else + CORRADE_VERIFY(out.str().empty()); +} + void AssimpImporterTest::animationDummyTracksRemovalEnabled() { auto&& data = VerboseData[testCaseInstanceId()]; setTestCaseDescription(data.name); @@ -3191,11 +3222,10 @@ void AssimpImporterTest::fileCallbackNotFound() { /* Assimp 5.0 changed the error string. aiGetVersion*() returns 401 for assimp 5, FFS, so we have to check differently. See CMakeLists.txt for details. */ - #if ASSIMP_IS_VERSION_5 - CORRADE_COMPARE(out.str(), "Trade::AssimpImporter::openFile(): failed to open some-file.dae: Failed to open file 'some-file.dae'.\n"); - #else - CORRADE_COMPARE(out.str(), "Trade::AssimpImporter::openFile(): failed to open some-file.dae: Failed to open file some-file.dae.\n"); - #endif + if(_assimpVersion >= 500) + CORRADE_COMPARE(out.str(), "Trade::AssimpImporter::openFile(): failed to open some-file.dae: Failed to open file 'some-file.dae'.\n"); + else + CORRADE_COMPARE(out.str(), "Trade::AssimpImporter::openFile(): failed to open some-file.dae: Failed to open file some-file.dae.\n"); } void AssimpImporterTest::fileCallbackEmptyFile() { diff --git a/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp b/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp index aafefeaa9..579471ea4 100644 --- a/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp +++ b/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp @@ -28,7 +28,9 @@ #include #endif +#include #include +#include #include #ifndef CHECK_VERSION @@ -39,6 +41,15 @@ int main() { int ret = 0; + /* Version that breaks aiAnimation::mTicksPerSecond for FBX: + https://github.com/assimp/assimp/commit/b3e1ee3ca0d825d384044867fc30cd0bc8417be6 + Check for aiQuaternion::operation *= added in + https://github.com/assimp/assimp/commit/89d4d6b68f720aaf545dba9d6a701426b948df15 */ + #if CHECK_VERSION >= 20210102 + aiQuaternion quat; + quat *= aiMatrix4x4(); + #endif + /* First version that correctly parses glTF2 spline-interpolated animation data: https://github.com/assimp/assimp/commit/e3083c21f0a7beae6c37a2265b7919a02cbf83c4. Check for Scene::mName added in diff --git a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake index 0a2649929..944b706de 100644 --- a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake +++ b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake @@ -25,8 +25,9 @@ */ #define ASSIMP_VERSION ${ASSIMP_VERSION} -#define ASSIMP_IS_VERSION_5 (ASSIMP_VERSION >= 20190915) +#define ASSIMP_IS_VERSION_5_OR_GREATER (ASSIMP_VERSION >= 20190915) #define ASSIMP_HAS_VERSION_PATCH (ASSIMP_VERSION >= 20191122) #define ASSIMP_HAS_ORTHOGRAPHIC_CAMERA (ASSIMP_VERSION >= 20200225) #define ASSIMP_HAS_SCENE_NAME (ASSIMP_VERSION >= 20201123) #define ASSIMP_HAS_BROKEN_GLTF_SPLINES (ASSIMP_VERSION < 20201123) +#define ASSIMP_HAS_BROKEN_FBX_TICKS_PER_SECOND (ASSIMP_VERSION >= 20210102) From 6564c8c93c9b7e1d9644a214e0eee7255407f2b7 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 22 Nov 2021 16:16:50 +0100 Subject: [PATCH 12/48] AssimpImporter: this transformation makes no sense --- .../Test/AssimpImporterTest.cpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index b48a9afa0..feb3eff1b 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -1349,7 +1349,7 @@ bool supportsSkinning(const Containers::StringView fileName, unsigned int assimp } void calculateTransforms(Containers::ArrayView transforms, Containers::ArrayView objects, UnsignedInt objectId, const Matrix4& parentTransform = {}) { - const Matrix4 transform = objects[objectId].transformation() * parentTransform; + const Matrix4 transform = parentTransform * objects[objectId].transformation(); transforms[objectId] = transform; for(UnsignedInt childId: objects[objectId].children()) calculateTransforms(transforms, objects, childId, transform); @@ -1402,6 +1402,10 @@ void AssimpImporterTest::skin() { auto scene = importer->scene(sceneId); CORRADE_VERIFY(scene); + /* Some Blender exporters don't transform skin matrices correctly. Also see + the comment for ExportedFileData. */ + const Matrix4 correction{data.correction.toMatrix()}; + for(UnsignedInt i: scene->children3D()) { calculateTransforms(globalTransforms, objects, i); } @@ -1414,19 +1418,15 @@ void AssimpImporterTest::skin() { {"Node_3", "Node_4"} }; - /* Some Blender exporters don't transform skin matrices correctly. Also see - the comment for ExportedFileData. */ - const Matrix4 correction{data.correction.toMatrix()}; - for(UnsignedInt i = 0; i != Containers::arraySize(objectNames) - 1; ++i) { /* Skin names are taken from mesh names, skin order is arbitrary */ const std::string meshName = fixMeshName(objectNames[i], data.suffix, _assimpVersion); - const Int index = importer->skin3DForName(meshName); - CORRADE_VERIFY(index != -1); - CORRADE_COMPARE(importer->skin3DName(index), meshName); + const Int skinIndex = importer->skin3DForName(meshName); + CORRADE_VERIFY(skinIndex != -1); + CORRADE_COMPARE(importer->skin3DName(skinIndex), meshName); CORRADE_VERIFY(importer->meshForName(meshName) != -1); - auto skin = importer->skin3D(index); + auto skin = importer->skin3D(skinIndex); CORRADE_VERIFY(skin); CORRADE_VERIFY(skin->importerState()); @@ -1451,10 +1451,10 @@ void AssimpImporterTest::skin() { auto meshObject = importer->object3D(objectNames[i]); CORRADE_VERIFY(meshObject); CORRADE_COMPARE(meshObject->instanceType(), ObjectInstanceType3D::Mesh); - CORRADE_COMPARE(static_cast(*meshObject).skin(), index); + CORRADE_COMPARE(static_cast(*meshObject).skin(), skinIndex); const Matrix4 meshTransform = meshObject->transformation(); for(UnsignedInt j = 0; j != joints.size(); ++j) { - const Matrix4 invertedTransform = correction * meshTransform * globalTransforms[joints[j]].inverted(); + const Matrix4 invertedTransform = globalTransforms[joints[j]].inverted() * meshTransform * correction; CORRADE_COMPARE(bindMatrices[j], invertedTransform); } } From 8c9516aeb00b6765a90bbbe0fc60b582fd33bd22 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 22 Nov 2021 16:18:20 +0100 Subject: [PATCH 13/48] AssimpImporter: clean up comments --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index d8f44669b..27bdfc3a1 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -458,7 +458,7 @@ void AssimpImporter::doOpenData(Containers::Array&& data, DataFlags) { /* For some formats (such as COLLADA) Assimp fails to open the scene if there are no nodes, so there this is always non-null. For other formats - (such as glTF) Assimp happily provides a null root node, even thought + (such as glTF) Assimp happily provides a null root node, even though that's not the documented behavior. */ aiNode* const root = _f->scene->mRootNode; if(root) { @@ -1277,9 +1277,9 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt } /* Save only if the name is recognized (and let it - be imported as a custom attribute otherwise), - but increment the texture index counter always - to stay in sync */ + be imported as a custom attribute otherwise), + but increment the texture index counter always + to stay in sync */ if(attribute != MaterialAttribute{}) data = {attribute, textureIndex}; ++textureIndex; From 690e8bcd7311e11ea3defb55efdb86a3c29958cb Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 22 Nov 2021 16:18:57 +0100 Subject: [PATCH 14/48] AssimpImporter: fix possible unsigned underflow --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 27bdfc3a1..d2f1d8045 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1736,8 +1736,8 @@ Containers::Optional AssimpImporter::doAnimation(UnsignedInt id) /* Ensure shortest path is always chosen. */ if(optimizeQuaternionShortestPath) { Float flip = 1.0f; - for(std::size_t i = 0; i != values.size() - 1; ++i) { - if(Math::dot(values[i], values[i + 1]*flip) < 0) flip = -flip; + for(std::size_t i = 0; i + 1 < values.size(); ++i) { + if(Math::dot(values[i], values[i + 1]*flip) < 0.0f) flip = -flip; values[i + 1] *= flip; } } From 47cfea94448bfe0a9ed8989fe3e14ead03cb0d28 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Mon, 22 Nov 2021 21:40:09 +0100 Subject: [PATCH 15/48] AssimpImporter: import raw material data Largely taken from https://github.com/mosra/magnum-plugins/pull/91 Anything unrecognized is imported with the raw Assimp name and type. Can be turned off with ignoreUnrecognizedMaterialData, or overridden to import everything raw with forceRawMaterialData. The latter implies ignoreUnrecognizedMaterialData=false. For existing material tests we use ignoreUnrecognizedMaterialData, otherwise they'll break with every new Assimp version. TODO: tests, docs --- .../AssimpImporter/AssimpImporter.conf | 11 ++ .../AssimpImporter/AssimpImporter.cpp | 187 +++++++++++++++--- .../Test/AssimpImporterTest.cpp | 3 + 3 files changed, 174 insertions(+), 27 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.conf b/src/MagnumPlugins/AssimpImporter/AssimpImporter.conf index 7c54d9429..9e9fa3a4f 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.conf +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.conf @@ -63,6 +63,17 @@ mergeSkins=false # AI_CONFIG_* values, can be changed only before the first file is opened ImportColladaIgnoreUpDirection=false +# By default material attributes that aren't recognized as builtin attributes +# are imported with raw Assimp names and types. Enabling this option completely +# ignores unrecognized attributes instead. +ignoreUnrecognizedMaterialData=false + +# Don't attempt to recognize builtin material attributes and always import them +# as raw material data (so e.g. instead of DiffuseColor you'll get +# $clr.diffuse). Implicitly disables ignoreUnrecognizedMaterialData. Mainly for +# testing purposes. +forceRawMaterialData=false + # aiPostProcessSteps, applied to each opened file [configuration/postprocess] JoinIdenticalVertices=true diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index d2f1d8045..c74777372 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -29,6 +29,7 @@ #include "AssimpImporter.h" +#include #include #include #include @@ -172,6 +173,8 @@ void fillDefaultConfiguration(Utility::ConfigurationGroup& conf) { conf.setValue("mergeSkins", false); conf.setValue("ImportColladaIgnoreUpDirection", false); + conf.setValue("ignoreUnrecognizedMaterialData", false); + conf.setValue("forceRawMaterialData", false); Utility::ConfigurationGroup& postprocess = *conf.addGroup("postprocess"); postprocess.setValue("JoinIdenticalVertices", true); @@ -1145,6 +1148,53 @@ MaterialAttributeData materialColor(MaterialAttribute attribute, const aiMateria else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ } +Containers::String customMaterialKey(Containers::StringView key, const aiTextureType semantic) { + using namespace Containers::Literals; + + /* Create a non-owning key String, add texture type to it if + present */ + auto keyString = Containers::String::nullTerminatedView(key); + if(semantic != aiTextureType_NONE) { + Containers::StringView keyExtra; + switch(semantic) { + #define _c(type) case aiTextureType_ ## type: \ + keyExtra = #type ## _s; \ + break; + _c(AMBIENT) + _c(DIFFUSE) + _c(SPECULAR) + _c(EMISSIVE) + _c(OPACITY) + _c(NORMALS) + _c(HEIGHT) + _c(DISPLACEMENT) + _c(LIGHTMAP) + _c(REFLECTION) + _c(UNKNOWN) + _c(BASE_COLOR) + _c(SHININESS) + _c(NORMAL_CAMERA) + _c(EMISSION_COLOR) + _c(METALNESS) + _c(DIFFUSE_ROUGHNESS) + _c(AMBIENT_OCCLUSION) + #undef _c + + case aiTextureType_NONE: + case _aiTextureType_Force32Bit: + CORRADE_INTERNAL_ASSERT_UNREACHABLE(); + } + + CORRADE_INTERNAL_ASSERT(!keyExtra.isEmpty()); + + /** @todo use format() and drop data() + FormatStl include + when format() is converted to StringViews */ + keyString = Utility::formatString("{}.{}", key.data(), keyExtra.data()); + } + + return keyString; +} + #ifndef _CORRADE_HELPER_DEFER template constexpr Containers::StringView extractMaterialKey(const char(&data)[size], int, int) { return Containers::Literals::operator"" _s(data, size - 1); @@ -1154,6 +1204,9 @@ template constexpr Containers::StringView extractMaterialKey(c } Containers::Optional AssimpImporter::doMaterial(const UnsignedInt id) { + const bool forceRaw = configuration().value("forceRawMaterialData"); + const bool unrecognizedAsRaw = forceRaw || !configuration().value("ignoreUnrecognizedMaterialData"); + const aiMaterial* mat = _f->scene->mMaterials[id]; /* Calculate how many layers there are in the material */ @@ -1167,7 +1220,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt arrayReserve(attributes, mat->mNumProperties); Containers::Array layers{maxLayer + 1}; - /* Go through each layer add then for each add all its properties so they + /* Go through each layer and then for each add all its properties so they are consecutive in the array */ for(UnsignedInt layer = 0; layer <= maxLayer; ++layer) { /* Save offset of this layer */ @@ -1196,35 +1249,38 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt const Containers::StringView key{property.mKey.C_Str(), property.mKey.length, Containers::StringViewFlag::NullTerminated}; + /* AI_MATKEY_* are in form "bla",0,0, so extract the first part + and turn it into a StringView for string comparison. The + _s literal is there to avoid useless strlen() calls in every + branch. _CORRADE_HELPER_DEFER is not implementable on MSVC + (see docs in Utility/Macros.h), so there it's a constexpr + function instead. */ + #ifdef _CORRADE_HELPER_DEFER + #define _str2(name, i, j) name ## _s + #define _str(name) _CORRADE_HELPER_DEFER(_str2, name) + #else + #define _str extractMaterialKey + #endif + + /* Material name is available through materialName() / + materialForName() already, ignore it */ + if(key == _str(AI_MATKEY_NAME) && property.mType == aiPTI_String) + continue; + /* Recognize known attributes if they have expected types and - sizes */ + sizes. If they don't, they'll be treated as custom attribs in + the code below. It's also possible to skip this by enabling the + forceRawMaterialData configuration option. */ MaterialAttributeData data; MaterialAttribute attribute{}; MaterialAttributeType type{}; - { - /* AI_MATKEY_* are in form "bla",0,0, so extract the first part - and turn it into a StringView for string comparison. The - _s literal is there to avoid useless strlen() calls in every - branch. _CORRADE_HELPER_DEFER is not implementable on MSVC - (see docs in Utility/Macros.h), so there it's a constexpr - function instead. */ - #ifdef _CORRADE_HELPER_DEFER - #define _str2(name, i, j) name ## _s - #define _str(name) _CORRADE_HELPER_DEFER(_str2, name) - #else - #define _str extractMaterialKey - #endif + if(!forceRaw) { /* Properties not tied to a particular texture */ if(property.mSemantic == aiTextureType_NONE) { - /* Material name is available through materialName() / - materialForName() already, ignore it */ - if(key == _str(AI_MATKEY_NAME) && property.mType == aiPTI_String) { - continue; - /* Colors. Some formats have them three-components (OBJ), some four-component (glTF). Documentation states it's always three-component. FFS. */ - } else if(key == _str(AI_MATKEY_COLOR_AMBIENT) && property.mType == aiPTI_Float && (property.mDataLength == 4*4 || property.mDataLength == 4*3)) { + if(key == _str(AI_MATKEY_COLOR_AMBIENT) && property.mType == aiPTI_Float && (property.mDataLength == 4*4 || property.mDataLength == 4*3)) { data = materialColor(MaterialAttribute::AmbientColor, property); /* Assimp 4.1 forces ambient color to white for STL @@ -1303,10 +1359,11 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt } } } - #undef _str - #undef _str2 } + #undef _str + #undef _str2 + /* If the attribute data is already constructed (parsed from a string value etc), put it directly in */ if(data.type() != MaterialAttributeType{}) { @@ -1319,13 +1376,89 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt CORRADE_INTERNAL_ASSERT(type != MaterialAttributeType{} && type != MaterialAttributeType::String); arrayAppend(attributes, InPlaceInit, attribute, type, property.mData); - /* Otherwise ignore for now. At a later point remaining attributes - will be imported as custom, but that needs a lot of testing - which I don't have time for right now. */ + /* Otherwise figure out its type, do some additional checking and + put it there as a custom attribute */ + } else if(unrecognizedAsRaw) { + /* Attribute names starting with uppercase letters are reserved + for Magnum. All assimp material keys either start with '$' + or '?'. The only format importing raw material names is FBX + and that prefixes them with "$raw.". A quick search through + the 5.0.1 code confirms that no importer sets attributes + starting uppercase, so an assert should be fine here. + Revisit if this breaks for someone. */ + /** @todo $ conflicts with Magnum's material layer names */ + CORRADE_ASSERT(!key.isEmpty() && !std::isupper(key.front()), + "Trade::AssimpImporter::material(): uppercase attribute names are reserved", Containers::NullOpt); + + MaterialAttributeType type; + if(property.mType == aiPTI_Integer) { + if(property.mDataLength == 1) + type = MaterialAttributeType::Bool; + else if(property.mDataLength/4 == 1) + type = MaterialAttributeType::Int; + else if(property.mDataLength/4 == 2) + type = MaterialAttributeType::Vector2i; + else if(property.mDataLength/4 == 3) + type = MaterialAttributeType::Vector3i; + else if(property.mDataLength/4 == 4) + type = MaterialAttributeType::Vector4i; + else { + Warning{} << "Trade::AssimpImporter::material(): property" << key << "is integer array of" << property.mDataLength/4 << "items, saving as a typeless buffer"; + type = MaterialAttributeType::String; + } + } else if(property.mType == aiPTI_Float) { + if(property.mDataLength/4 == 1) + type = MaterialAttributeType::Float; + else if(property.mDataLength/4 == 2) + type = MaterialAttributeType::Vector2; + else if(property.mDataLength/4 == 3) + type = MaterialAttributeType::Vector3; + else if(property.mDataLength/4 == 4) + type = MaterialAttributeType::Vector4; + else { + Warning{} << "Trade::AssimpImporter::material(): property" << key << "is a float array of" << property.mDataLength/4 << "items, saving as a typeless buffer"; + type = MaterialAttributeType::String; + } + } else if(property.mType == aiPTI_Double) { + Warning{} << "Trade::AssimpImporter::material():" << key << "is a double precision property, saving as a typeless buffer"; + type = MaterialAttributeType::String; + } else if(property.mType == aiPTI_String || property.mType == aiPTI_Buffer) { + type = MaterialAttributeType::String; + } else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); + + Containers::StringView value; + std::size_t valueSize; + const void* valuePointer; + if(type == MaterialAttributeType::String) { + value = {property.mData, property.mDataLength}; + /* +2 is null byte + size */ + valueSize = property.mDataLength + 2; + valuePointer = &value; + } else { + valueSize = materialAttributeTypeSize(type); + valuePointer = property.mData; + } + + const Containers::String keyString = customMaterialKey(key, aiTextureType(property.mSemantic)); + + /* +1 is null byte for the key */ + if(valueSize + keyString.size() + 1 + sizeof(MaterialAttributeType) > sizeof(MaterialAttributeData)) { + Error{} << "Trade::AssimpImporter::material(): property" << keyString << "is too large with" << valueSize << "bytes, skipping"; + continue; + } + + Debug{} << "raw material" << key << "of type" << type << "imported as" << keyString; + + arrayAppend(attributes, Containers::InPlaceInit, keyString, type, valuePointer); } } } + /** @todo Import flat materials (AI_MATKEY_SHADING_MODEL + + aiShadingMode_NoShading). In 5.1.0 this is also exposed for glTF (used + to be AI_MATKEY_GLTF_UNLIT). */ + const MaterialType materialType = forceRaw ? MaterialType{} : MaterialType::Phong; + /* Save offset for the last layer */ layers.back() = attributes.size(); @@ -1333,7 +1466,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt deleter */ arrayShrink(attributes, DefaultInit); /** @todo detect PBR properties and add relevant types accordingly */ - return MaterialData{MaterialType::Phong, std::move(attributes), std::move(layers), mat}; + return MaterialData{materialType, std::move(attributes), std::move(layers), mat}; } UnsignedInt AssimpImporter::doTextureCount() const { return _f->textures.size(); } diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index feb3eff1b..738ac71a8 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -1715,6 +1715,7 @@ void AssimpImporterTest::lightUnsupported() { void AssimpImporterTest::materialColor() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + importer->configuration().setValue("ignoreUnrecognizedMaterialData", true); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-color.dae"))); CORRADE_COMPARE(importer->materialCount(), 1); @@ -1748,6 +1749,7 @@ void AssimpImporterTest::materialColor() { void AssimpImporterTest::materialTexture() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + importer->configuration().setValue("ignoreUnrecognizedMaterialData", true); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-texture.dae"))); CORRADE_COMPARE(importer->materialCount(), 1); @@ -1784,6 +1786,7 @@ void AssimpImporterTest::materialTexture() { void AssimpImporterTest::materialColorTexture() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + importer->configuration().setValue("ignoreUnrecognizedMaterialData", true); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-color-texture.obj"))); { From b4cac3686ffef73c7aa44e76a101ec7d187b3d78 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Wed, 24 Nov 2021 23:55:45 +0100 Subject: [PATCH 16/48] AssimpImporter: extract raw aiString and bool material properties Not too sure about the bool because converting from a buffer kinda defies the definition of "raw" --- .../AssimpImporter/AssimpImporter.cpp | 45 ++++++++++++++++--- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index c74777372..967acf08c 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1403,8 +1403,12 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt else if(property.mDataLength/4 == 4) type = MaterialAttributeType::Vector4i; else { - Warning{} << "Trade::AssimpImporter::material(): property" << key << "is integer array of" << property.mDataLength/4 << "items, saving as a typeless buffer"; - type = MaterialAttributeType::String; + Warning{} << "Trade::AssimpImporter::material(): property" << key << "is an integer array of" << property.mDataLength/4 << "items, saving as a typeless buffer"; + /* Using Pointer to indicate this is a buffer. String + would indicate aiString which needs special handling + for the length prefix. This still becomes an owned + String later. */ + type = MaterialAttributeType::Pointer; } } else if(property.mType == aiPTI_Float) { if(property.mDataLength/4 == 1) @@ -1417,28 +1421,57 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt type = MaterialAttributeType::Vector4; else { Warning{} << "Trade::AssimpImporter::material(): property" << key << "is a float array of" << property.mDataLength/4 << "items, saving as a typeless buffer"; - type = MaterialAttributeType::String; + /* See comment above */ + type = MaterialAttributeType::Pointer; } } else if(property.mType == aiPTI_Double) { + /** @todo This shouldn't happen without compiling Assimp + with double support. But then the importer would only + produce garbage because we assume ai_real equals float + everywhere. */ Warning{} << "Trade::AssimpImporter::material():" << key << "is a double precision property, saving as a typeless buffer"; - type = MaterialAttributeType::String; - } else if(property.mType == aiPTI_String || property.mType == aiPTI_Buffer) { + /* See comment above */ + type = MaterialAttributeType::Pointer; + } else if(property.mType == aiPTI_Buffer) { + if(property.mDataLength == 1) { + /* The glTF importer writes bool properties as buffers + with size 1, when all the other importers write them + as ints. Currently there is no importer that + writes opaque buffer data, so we try to detect this. + Funny library. */ + type = MaterialAttributeType::Bool; + } else { + /* See comment about Pointer further above */ + type = MaterialAttributeType::Pointer; + } + } else if(property.mType == aiPTI_String) { type = MaterialAttributeType::String; } else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); Containers::StringView value; std::size_t valueSize; const void* valuePointer; - if(type == MaterialAttributeType::String) { + if(type == MaterialAttributeType::Pointer) { + /* Opaque buffer, turn it into an owned String */ + type = MaterialAttributeType::String; value = {property.mData, property.mDataLength}; /* +2 is null byte + size */ valueSize = property.mDataLength + 2; valuePointer = &value; + } else if(type == MaterialAttributeType::String) { + const aiString& str = *reinterpret_cast(property.mData); + value = {str.C_Str(), str.length}; + /* +2 is null byte + size */ + valueSize = str.length + 2; + valuePointer = &value; } else { valueSize = materialAttributeTypeSize(type); valuePointer = property.mData; } + CORRADE_INTERNAL_ASSERT(type != MaterialAttributeType::Pointer && + type != MaterialAttributeType::MutablePointer); + const Containers::String keyString = customMaterialKey(key, aiTextureType(property.mSemantic)); /* +1 is null byte for the key */ From b0faba1b73b8f5a2f6d03a383a409bf40fee4af7 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 18:13:56 +0100 Subject: [PATCH 17/48] AssimpImporter: document new raw material data config options --- src/MagnumPlugins/AssimpImporter/AssimpImporter.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h index 9c92177f9..838e1e974 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h @@ -265,6 +265,18 @@ verbosity levels in each instance. - Only materials with shading mode `aiShadingMode_Phong` are supported - Two-sided property and alpha mode is not imported +- Unrecognized Assimp material attributes are imported with their raw names + and types. You can find the attribute names in [assimp/material.h](https://github.com/assimp/assimp/blob/master/include/assimp/material.h#L944). + Unknown or raw buffer types are imported as + @ref MaterialAttributeType::String. To ignore all unrecognized Assimp + materials instead, enable the @cb{.ini} ignoreUnrecognizedMaterialData @ce + @ref Trade-AssimpImporter-configuration "configuration option". +- To load all material attributes with the raw Assimp names and types, enable + the @cb{.ini} forceRawMaterialData @ce + @ref Trade-AssimpImporter-configuration "configuration option". You will + then get attributes like "$clr.diffuse" instead of + @cpp MaterialAttribute::DiffuseColor @ce. @ref MaterialData::types() will + always be empty with this option enabled. - Assimp seems to ignore ambient textures in COLLADA files - For some reason, Assimp 4.1 imports STL models with ambient set to @cpp 0xffffff_srgbf @ce, which causes all other color information to be From 66cff86b24947861cf1b50b156243089fa944579 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 18:14:41 +0100 Subject: [PATCH 18/48] AssimpImporter: add some todos Just a few things I stumbled upon while working on this --- .../AssimpImporter/AssimpImporter.cpp | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 967acf08c..b769dae6c 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1313,6 +1313,13 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt type = MaterialAttributeType::Float; } + /** @todo + - MaterialAttribute::DoubleSided - AI_MATKEY_TWOSIDED + - MaterialAttribute::AlphaBlend - AI_MATKEY_GLTF_ALPHAMODE == "BLEND", glTF only + - MaterialAttribute::AlphaMask - AI_MATKEY_GLTF_ALPHAMODE == "MASK" + AI_MATKEY_GLTF_ALPHACUTOFF, glTF only + - MaterialType::Flat - AI_MATKEY_SHADING_MODEL + aiShadingMode_NoShading. + For versions < 5.1.0 this is AI_MATKEY_GLTF_UNLIT for glTF. */ + /* Properties tied to a particular texture */ } else { /* Texture index */ @@ -1359,6 +1366,10 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt } } } + + /** @todo PBR support. Assimp 5.1.0 finally has unified support + for PBR attributes, including the fancy glTF extensions: + https://github.com/assimp/assimp/blob/v5.1.0/include/assimp/material.h#L971 */ } #undef _str @@ -1487,18 +1498,14 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt } } - /** @todo Import flat materials (AI_MATKEY_SHADING_MODEL + - aiShadingMode_NoShading). In 5.1.0 this is also exposed for glTF (used - to be AI_MATKEY_GLTF_UNLIT). */ - const MaterialType materialType = forceRaw ? MaterialType{} : MaterialType::Phong; - /* Save offset for the last layer */ layers.back() = attributes.size(); /* Can't use growable deleters in a plugin, convert back to the default deleter */ arrayShrink(attributes, DefaultInit); - /** @todo detect PBR properties and add relevant types accordingly */ + + const MaterialType materialType = forceRaw ? MaterialType{} : MaterialType::Phong; return MaterialData{materialType, std::move(attributes), std::move(layers), mat}; } @@ -1536,6 +1543,8 @@ Containers::Optional AssimpImporter::doTexture(const UnsignedInt id if(mat->Get(AI_MATKEY_MAPPINGMODE_V(type, 0), mapMode) == AI_SUCCESS) wrappingV = toWrapping(mapMode); + /** @todo AI_MATKEY_GLTF_MAPPINGFILTER_{MIN, MAG} for glTF */ + return TextureData{TextureType::Texture2D, SamplerFilter::Linear, SamplerFilter::Linear, SamplerMipmap::Linear, {wrappingU, wrappingV, SamplerWrapping::ClampToEdge}, std::get<2>(_f->textures[id]), &_f->textures[id]}; From b241ce3bc85a7bf58676af6b5b7b9ce6f402bc5c Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 18:14:52 +0100 Subject: [PATCH 19/48] AssimpImporter: don't need this anymore --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index b769dae6c..44bec5834 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1491,8 +1491,6 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt continue; } - Debug{} << "raw material" << key << "of type" << type << "imported as" << keyString; - arrayAppend(attributes, Containers::InPlaceInit, keyString, type, valuePointer); } } From 69d0c26d0b014c23ed31cff0ae3b8d7186250b9a Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 18:16:46 +0100 Subject: [PATCH 20/48] AssimpImporter: test layered materials --- .../Test/AssimpImporterTest.cpp | 58 ++++++++++++++++++ .../AssimpImporter/Test/CMakeLists.txt | 1 + .../AssimpImporter/Test/material-layers.fbx | Bin 0 -> 27856 bytes 3 files changed, 59 insertions(+) create mode 100644 src/MagnumPlugins/AssimpImporter/Test/material-layers.fbx diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 738ac71a8..8ec2af91d 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -119,6 +119,7 @@ struct AssimpImporterTest: TestSuite::Tester { void materialWhiteAmbientTexture(); void materialMultipleTextures(); void materialTextureCoordinateSets(); + void materialTextureLayers(); void mesh(); void pointMesh(); @@ -255,6 +256,7 @@ AssimpImporterTest::AssimpImporterTest() { &AssimpImporterTest::materialWhiteAmbientTexture, &AssimpImporterTest::materialMultipleTextures, &AssimpImporterTest::materialTextureCoordinateSets, + &AssimpImporterTest::materialTextureLayers, &AssimpImporterTest::mesh, &AssimpImporterTest::pointMesh, @@ -2020,6 +2022,62 @@ void AssimpImporterTest::materialTextureCoordinateSets() { CORRADE_COMPARE(phong.normalTextureCoordinates(), 2); } +void AssimpImporterTest::materialTextureLayers() { + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + importer->configuration().setValue("ignoreUnrecognizedMaterialData", true); + + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-layers.fbx"))); + CORRADE_COMPARE(importer->materialCount(), 1); + + const auto material = importer->material(0); + CORRADE_VERIFY(material); + CORRADE_COMPARE(material->layerCount(), 3); + + /* Layer 0. Material attributes + diffuse texture + ambient texture. */ + { + CORRADE_VERIFY(material->hasAttribute(0, MaterialAttribute::AmbientColor)); + CORRADE_COMPARE(material->attribute(0, MaterialAttribute::AmbientColor), + (Color4{0.1f, 0.2f, 0.3f, 1.0f})); + + CORRADE_VERIFY(material->hasAttribute(0, MaterialAttribute::DiffuseColor)); + CORRADE_COMPARE(material->attribute(0, MaterialAttribute::DiffuseColor), + (Color4{0.7f, 0.6f, 0.5f, 1.0f})); + + CORRADE_VERIFY(material->hasAttribute(0, MaterialAttribute::AmbientTexture)); + CORRADE_COMPARE(material->attribute(0, MaterialAttribute::AmbientTexture), 0); + + CORRADE_VERIFY(material->hasAttribute(0, MaterialAttribute::AmbientTextureCoordinates)); + CORRADE_COMPARE(material->attribute(0, MaterialAttribute::AmbientTextureCoordinates), 0); + + CORRADE_VERIFY(material->hasAttribute(0, MaterialAttribute::DiffuseTexture)); + CORRADE_COMPARE(material->attribute(0, MaterialAttribute::DiffuseTexture), 1); + + CORRADE_VERIFY(material->hasAttribute(0, MaterialAttribute::DiffuseTextureCoordinates)); + CORRADE_COMPARE(material->attribute(0, MaterialAttribute::DiffuseTextureCoordinates), 0); + + /* Layer 1. Diffuse texture. Can't have any material attributes. */ + } { + CORRADE_VERIFY(!material->hasAttribute(1, MaterialAttribute::AmbientColor)); + CORRADE_VERIFY(!material->hasAttribute(1, MaterialAttribute::DiffuseColor)); + + CORRADE_VERIFY(material->hasAttribute(0, MaterialAttribute::DiffuseTexture)); + CORRADE_COMPARE(material->attribute(1, MaterialAttribute::DiffuseTexture), 2); + + CORRADE_VERIFY(material->hasAttribute(1, MaterialAttribute::DiffuseTextureCoordinates)); + CORRADE_COMPARE(material->attribute(1, MaterialAttribute::DiffuseTextureCoordinates), 0); + + /* Layer 2. Diffuse texture. Can't have any material attributes. */ + } { + CORRADE_VERIFY(!material->hasAttribute(2, MaterialAttribute::AmbientColor)); + CORRADE_VERIFY(!material->hasAttribute(2, MaterialAttribute::DiffuseColor)); + + CORRADE_VERIFY(material->hasAttribute(2, MaterialAttribute::DiffuseTexture)); + CORRADE_COMPARE(material->attribute(2, MaterialAttribute::DiffuseTexture), 3); + + CORRADE_VERIFY(material->hasAttribute(2, MaterialAttribute::DiffuseTextureCoordinates)); + CORRADE_COMPARE(material->attribute(2, MaterialAttribute::DiffuseTextureCoordinates), 0); + } +} void AssimpImporterTest::mesh() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "mesh.dae"))); diff --git a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt index 4b64be52e..109cd0236 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt @@ -81,6 +81,7 @@ corrade_add_test(AssimpImporterTest AssimpImporterTest.cpp material-color-texture.mtl material-color-texture.obj material-coordinate-sets.dae + material-layers.fbx mesh.dae mips.dds multiple-textures.mtl r.png g.png b.png y.png diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-layers.fbx b/src/MagnumPlugins/AssimpImporter/Test/material-layers.fbx new file mode 100644 index 0000000000000000000000000000000000000000..52de0ed144e9f1684c12795c899d57a91d91fbf6 GIT binary patch literal 27856 zcmc&-3vgW3d0vBM$+p1877m1$g6$X^+xUSoHco9lEL&KzgjSMmUgk=BC0%=W@3IeD z%8&$7h8DM-!epi`q!ef;DQ!cCVG0S983=AtoPi_^lMn)Jm@*AeNJ?8^(u5)XzjOZo z-n(b--MuS`>6!7~*Z+U#KmY4I?z!?lYbs^st=6vggRSjO*2+({wkAHEXt^+v*g8KE zT9y#)UfW99`Q4L6J6mwvY>^4)@Uel9i#^g|I}gI{cTZ0w{yc(u0Z|Jb1b8lj?#$iU z(fm}dNO*%&IlCKVt50KM<8W3--nJB_ld+RUE0g;a3u(&QC{@2jB5sQyntRB$^4X_(WNOF83g5>m0YpVNPBDg<-VD4VGlF$rf6VY0I~6+OTQE`VH$h{v^Uu3;K!^cD^fZjTfFa>Jn+22Rl0LF(>Q5pxs}p zkTG!MLUvxMY!yG7pB%Nbc6WBnO`c7+_N3hrD~-#<9REoZJsB$4`A(~7?IUkM5#5}j zFB5a&ddVPV&Y%>jJ;zEB>o?{yzj0{lwTl+&dpr)xD-lEugHADRCxQKO1W9AEG;+iq zEh?gmSsH1ah&->YRGc820%&gpP18Pm>bRRv6%hVtnoMR8(ZvY2 z_duOoNVR&%H>F1Ik%KeX>mb#{ya@C&EBprA={_vRJdn>TIWbj5~-1&ZG5io|kW7koKAkJAOWj+C5q>T}k%EgLp%xx%vk1mcF2 zGj;cvw2MW`k%eoF`o)914h|!yFGOIKCFv&^Nf1_Z<>Z6N5JS1PNvEK4vO}E$qM$ol zw8w4TBXujSBb!qZh;{lBZVYgSaK^LMVY&>MwLT2Y)s?5wTywZP7BqVoNHa zYD(73BQa@Xpm$nCa6>doOpaP{ zQ+5)aoSiLY{O+_HWM4Db1F?>_gPm$Ex}$D73lXJ@)OrrB@7MEtJisX^o@-b?4n9M!_>jJ`O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Yy`zf}l_h`#&lrygp0>D0?Nee>pzZ@cK%mrXJy{;#h8ukx#F|M1Aa Se(=f{-+jCJjnW^lUig2(6(2$X literal 0 HcmV?d00001 From 2c329ae26ae248bf37fd884e72cc54cce8b3f329 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 18:17:09 +0100 Subject: [PATCH 21/48] AssimpImporter: test raw material data --- .../Test/AssimpImporterTest.cpp | 275 ++++++ .../AssimpImporter/Test/CMakeLists.txt | 2 + .../AssimpImporter/Test/material-raw.fbx | 833 ++++++++++++++++++ .../AssimpImporter/Test/material-raw.gltf | 73 ++ 4 files changed, 1183 insertions(+) create mode 100644 src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx create mode 100644 src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 8ec2af91d..1329997e6 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -120,6 +120,9 @@ struct AssimpImporterTest: TestSuite::Tester { void materialMultipleTextures(); void materialTextureCoordinateSets(); void materialTextureLayers(); + void materialRawUnrecognized(); + void materialRaw(); + void materialRawTextureLayers(); void mesh(); void pointMesh(); @@ -257,6 +260,9 @@ AssimpImporterTest::AssimpImporterTest() { &AssimpImporterTest::materialMultipleTextures, &AssimpImporterTest::materialTextureCoordinateSets, &AssimpImporterTest::materialTextureLayers, + &AssimpImporterTest::materialRawUnrecognized, + &AssimpImporterTest::materialRaw, + &AssimpImporterTest::materialRawTextureLayers, &AssimpImporterTest::mesh, &AssimpImporterTest::pointMesh, @@ -1717,6 +1723,7 @@ void AssimpImporterTest::lightUnsupported() { void AssimpImporterTest::materialColor() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + /* Unrecognized materials are tested separately in materialRaw() */ importer->configuration().setValue("ignoreUnrecognizedMaterialData", true); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-color.dae"))); @@ -2078,6 +2085,274 @@ void AssimpImporterTest::materialTextureLayers() { CORRADE_COMPARE(material->attribute(2, MaterialAttribute::DiffuseTextureCoordinates), 0); } } + +template constexpr Containers::StringView extractMaterialKey(const char(&data)[size], int, int) { + return Containers::Literals::operator"" _s(data, size - 1); +} + +void AssimpImporterTest::materialRawUnrecognized() { + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + /* Disabled by default */ + CORRADE_VERIFY(!importer->configuration().value("ignoreUnrecognizedMaterialData")); + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-raw.fbx"))); + + CORRADE_COMPARE(importer->materialCount(), 2); + + Containers::Optional material = importer->material("Mat_1"); + CORRADE_VERIFY(material); + CORRADE_COMPARE(material->types(), MaterialType::Phong); + CORRADE_COMPARE(material->layerCount(), 1); + CORRADE_COMPARE(material->attributeCount(), 5); + + /* Recognized attributes */ + { + CORRADE_VERIFY(material->hasAttribute(MaterialAttribute::AmbientColor)); + CORRADE_COMPARE(material->attributeId(MaterialAttribute::AmbientColor), 3); + CORRADE_COMPARE(material->attribute(3), (Color4{0.1f, 0.05f, 0.1f, 1.0f})); + } { + CORRADE_VERIFY(material->hasAttribute(MaterialAttribute::DiffuseColor)); + CORRADE_COMPARE(material->attributeId(MaterialAttribute::DiffuseColor), 4); + CORRADE_COMPARE(material->attribute(4), (Color4{0.4f, 0.2f, 0.1f, 1.0f})); + + /* Unrecognized attributes */ + } { + CORRADE_COMPARE(material->attributeName(0), extractMaterialKey(AI_MATKEY_COLOR_TRANSPARENT)); + CORRADE_COMPARE(material->attributeType(0), MaterialAttributeType::Vector3); + CORRADE_COMPARE(material->attribute(0), (Vector3{0.2f, 0.4f, 0.6f})); + } { + CORRADE_COMPARE(material->attributeName(1), extractMaterialKey(AI_MATKEY_OPACITY)); + CORRADE_COMPARE(material->attributeType(1), MaterialAttributeType::Float); + CORRADE_COMPARE(material->attribute(1), 0.35f); + } { + /* The transparency factor is multiplied with the transparent color but + still reported separately. We don't get the factors for ambient or + diffuse. */ + CORRADE_COMPARE(material->attributeName(2), extractMaterialKey(AI_MATKEY_TRANSPARENCYFACTOR)); + CORRADE_COMPARE(material->attributeType(2), MaterialAttributeType::Float); + CORRADE_COMPARE(material->attribute(2), 2.0f); + } +} + +void AssimpImporterTest::materialRaw() { + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + /* Disabled by default */ + CORRADE_VERIFY(!importer->configuration().value("forceRawMaterialData")); + importer->configuration().setValue("forceRawMaterialData", true); + + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-raw.fbx"))); + CORRADE_COMPARE(importer->materialCount(), 2); + + Containers::Optional material = importer->material("Mat_2"); + CORRADE_VERIFY(material); + CORRADE_COMPARE(material->types(), MaterialType{}); + CORRADE_COMPARE(material->layerCount(), 1); + CORRADE_COMPARE(material->attributeCount(), 5); + + /* Not all types and sizes are tested: + - no importers currently output int2/3/4/5+ or float2/5+ + - to get double properties, we'd need to compile assimp with + ASSIMP_DOUBLE_PRECISION, which breaks the plugin */ + + /* Attributes that would normally be recognized */ + CORRADE_VERIFY(!material->hasAttribute(MaterialAttribute::AmbientColor)); + CORRADE_VERIFY(!material->hasAttribute(MaterialAttribute::DiffuseColor)); + + /* Raw Assimp attributes */ + { + CORRADE_COMPARE(material->attributeName(0), extractMaterialKey(AI_MATKEY_COLOR_AMBIENT)); + CORRADE_COMPARE(material->attributeType(0), MaterialAttributeType::Vector3); + CORRADE_COMPARE(material->attribute(0), (Color3{0.1f, 0.05f, 0.1f})); + } { + CORRADE_COMPARE(material->attributeName(1), extractMaterialKey(AI_MATKEY_COLOR_DIFFUSE)); + CORRADE_COMPARE(material->attributeType(1), MaterialAttributeType::Vector3); + CORRADE_COMPARE(material->attribute(1), (Color3{0.4f, 0.2f, 0.1f})); + } { + CORRADE_COMPARE(material->attributeName(2), extractMaterialKey(AI_MATKEY_TRANSPARENCYFACTOR)); + CORRADE_COMPARE(material->attributeType(2), MaterialAttributeType::Float); + CORRADE_COMPARE(material->attribute(2), 0.25f); + + /* Raw attributes taken directly from the FBX file, prefixed with "$raw.". + Seems to be the only importer that supports that. */ + } { + CORRADE_COMPARE(material->attributeName(3), "$raw.AString"_s); + CORRADE_COMPARE(material->attributeType(3), MaterialAttributeType::String); + const auto x = material->attribute(3); + CORRADE_COMPARE(material->attribute(3), "Ministry of Finance (Turkmenistan)"); + } { + CORRADE_COMPARE(material->attributeName(4), "$raw.SomeColor"_s); + CORRADE_COMPARE(material->attributeType(4), MaterialAttributeType::Vector3); + CORRADE_COMPARE(material->attribute(4), (Vector3{0.1f, 0.2f, 0.3f})); + } + + /* glTF covers a few types/sizes not covered by FBX */ + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-raw.gltf"))); + { + /* There's an extra material with only default values */ + CORRADE_EXPECT_FAIL("glTF files are imported with a dummy material."); + CORRADE_COMPARE(importer->materialCount(), 1); + } + + material = importer->material("raw"); + CORRADE_VERIFY(material); + CORRADE_COMPARE(material->types(), MaterialType{}); + { + /* While it's weird, this extra layer is very handy to make sure all + raw attributes land in layer 0. Only texture attributes can have an + index, and hence, a layer. */ + CORRADE_EXPECT_FAIL("glTF files with non-0 texture coordinate set add an extra diffuse-only material layer."); + CORRADE_COMPARE(material->layerCount(), 1); + } + CORRADE_COMPARE(material->layerCount(), 2); + + /* Attributes that would normally be recognized */ + CORRADE_VERIFY(!material->hasAttribute(MaterialAttribute::DiffuseColor)); + + /* Raw attributes. Only checking interesting attributes, because this would + be a nightmare to maintain across multiple Assimp versions. */ + { + constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_DIFFUSE); + CORRADE_VERIFY(material->hasAttribute(name)); + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Vector4); + CORRADE_COMPARE(material->attribute(name), (Color4{0.8f, 0.2f, 0.4f, 0.3f})); + } { + /* For some reason Assimp adds an alpha channel to the emissive color */ + constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_EMISSIVE); + CORRADE_VERIFY(material->hasAttribute(name)); + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Vector4); + CORRADE_COMPARE(material->attribute(name), (Color4{0.1f, 0.2f, 0.3f})); + } { + /* Opaque buffer of size 1 converted to Bool */ + constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_TWOSIDED); + CORRADE_VERIFY(material->hasAttribute(name)); + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Bool); + CORRADE_COMPARE(material->attribute(name), true); + } { + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, + "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVTRANSFORM."); + + constexpr Containers::StringView name = _AI_MATKEY_UVTRANSFORM_BASE ".NORMAL"_s; + const bool hasAttribute = material->hasAttribute(name); + CORRADE_VERIFY(hasAttribute); + + /* Still have to skip the checks to not trigger asserts for missing + attribute names in attributeType() and attribute() */ + if(hasAttribute) { + /* Opaque buffer converted to String */ + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::String); + const auto value = material->attribute(name); + /* +1 is null byte */ + CORRADE_COMPARE(value.size(), sizeof(aiUVTransform) + 1); + const aiUVTransform& transform = *reinterpret_cast(value.data()); + const Vector2 scaling{transform.mScaling.x, transform.mScaling.y}; + CORRADE_COMPARE(scaling, (Vector2{0.25f, 0.75f})); + } + } + + /* Test that the second layer only contains texture attributes. Those all + start with "$tex.": + https://github.com/assimp/assimp/blob/889e55969647b9bd9e832d6208b41973156ce46b/include/assimp/material.h#L1051 + Non-texture attributes always have mIndex set to 0 so shouldn't be here. */ + for(UnsignedInt i = 0; i != material->attributeCount(1); ++i) + CORRADE_VERIFY(material->attributeName(1, i).hasPrefix("$tex."_s)); +} + +void AssimpImporterTest::materialRawTextureLayers() { + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); + importer->configuration().setValue("forceRawMaterialData", true); + + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-layers.fbx"))); + CORRADE_COMPARE(importer->materialCount(), 1); + + const auto material = importer->material(0); + CORRADE_VERIFY(material); + CORRADE_COMPARE(material->layerCount(), 3); + + /* Layer 0. Material attributes + diffuse texture + ambient texture. */ + { + { + CORRADE_VERIFY(!material->hasAttribute(0, MaterialAttribute::AmbientColor)); + constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_AMBIENT); + CORRADE_VERIFY(material->hasAttribute(0, name)); + CORRADE_COMPARE(material->attributeType(0, name), MaterialAttributeType::Vector3); + CORRADE_COMPARE(material->attribute(0, name), (Color3{0.1f, 0.2f, 0.3f})); + } { + CORRADE_VERIFY(!material->hasAttribute(0, MaterialAttribute::DiffuseColor)); + constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_DIFFUSE); + CORRADE_VERIFY(material->hasAttribute(0, name)); + CORRADE_COMPARE(material->attributeType(0, name), MaterialAttributeType::Vector3); + CORRADE_COMPARE(material->attribute(0, name), (Color3{0.7f, 0.6f, 0.5f})); + }{ + /* Texture indices are calculated from the attribute order inside + AssimpImporter, but they're not material properties. Just check + the name property. */ + CORRADE_VERIFY(!material->hasAttribute(0, MaterialAttribute::AmbientTexture)); + constexpr Containers::StringView name = _AI_MATKEY_TEXTURE_BASE ".AMBIENT"_s; + CORRADE_VERIFY(material->hasAttribute(0, name)); + CORRADE_COMPARE(material->attributeType(0, name), MaterialAttributeType::String); + CORRADE_COMPARE(material->attribute(0, name), "ambient.png"_s); + } { + CORRADE_VERIFY(!material->hasAttribute(0, MaterialAttribute::AmbientTextureCoordinates)); + constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".AMBIENT"_s; + CORRADE_VERIFY(material->hasAttribute(0, name)); + CORRADE_COMPARE(material->attributeType(0, name), MaterialAttributeType::Int); + CORRADE_COMPARE(material->attribute(0, name), 0); + } { + CORRADE_VERIFY(!material->hasAttribute(0, MaterialAttribute::DiffuseTexture)); + constexpr Containers::StringView name = _AI_MATKEY_TEXTURE_BASE ".DIFFUSE"_s; + CORRADE_VERIFY(material->hasAttribute(0, name)); + CORRADE_COMPARE(material->attributeType(0, name), MaterialAttributeType::String); + CORRADE_COMPARE(material->attribute(0, name), "one.jpg"_s); + } { + CORRADE_VERIFY(!material->hasAttribute(0, MaterialAttribute::DiffuseTextureCoordinates)); + constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".DIFFUSE"_s; + CORRADE_VERIFY(material->hasAttribute(0, name)); + CORRADE_COMPARE(material->attributeType(0, name), MaterialAttributeType::Int); + CORRADE_COMPARE(material->attribute(0, name), 0); + } + + /* Layer 1. Diffuse texture. */ + } { + /* We check that there are no non-texture attributes in this layer at + the end of the test */ + { + CORRADE_VERIFY(!material->hasAttribute(1, MaterialAttribute::DiffuseTexture)); + constexpr Containers::StringView name = _AI_MATKEY_TEXTURE_BASE ".DIFFUSE"_s; + CORRADE_VERIFY(material->hasAttribute(1, name)); + CORRADE_COMPARE(material->attributeType(1, name), MaterialAttributeType::String); + CORRADE_COMPARE(material->attribute(1, name), "two.jpg"_s); + } { + CORRADE_VERIFY(!material->hasAttribute(1, MaterialAttribute::DiffuseTextureCoordinates)); + constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".DIFFUSE"_s; + CORRADE_VERIFY(material->hasAttribute(1, name)); + CORRADE_COMPARE(material->attributeType(1, name), MaterialAttributeType::Int); + CORRADE_COMPARE(material->attribute(1, name), 0); + } + + /* Layer 2. Diffuse texture. */ + } { + /* We check that there are no non-texture attributes in this layer at + the end of the test */ + { + CORRADE_VERIFY(!material->hasAttribute(2, MaterialAttribute::DiffuseTexture)); + constexpr Containers::StringView name = _AI_MATKEY_TEXTURE_BASE ".DIFFUSE"_s; + CORRADE_VERIFY(material->hasAttribute(2, name)); + CORRADE_COMPARE(material->attributeType(2, name), MaterialAttributeType::String); + CORRADE_COMPARE(material->attribute(2, name), "three.jpg"_s); + } { + CORRADE_VERIFY(!material->hasAttribute(2, MaterialAttribute::DiffuseTextureCoordinates)); + constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".DIFFUSE"_s; + CORRADE_VERIFY(material->hasAttribute(2, name)); + CORRADE_COMPARE(material->attributeType(2, name), MaterialAttributeType::Int); + CORRADE_COMPARE(material->attribute(2, name), 0); + } + } + + /* Test that layers > 0 only contain raw texture attributes */ + for(UnsignedInt l = 1; l != material->layerCount(); ++l) + for(UnsignedInt i = 0; i != material->attributeCount(l); ++i) + CORRADE_VERIFY(material->attributeName(l, i).hasPrefix("$tex."_s)); +} + void AssimpImporterTest::mesh() { Containers::Pointer importer = _manager.instantiate("AssimpImporter"); CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "mesh.dae"))); diff --git a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt index 109cd0236..9774a26ac 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt @@ -82,6 +82,8 @@ corrade_add_test(AssimpImporterTest AssimpImporterTest.cpp material-color-texture.obj material-coordinate-sets.dae material-layers.fbx + material-raw.fbx + material-raw.gltf mesh.dae mips.dds multiple-textures.mtl r.png g.png b.png y.png diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx b/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx new file mode 100644 index 000000000..e9bf1a36e --- /dev/null +++ b/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx @@ -0,0 +1,833 @@ +; FBX 7.5.0 project file +; ---------------------------------------------------- + +FBXHeaderExtension: { + FBXHeaderVersion: 1003 + FBXVersion: 7500 + CreationTimeStamp: { + Version: 1000 + Year: 2019 + Month: 1 + Day: 7 + Hour: 16 + Minute: 17 + Second: 31 + Millisecond: 730 + } + Creator: "FBX SDK/FBX Plugins version 2018.1.1" + SceneInfo: "SceneInfo::GlobalInfo", "UserData" { + Type: "UserData" + Version: 100 + MetaData: { + Version: 100 + Title: "" + Subject: "" + Author: "" + Keywords: "" + Revision: "" + Comment: "" + } + Properties70: { + P: "DocumentUrl", "KString", "Url", "", "U:\Some\Absolute\Path\cubes_with_names.fbx" + P: "SrcDocumentUrl", "KString", "Url", "", "U:\Some\Absolute\Path\cubes_with_names.fbx" + P: "Original", "Compound", "", "" + P: "Original|ApplicationVendor", "KString", "", "", "Autodesk" + P: "Original|ApplicationName", "KString", "", "", "Maya" + P: "Original|ApplicationVersion", "KString", "", "", "201800" + P: "Original|DateTime_GMT", "DateTime", "", "", "07/01/2019 16:17:31.730" + P: "Original|FileName", "KString", "", "", "U:\Some\Absolute\Path\cubes_with_names.fbx" + P: "LastSaved", "Compound", "", "" + P: "LastSaved|ApplicationVendor", "KString", "", "", "Autodesk" + P: "LastSaved|ApplicationName", "KString", "", "", "Maya" + P: "LastSaved|ApplicationVersion", "KString", "", "", "201800" + P: "LastSaved|DateTime_GMT", "DateTime", "", "", "07/01/2019 16:17:31.730" + P: "Original|ApplicationActiveProject", "KString", "", "", "U:\Some\Absolute\Path" + } + } +} +GlobalSettings: { + Version: 1000 + Properties70: { + P: "UpAxis", "int", "Integer", "",1 + P: "UpAxisSign", "int", "Integer", "",1 + P: "FrontAxis", "int", "Integer", "",2 + P: "FrontAxisSign", "int", "Integer", "",1 + P: "CoordAxis", "int", "Integer", "",0 + P: "CoordAxisSign", "int", "Integer", "",1 + P: "OriginalUpAxis", "int", "Integer", "",1 + P: "OriginalUpAxisSign", "int", "Integer", "",1 + P: "UnitScaleFactor", "double", "Number", "",1 + P: "OriginalUnitScaleFactor", "double", "Number", "",1 + P: "AmbientColor", "ColorRGB", "Color", "",0,0,0 + P: "DefaultCamera", "KString", "", "", "Producer Perspective" + P: "TimeMode", "enum", "", "",11 + P: "TimeProtocol", "enum", "", "",2 + P: "SnapOnFrameMode", "enum", "", "",0 + P: "TimeSpanStart", "KTime", "Time", "",1924423250 + P: "TimeSpanStop", "KTime", "Time", "",384884650000 + P: "CustomFrameRate", "double", "Number", "",-1 + P: "TimeMarker", "Compound", "", "" + P: "CurrentTimeMarker", "int", "Integer", "",-1 + } +} + +; Documents Description +;------------------------------------------------------------------ + +Documents: { + Count: 1 + Document: 2359325563280, "", "Scene" { + Properties70: { + P: "SourceObject", "object", "", "" + P: "ActiveAnimStackName", "KString", "", "", "Take 001" + } + RootNode: 0 + } +} + +; Document References +;------------------------------------------------------------------ + +References: { +} + +; Object definitions +;------------------------------------------------------------------ + +Definitions: { + Version: 100 + Count: 13 + ObjectType: "GlobalSettings" { + Count: 1 + } + ObjectType: "AnimationStack" { + Count: 1 + PropertyTemplate: "FbxAnimStack" { + Properties70: { + P: "Description", "KString", "", "", "" + P: "LocalStart", "KTime", "Time", "",0 + P: "LocalStop", "KTime", "Time", "",0 + P: "ReferenceStart", "KTime", "Time", "",0 + P: "ReferenceStop", "KTime", "Time", "",0 + } + } + } + ObjectType: "AnimationLayer" { + Count: 1 + PropertyTemplate: "FbxAnimLayer" { + Properties70: { + P: "Weight", "Number", "", "A",100 + P: "Mute", "bool", "", "",0 + P: "Solo", "bool", "", "",0 + P: "Lock", "bool", "", "",0 + P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 + P: "BlendMode", "enum", "", "",0 + P: "RotationAccumulationMode", "enum", "", "",0 + P: "ScaleAccumulationMode", "enum", "", "",0 + P: "BlendModeBypass", "ULongLong", "", "",0 + } + } + } + ObjectType: "Geometry" { + Count: 4 + PropertyTemplate: "FbxMesh" { + Properties70: { + P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 + P: "BBoxMin", "Vector3D", "Vector", "",0,0,0 + P: "BBoxMax", "Vector3D", "Vector", "",0,0,0 + P: "Primary Visibility", "bool", "", "",1 + P: "Casts Shadows", "bool", "", "",1 + P: "Receive Shadows", "bool", "", "",1 + } + } + } + ObjectType: "Material" { + Count: 2 + PropertyTemplate: "FbxSurfaceLambert" { + Properties70: { + P: "ShadingModel", "KString", "", "", "Phong" + } + } + } + ObjectType: "Model" { + Count: 4 + PropertyTemplate: "FbxNode" { + Properties70: { + P: "QuaternionInterpolate", "enum", "", "",0 + P: "RotationOffset", "Vector3D", "Vector", "",0,0,0 + P: "RotationPivot", "Vector3D", "Vector", "",0,0,0 + P: "ScalingOffset", "Vector3D", "Vector", "",0,0,0 + P: "ScalingPivot", "Vector3D", "Vector", "",0,0,0 + P: "TranslationActive", "bool", "", "",0 + P: "TranslationMin", "Vector3D", "Vector", "",0,0,0 + P: "TranslationMax", "Vector3D", "Vector", "",0,0,0 + P: "TranslationMinX", "bool", "", "",0 + P: "TranslationMinY", "bool", "", "",0 + P: "TranslationMinZ", "bool", "", "",0 + P: "TranslationMaxX", "bool", "", "",0 + P: "TranslationMaxY", "bool", "", "",0 + P: "TranslationMaxZ", "bool", "", "",0 + P: "RotationOrder", "enum", "", "",0 + P: "RotationSpaceForLimitOnly", "bool", "", "",0 + P: "RotationStiffnessX", "double", "Number", "",0 + P: "RotationStiffnessY", "double", "Number", "",0 + P: "RotationStiffnessZ", "double", "Number", "",0 + P: "AxisLen", "double", "Number", "",10 + P: "PreRotation", "Vector3D", "Vector", "",0,0,0 + P: "PostRotation", "Vector3D", "Vector", "",0,0,0 + P: "RotationActive", "bool", "", "",0 + P: "RotationMin", "Vector3D", "Vector", "",0,0,0 + P: "RotationMax", "Vector3D", "Vector", "",0,0,0 + P: "RotationMinX", "bool", "", "",0 + P: "RotationMinY", "bool", "", "",0 + P: "RotationMinZ", "bool", "", "",0 + P: "RotationMaxX", "bool", "", "",0 + P: "RotationMaxY", "bool", "", "",0 + P: "RotationMaxZ", "bool", "", "",0 + P: "InheritType", "enum", "", "",0 + P: "ScalingActive", "bool", "", "",0 + P: "ScalingMin", "Vector3D", "Vector", "",0,0,0 + P: "ScalingMax", "Vector3D", "Vector", "",1,1,1 + P: "ScalingMinX", "bool", "", "",0 + P: "ScalingMinY", "bool", "", "",0 + P: "ScalingMinZ", "bool", "", "",0 + P: "ScalingMaxX", "bool", "", "",0 + P: "ScalingMaxY", "bool", "", "",0 + P: "ScalingMaxZ", "bool", "", "",0 + P: "GeometricTranslation", "Vector3D", "Vector", "",0,0,0 + P: "GeometricRotation", "Vector3D", "Vector", "",0,0,0 + P: "GeometricScaling", "Vector3D", "Vector", "",1,1,1 + P: "MinDampRangeX", "double", "Number", "",0 + P: "MinDampRangeY", "double", "Number", "",0 + P: "MinDampRangeZ", "double", "Number", "",0 + P: "MaxDampRangeX", "double", "Number", "",0 + P: "MaxDampRangeY", "double", "Number", "",0 + P: "MaxDampRangeZ", "double", "Number", "",0 + P: "MinDampStrengthX", "double", "Number", "",0 + P: "MinDampStrengthY", "double", "Number", "",0 + P: "MinDampStrengthZ", "double", "Number", "",0 + P: "MaxDampStrengthX", "double", "Number", "",0 + P: "MaxDampStrengthY", "double", "Number", "",0 + P: "MaxDampStrengthZ", "double", "Number", "",0 + P: "PreferedAngleX", "double", "Number", "",0 + P: "PreferedAngleY", "double", "Number", "",0 + P: "PreferedAngleZ", "double", "Number", "",0 + P: "LookAtProperty", "object", "", "" + P: "UpVectorProperty", "object", "", "" + P: "Show", "bool", "", "",1 + P: "NegativePercentShapeSupport", "bool", "", "",1 + P: "DefaultAttributeIndex", "int", "Integer", "",-1 + P: "Freeze", "bool", "", "",0 + P: "LODBox", "bool", "", "",0 + P: "Lcl Translation", "Lcl Translation", "", "A",0,0,0 + P: "Lcl Rotation", "Lcl Rotation", "", "A",0,0,0 + P: "Lcl Scaling", "Lcl Scaling", "", "A",1,1,1 + P: "Visibility", "Visibility", "", "A",1 + P: "Visibility Inheritance", "Visibility Inheritance", "", "",1 + } + } + } +} + +; Object properties +;------------------------------------------------------------------ + +Objects: { + Geometry: 2358377979296, "Geometry::", "Mesh" { + Vertices: *24 { + a: -0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5 + } + PolygonVertexIndex: *24 { + a: 0,1,3,-3,2,3,5,-5,4,5,7,-7,6,7,1,-1,1,7,5,-4,6,0,2,-5 + } + Edges: *12 { + a: 0,1,2,3,5,6,7,9,10,11,13,15 + } + GeometryVersion: 124 + LayerElementNormal: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Normals: *72 { + a: 0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0 + } + NormalsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementBinormal: 0 { + Version: 102 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Binormals: *72 { + a: 0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,-0,1,0,-0,1,0,0,1,-0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0 + } + BinormalsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + + } + LayerElementTangent: 0 { + Version: 102 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Tangents: *72 { + a: 1,-0,-0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0,-0,1,0,-0,1,0,-0,1,0,-0,1 + } + TangentsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementUV: 0 { + Version: 101 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "IndexToDirect" + UV: *28 { + a: 0.375,0,0.625,0,0.375,0.25,0.625,0.25,0.375,0.5,0.625,0.5,0.375,0.75,0.625,0.75,0.375,1,0.625,1,0.875,0,0.875,0.25,0.125,0,0.125,0.25 + } + UVIndex: *24 { + a: 0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,1,10,11,3,12,0,2,13 + } + } + LayerElementSmoothing: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByEdge" + ReferenceInformationType: "Direct" + Smoothing: *12 { + a: 0,0,0,0,0,0,0,0,0,0,0,0 + } + } + LayerElementMaterial: 0 { + Version: 101 + Name: "" + MappingInformationType: "AllSame" + ReferenceInformationType: "IndexToDirect" + Materials: *1 { + a: 0 + } + } + Layer: 0 { + Version: 100 + LayerElement: { + Type: "LayerElementNormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementBinormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementTangent" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementMaterial" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementSmoothing" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementUV" + TypedIndex: 0 + } + } + } + Geometry: 2358377961872, "Geometry::", "Mesh" { + Vertices: *24 { + a: -0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5 + } + PolygonVertexIndex: *24 { + a: 0,1,3,-3,2,3,5,-5,4,5,7,-7,6,7,1,-1,1,7,5,-4,6,0,2,-5 + } + Edges: *12 { + a: 0,1,2,3,5,6,7,9,10,11,13,15 + } + GeometryVersion: 124 + LayerElementNormal: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Normals: *72 { + a: 0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0 + } + NormalsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementBinormal: 0 { + Version: 102 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Binormals: *72 { + a: 0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,-0,1,0,-0,1,0,0,1,-0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0 + } + BinormalsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + + } + LayerElementTangent: 0 { + Version: 102 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Tangents: *72 { + a: 1,-0,-0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0,-0,1,0,-0,1,0,-0,1,0,-0,1 + } + TangentsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementUV: 0 { + Version: 101 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "IndexToDirect" + UV: *28 { + a: 0.375,0,0.625,0,0.375,0.25,0.625,0.25,0.375,0.5,0.625,0.5,0.375,0.75,0.625,0.75,0.375,1,0.625,1,0.875,0,0.875,0.25,0.125,0,0.125,0.25 + } + UVIndex: *24 { + a: 0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,1,10,11,3,12,0,2,13 + } + } + LayerElementSmoothing: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByEdge" + ReferenceInformationType: "Direct" + Smoothing: *12 { + a: 0,0,0,0,0,0,0,0,0,0,0,0 + } + } + LayerElementMaterial: 0 { + Version: 101 + Name: "" + MappingInformationType: "AllSame" + ReferenceInformationType: "IndexToDirect" + Materials: *1 { + a: 0 + } + } + Layer: 0 { + Version: 100 + LayerElement: { + Type: "LayerElementNormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementBinormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementTangent" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementMaterial" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementSmoothing" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementUV" + TypedIndex: 0 + } + } + } + Geometry: 2358377982464, "Geometry::", "Mesh" { + Vertices: *24 { + a: -0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5 + } + PolygonVertexIndex: *24 { + a: 0,1,3,-3,2,3,5,-5,4,5,7,-7,6,7,1,-1,1,7,5,-4,6,0,2,-5 + } + Edges: *12 { + a: 0,1,2,3,5,6,7,9,10,11,13,15 + } + GeometryVersion: 124 + LayerElementNormal: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Normals: *72 { + a: 0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0 + } + NormalsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementBinormal: 0 { + Version: 102 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Binormals: *72 { + a: 0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,-0,1,0,-0,1,0,0,1,-0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0 + } + BinormalsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + + } + LayerElementTangent: 0 { + Version: 102 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Tangents: *72 { + a: 1,-0,-0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0,-0,1,0,-0,1,0,-0,1,0,-0,1 + } + TangentsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementUV: 0 { + Version: 101 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "IndexToDirect" + UV: *28 { + a: 0.375,0,0.625,0,0.375,0.25,0.625,0.25,0.375,0.5,0.625,0.5,0.375,0.75,0.625,0.75,0.375,1,0.625,1,0.875,0,0.875,0.25,0.125,0,0.125,0.25 + } + UVIndex: *24 { + a: 0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,1,10,11,3,12,0,2,13 + } + } + LayerElementSmoothing: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByEdge" + ReferenceInformationType: "Direct" + Smoothing: *12 { + a: 0,0,0,0,0,0,0,0,0,0,0,0 + } + } + LayerElementMaterial: 0 { + Version: 101 + Name: "" + MappingInformationType: "AllSame" + ReferenceInformationType: "IndexToDirect" + Materials: *1 { + a: 0 + } + } + Layer: 0 { + Version: 100 + LayerElement: { + Type: "LayerElementNormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementBinormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementTangent" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementMaterial" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementSmoothing" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementUV" + TypedIndex: 0 + } + } + } + Geometry: 2358377979824, "Geometry::", "Mesh" { + Vertices: *588 { + a: -0.499999970197678,-0.5,0.5,0.500000059604645,-0.5,0.5,-0.499999970197678,0.5,0.5,0.500000059604645,0.5,0.5,-0.499999970197678,0.5,-0.49999988079071,0.500000059604645,0.5,-0.49999988079071,-0.499999970197678,-0.5,-0.49999988079071,0.500000059604645,-0.5,-0.49999988079071,0,0,0.5,0,-0.5,0.5,0.500000059604645,0,0.5,0,0.5,0.5,-0.499999970197678,0,0.5,0,0.5,1.19209289550781e-07,0.500000059604645,0.5,1.19209289550781e-07,0,0.5,-0.49999988079071,-0.499999970197678,0.5,1.19209289550781e-07,0,0,-0.49999988079071,0.500000059604645,0,-0.49999988079071,0,-0.5,-0.49999988079071,-0.499999970197678,0,-0.49999988079071,0,-0.5,1.19209289550781e-07,0.500000059604645,-0.5,1.19209289550781e-07,-0.499999970197678,-0.5,1.19209289550781e-07,0.500000059604645,0,1.19209289550781e-07,-0.499999970197678,0,1.19209289550781e-07,-0.25,-0.25,0.5,-0.499999970197678,-0.25,0.5,-0.25,-0.5,0.5,0,-0.25,0.5,-0.25,0,0.5,-0.25,0.5,0.25,-0.499999970197678,0.5,0.25,-0.25,0.5,0.5,0,0.5,0.25,-0.25,0.5,1.19209289550781e-07,-0.25,0.25,-0.49999988079071,-0.499999970197678,0.25,-0.49999988079071,-0.25,0.5,-0.49999988079071,0,0.25,-0.49999988079071,-0.25,0,-0.49999988079071,-0.25,-0.5,-0.24999988079071,-0.499999970197678,-0.5,-0.24999988079071,-0.25,-0.5,-0.49999988079071,0,-0.5,-0.24999988079071,-0.25,-0.5,1.19209289550781e-07,0.500000059604645,-0.25,0.25,0.500000059604645,-0.25,0.5,0.500000059604645,-0.5,0.25,0.500000059604645,-0.25,1.19209289550781e-07,0.500000059604645,0,0.25,-0.499999970197678,-0.25,-0.24999988079071,-0.499999970197678,-0.25,-0.49999988079071,-0.499999970197678,-0.25,1.19209289550781e-07,-0.499999970197678,0,-0.24999988079071,0.250000059604645,-0.25,0.5,0.250000059604645,-0.5,0.5,0.250000059604645,0,0.5,0.250000059604645,0.25,0.5,0.500000059604645,0.25,0.5,0.250000059604645,0.5,0.5,0,0.25,0.5,-0.25,0.25,0.5,-0.499999970197678,0.25,0.5,0.250000059604645,0.5,0.25,0.500000059604645,0.5,0.25,0.250000059604645,0.5,1.19209289550781e-07,0.250000059604645,0.5,-0.24999988079071,0.500000059604645,0.5,-0.24999988079071,0.250000059604645,0.5,-0.49999988079071, +0,0.5,-0.24999988079071,-0.25,0.5,-0.24999988079071,-0.499999970197678,0.5,-0.24999988079071,0.250000059604645,0.25,-0.49999988079071,0.500000059604645,0.25,-0.49999988079071,0.250000059604645,0,-0.49999988079071,0.250000059604645,-0.25,-0.49999988079071,0.500000059604645,-0.25,-0.49999988079071,0.250000059604645,-0.5,-0.49999988079071,0,-0.25,-0.49999988079071,-0.25,-0.25,-0.49999988079071,0.250000059604645,-0.5,-0.24999988079071,0.500000059604645,-0.5,-0.24999988079071,0.250000059604645,-0.5,1.19209289550781e-07,0.250000059604645,-0.5,0.25,0,-0.5,0.25,-0.25,-0.5,0.25,-0.499999970197678,-0.5,0.25,0.500000059604645,-0.25,-0.24999988079071,0.500000059604645,0,-0.24999988079071,0.500000059604645,0.25,-0.24999988079071,0.500000059604645,0.25,1.19209289550781e-07,0.500000059604645,0.25,0.25,-0.499999970197678,-0.25,0.25,-0.499999970197678,0,0.25,-0.499999970197678,0.25,0.25,-0.499999970197678,0.25,1.19209289550781e-07,-0.499999970197678,0.25,-0.24999988079071,-0.594913899898529,0,0.594913899898529,-0.152911216020584,0,0.714658200740814,-0.594913899898529,-0.152911216020584,0.594913899898529,-0.152911216020584,-0.152911216020584,0.714658200740814,-0.594913899898529,0.594913899898529,7.29137497046395e-08,-0.152911216020584,0.714658200740814,7.29137497046395e-08,-0.594913899898529,0.594913899898529,0.152911216020584,-0.152911216020584,0.714658200740814,0.152911216020584,-0.594913899898529,0,-0.594913899898529,-0.152911216020584,0,-0.714658200740814,-0.594913899898529,0.152911216020584,-0.594913899898529,-0.152911216020584,0.152911216020584,-0.714658200740814,-0.594913899898529,-0.594913899898529,7.29137497046395e-08,-0.152911216020584,-0.714658200740814,7.29137497046395e-08,-0.594913899898529,-0.594913899898529,-0.152911216020584,-0.152911216020584,-0.714658200740814,-0.152911216020584,0.594913899898529,0,0.594913899898529,0.714658200740814,0,0.152911216020584,0.594913899898529,-0.152911216020584,0.594913899898529,0.714658200740814,-0.152911216020584,0.152911216020584,-0.714658200740814,0,-0.152911216020584,-0.594913899898529,-0.152911216020584,-0.594913899898529, +-0.714658200740814,-0.152911216020584,-0.152911216020584,8.62321627254444e-17,-0.594913899898529,0.594913899898529,8.62321627254444e-17,-0.152911216020584,0.714658200740814,0.152911230921745,-0.594913899898529,0.594913899898529,0.152911230921745,-0.152911216020584,0.714658200740814,0.152911230921745,0,0.714658200740814,0.594913899898529,0.152911216020584,0.594913899898529,0.152911230921745,0.152911216020584,0.714658200740814,8.62321627254444e-17,0.594913899898529,0.594913899898529,8.62321627254444e-17,0.152911216020584,0.714658200740814,-0.152911216020584,0.594913899898529,0.594913899898529,-0.152911216020584,0.152911216020584,0.714658200740814,8.62321627254444e-17,0.714658200740814,0.152911216020584,0.152911230921745,0.594913899898529,0.594913899898529,0.152911230921745,0.714658200740814,0.152911216020584,0.594913899898529,0.594913899898529,7.29137497046395e-08,0.152911230921745,0.714658200740814,7.29137497046395e-08,0.594913899898529,0.594913899898529,-0.152911216020584,0.152911230921745,0.714658200740814,-0.152911216020584,8.62321627254444e-17,0.594913899898529,-0.594913899898529,8.62321627254444e-17,0.714658200740814,-0.152911216020584,-0.152911216020584,0.594913899898529,-0.594913899898529,-0.152911216020584,0.714658200740814,-0.152911216020584,8.62321627254444e-17,0.152911216020584,-0.714658200740814,0.152911230921745,0.594913899898529,-0.594913899898529,0.152911230921745,0.152911216020584,-0.714658200740814,0.594913899898529,0,-0.594913899898529,0.152911230921745,0,-0.714658200740814,0.594913899898529,-0.152911216020584,-0.594913899898529,0.152911230921745,-0.152911216020584,-0.714658200740814,8.62321627254444e-17,-0.594913899898529,-0.594913899898529,8.62321627254444e-17,-0.152911216020584,-0.714658200740814,-0.152911216020584,-0.594913899898529,-0.594913899898529,-0.152911216020584,-0.152911216020584,-0.714658200740814,8.62321627254444e-17,-0.714658200740814,-0.152911216020584,0.152911230921745,-0.594913899898529,-0.594913899898529,0.152911230921745,-0.714658200740814,-0.152911216020584,0.594913899898529,-0.594913899898529,7.29137497046395e-08, +0.152911230921745,-0.714658200740814,7.29137497046395e-08,0.594913899898529,-0.594913899898529,0.152911216020584,0.152911230921745,-0.714658200740814,0.152911216020584,8.62321627254444e-17,-0.714658200740814,0.152911216020584,-0.152911216020584,-0.594913899898529,0.594913899898529,-0.152911216020584,-0.714658200740814,0.152911216020584,0.714658200740814,-0.152911216020584,7.29137497046395e-08,0.594913899898529,-0.594913899898529,-0.152911216020584,0.714658200740814,-0.152911216020584,-0.152911216020584,0.714658200740814,0,-0.152911216020584,0.594913899898529,0.152911216020584,-0.594913899898529,0.714658200740814,0.152911216020584,-0.152911216020584,0.714658200740814,0.152911216020584,7.29137497046395e-08,0.594913899898529,0.594913899898529,0.152911216020584,0.714658200740814,0.152911216020584,0.152911216020584,-0.714658200740814,-0.152911216020584,7.29137497046395e-08,-0.594913899898529,-0.594913899898529,0.152911216020584,-0.714658200740814,-0.152911216020584,0.152911216020584,-0.714658200740814,0,0.152911216020584,-0.594913899898529,0.152911216020584,0.594913899898529,-0.714658200740814,0.152911216020584,0.152911216020584,-0.714658200740814,0.152911216020584,7.29137497046395e-08,-0.594913899898529,0.594913899898529,-0.152911216020584,-0.714658200740814,0.152911216020584,-0.152911216020584,-0.541863918304443,-0.541864037513733,0.541863918304443,8.62321627254444e-17,0,0.714658200740814,-0.541863918304443,0.541863918304443,0.541863918304443,8.62321627254444e-17,0.714658200740814,7.29137497046395e-08,-0.541863918304443,0.541863918304443,-0.541863799095154,8.62321627254444e-17,0,-0.714658200740814,-0.541863918304443,-0.541864037513733,-0.541863799095154,8.62321627254444e-17,-0.714658200740814,7.29137497046395e-08,0.541863977909088,-0.541864037513733,0.541863918304443,0.714658200740814,0,7.29137497046395e-08,-0.714658200740814,0,7.29137497046395e-08,0.541863977909088,0.541863918304443,0.541863918304443,0.541863977909088,0.541863918304443,-0.541863799095154,0.541863977909088,-0.541864037513733,-0.541863799095154 + } + PolygonVertexIndex: *768 { + a: 99,98,100,-102,103,102,104,-106,107,106,108,-110,111,110,112,-114,115,114,116,-118,118,106,119,-121,122,121,123,-125,125,114,126,-128,129,128,130,-132,132,128,133,-135,136,135,137,-139,140,139,141,-143,143,139,144,-146,147,146,148,-150,151,150,152,-154,154,150,155,-157,158,157,159,-161,161,121,162,-164,164,157,165,-167,167,146,168,-170,170,135,171,-173,173,110,174,-176,176,98,177,-179,179,102,180,-182,100,182,162,-102,162,121,122,-102,122,183,99,-102,104,184,130,-106,130,128,132,-106,132,185,103,-106,108,186,141,-110,141,139,143,-110,143,187,107,-110,112,188,152,-114,152,150,154,-114,154,189,111,-114,116,190,159,-118,159,157,164,-118,164,191,115,-118,119,188,112,-121,112,110,173,-121,173,192,118,-121,123,190,116,-125,116,114,125,-125,125,183,122,-125,126,193,133,-128,133,128,129,-128,129,183,125,-128,130,184,177,-132,177,98,99,-132,99,183,129,-132,133,193,171,-135,171,135,136,-135,136,185,132,-135,137,194,144,-139,144,139,140,-139,140,185,136,-139,141,186,180,-143,180,102,103,-143,103,185,140,-143,144,194,168,-146,168,146,147,-146,147,187,143,-146,148,195,155,-150,155,150,151,-150,151,187,147,-150,152,188,119,-154,119,106,107,-154,107,187,151,-154,155,195,165,-157,165,157,158,-157,158,189,154,-157,159,190,123,-161,123,121,161,-161,161,189,158,-161,162,182,174,-164,174,110,111,-164,111,189,161,-164,165,195,148,-167,148,146,167,-167,167,191,164,-167,168,194,137,-170,137,135,170,-170,170,191,167,-170,171,193,126,-173,126,114,115,-173,115,191,170,-173,174,182,100,-176,100,98,176,-176,176,192,173,-176,177,184,104,-179,104,102,179,-179,179,192,176,-179,180,186,108,-182,108,106,118,-182,118,192,179,-182,30,26,27,-13,35,31,32,-17,40,36,37,-21,45,41,42,-24,50,46,47,-11,54,51,52,-21,29,55,56,-10,57,58,59,-11,61,62,33,-12,34,64,60,-12,66,67,68,-15,70,71,38,-16,39,73,69,-16,75,76,77,-19,79,80,43,-20,44,81,78,-20,83,84,48,-23,85,86,28,-10,49,88,82,-23,89,90,74,-19,91,92,65,-15,53,93,87,-24,94,95,63,-13,96,97,72,-17,27,26,28,-1,28,26,29,-10,29,26,30,-9,32,31,33,-3,33,31,34,-12,34,31,35,-14,37,36,38,-5,38,36,39, +-16,39,36,40,-18,42,41,43,-7,43,41,44,-20,44,41,45,-22,47,46,48,-2,48,46,49,-23,49,46,50,-25,52,51,42,-7,42,51,53,-24,53,51,54,-26,56,55,47,-2,47,55,57,-11,57,55,29,-9,59,58,60,-4,60,58,61,-12,61,58,57,-9,33,62,63,-3,63,62,30,-13,30,62,61,-9,60,64,65,-4,65,64,66,-15,66,64,34,-14,68,67,69,-6,69,67,70,-16,70,67,66,-14,38,71,72,-5,72,71,35,-17,35,71,70,-14,69,73,74,-6,74,73,75,-19,75,73,39,-18,77,76,78,-8,78,76,79,-20,79,76,75,-18,43,80,52,-7,52,80,40,-21,40,80,79,-18,78,81,82,-8,82,81,83,-23,83,81,44,-22,48,84,56,-2,56,84,85,-10,85,84,83,-22,28,86,87,-1,87,86,45,-24,45,86,85,-22,82,88,77,-8,77,88,89,-19,89,88,49,-25,74,90,68,-6,68,90,91,-15,91,90,89,-25,65,92,59,-4,59,92,50,-11,50,92,91,-25,87,93,27,-1,27,93,94,-13,94,93,53,-26,63,95,32,-3,32,95,96,-17,96,95,94,-26,72,97,37,-5,37,97,54,-21,54,97,96,-26 + } + Edges: *384 { + a: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,102,104,105,108,109,110,114,116,117,120,121,122,126,128,129,132,133,134,138,140,141,144,145,146,150,152,153,156,158,162,164,165,168,170,174,176,180,181,182,186,188,193,194,198,205,206,210,212,216,217,218,222,224,229,230,234,241,242,246,248,252,253,254,258,260,266,270,277,278,282,284,290,294,296,301,302,306,314,318,320,326,330,332,338,342,350,354,356,362,366,368,374,378,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,481,482,483,485,490,491,493,494,495,497,502,503,505,506,507,509,514,515,517,518,519,521,526,527,529,530,531,533,538,539,541,543,545,550,551,553,555,557,563,565,566,567,569,575,577,578,581,589,590,593,599,601,602,603,605,611,613,614,617,625,626,629,635,637,638,639,641,647,649,653,661,662,665,671,673,677,683,685,686,689,697,701,707,709,713,719,721,725,733,737,743,745,749,755,757,761 + } + GeometryVersion: 124 + LayerElementNormal: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Normals: *2304 { + a: -0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.26148721575737,0.965207040309906,0,-0.26148721575737,0.965207040309906,0,-0.26148721575737,0.965207040309906,0,-0.26148721575737,0.965207040309906,0,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.965207040309906,0.261487185955048,0,0.965207040309906,0.261487185955048,0,0.965207040309906,0.261487185955048,0,0.965207040309906,0.261487185955048,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0.261487126350403,0,-0.965206980705261, +0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.965207040309906,-0.261487185955048,0,-0.965207040309906,-0.261487185955048,0,-0.965207040309906,-0.261487185955048,0,-0.965207040309906,-0.261487185955048,0.26148721575737,-0.965207040309906,0,0.26148721575737,-0.965207040309906,0,0.26148721575737,-0.965207040309906,0,0.26148721575737,-0.965207040309906,0,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0.965206980705261,-0.261487066745758,0,0.965206980705261,-0.261487066745758,0,0.965206980705261,-0.261487066745758,0,0.965206980705261,-0.261487066745758,0,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0.261487066745758,0,-0.965206980705261,0.261487066745758,0,-0.965206980705261,0.261487066745758,0,-0.965206980705261,0.261487066745758,0,-0.211917281150818,-0.211917445063591,0.954034626483917,0,0,1,-0.211917281150818,-0.21191743016243,0.954034626483917,-0.211917266249657,-0.211917445063591,0.954034626483917,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,-0.211917445063591,0.954034626483917,0.211917281150818, +0,1,0,-0.211917445063591,0.954034626483917,0.211917281150818,-0.211917445063591,0.954034626483917,0.211917266249657,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,1,0,0,1,0,0,1,0,0,1,0,-0.211917623877525,0.211917608976364,-0.954034626483917,0,0,-1,-0.211917623877525,0.211917608976364,-0.954034626483917,-0.211917623877525,0.211917594075203,-0.954034626483917,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.211917355656624,-0.954034745693207,-0.211917355656624,0,-1,0,-0.211917325854301,-0.954034686088562,-0.211917325854301,-0.211917355656624,-0.954034686088562,-0.211917355656624,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0.954034745693207,-0.211917281150818,0.211917340755463,1,0,0,0.954034745693207,-0.211917281150818,0.211917370557785,0.954034626483917,-0.211917236447334,0.211917296051979,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,1,0,0,1,0,0,1,0,0,1,0,0,-0.954034686088562,-0.211917355656624,-0.211917459964752,-1,0,0,-0.954034626483917,-0.211917325854301,-0.211917445063591,-0.954034686088562,-0.211917355656624,-0.211917474865913,-0.965206980705261,-0.261487066745758,0,-0.965206980705261,-0.261487066745758,0,-0.965206980705261,-0.261487066745758,0,-0.965206980705261,-0.261487066745758,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0.211917281150818,-0.211917400360107,0.954034626483917,0,0,1,0.211917266249657,-0.211917415261269,0.954034626483917,0.211917266249657,-0.211917415261269,0.954034626483917,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261, +0,0,1,0,0,1,0,0,1,0,0,1,0.211917296051979,0.211917415261269,0.954034626483917,0,0,1,0.211917296051979,0.211917415261269,0.954034626483917,0.211917281150818,0.211917415261269,0.954034626483917,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0,1,0,0,1,0,0,1,0,0,1,-0.211917281150818,0.211917445063591,0.954034626483917,0,0,1,-0.211917281150818,0.211917445063591,0.954034626483917,-0.211917266249657,0.211917445063591,0.954034626483917,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,0.211917445063591,0.954034626483917,0.211917445063591,0,1,0,0.211917445063591,0.954034686088562,0.211917445063591,0.211917445063591,0.954034626483917,0.211917445063591,0.26148721575737,0.965207040309906,0,0.26148721575737,0.965207040309906,0,0.26148721575737,0.965207040309906,0,0.26148721575737,0.965207040309906,0,0,1,0,0,1,0,0,1,0,0,1,0,0.211917445063591,0.954034626483917,-0.211917489767075,0,1,0,0.211917459964752,0.954034686088562,-0.211917519569397,0.211917474865913,0.954034686088562,-0.211917504668236,0,0.965207040309906,-0.261487185955048,0,0.965207040309906,-0.261487185955048,0,0.965207040309906,-0.261487185955048,0,0.965207040309906,-0.261487185955048,0,1,0,0,1,0,0,1,0,0,1,0,-0.211917459964752,0.954034686088562,-0.211917340755463,0,1,0,-0.211917445063591,0.954034626483917,-0.21191731095314,-0.211917489767075,0.954034686088562,-0.211917355656624,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,0,1,0,0,1,0,0,1,0,0,1,0,0.211917638778687,0.211917608976364,-0.954034626483917,0,0,-1,0.211917608976364,0.211917564272881,-0.954034566879272,0.211917623877525,0.211917608976364,-0.954034626483917,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261, +0.261487126350403,0,-0.965206980705261,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0.211917608976364,-0.211917564272881,-0.954034626483917,0,0,-1,0.211917623877525,-0.211917579174042,-0.954034626483917,0.211917623877525,-0.211917549371719,-0.954034626483917,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.211917623877525,-0.211917579174042,-0.954034626483917,0,0,-1,-0.211917579174042,-0.211917534470558,-0.954034566879272,-0.211917623877525,-0.211917549371719,-0.954034626483917,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0.211917340755463,-0.954034686088562,-0.211917519569397,0,-1,0,0.211917325854301,-0.954034626483917,-0.211917489767075,0.211917325854301,-0.954034686088562,-0.211917489767075,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0.211917281150818,-0.954034626483917,0.211917445063591,0,-1,0,0.211917296051979,-0.954034626483917,0.211917445063591,0.211917266249657,-0.954034626483917,0.211917445063591,0,-0.965207040309906,0.261487185955048,0,-0.965207040309906,0.261487185955048,0,-0.965207040309906,0.261487185955048,0,-0.965207040309906,0.261487185955048,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-0.211917325854301,-0.954034745693207,0.211917325854301,0,-1,0,-0.211917325854301,-0.954034745693207,0.211917325854301,-0.211917281150818,-0.954034686088562,0.211917281150818,-0.26148721575737,-0.965207040309906,0,-0.26148721575737,-0.965207040309906,0,-0.26148721575737,-0.965207040309906,0,-0.26148721575737,-0.965207040309906,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0.954034626483917,-0.211917325854301,-0.211917400360107,1,0,0,0.954034686088562,-0.211917340755463,-0.211917400360107,0.954034686088562,-0.211917355656624,-0.21191743016243,0.965206980705261,0,-0.261487185955048, +0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,1,0,0,1,0,0,1,0,0,1,0,0,0.954034686088562,0.211917370557785,-0.211917489767075,1,0,0,0.954034686088562,0.211917355656624,-0.211917445063591,0.954034626483917,0.211917355656624,-0.211917445063591,0.965206980705261,0.261487066745758,0,0.965206980705261,0.261487066745758,0,0.965206980705261,0.261487066745758,0,0.965206980705261,0.261487066745758,0,1,0,0,1,0,0,1,0,0,1,0,0,0.954034626483917,0.211917296051979,0.211917385458946,1,0,0,0.954034626483917,0.211917296051979,0.211917385458946,0.954034745693207,0.211917296051979,0.211917385458946,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,1,0,0,1,0,0,1,0,0,1,0,0,-0.954034626483917,-0.211917251348495,0.211917400360107,-1,0,0,-0.954034626483917,-0.211917266249657,0.211917400360107,-0.954034626483917,-0.211917251348495,0.211917400360107,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-0.954034626483917,0.211917281150818,0.211917445063591,-1,0,0,-0.954034626483917,0.211917281150818,0.211917445063591,-0.954034626483917,0.211917266249657,0.211917445063591,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-0.954034686088562,0.211917385458946,-0.211917549371719,-1,0,0,-0.954034686088562,0.211917370557785,-0.211917534470558,-0.954034626483917,0.211917355656624,-0.211917504668236,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0, +1,0,0,1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementBinormal: 0 { + Version: 102 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Binormals: *2304 { + a: 0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0,-1,0,-0,-1,0,-0,-1,0,-0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0.965206921100616,0.261487156152725,0,0.965206921100616,0.261487156152725,0,0.965206921100616,0.261487156152725,0,0.965206921100616,0.261487156152725,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,0.965206980705261,-0.261487185955048,0,0.965206980705261,-0.261487185955048,0,0.965206980705261,-0.261487185955048,0,0.965206980705261,-0.261487185955048,0,0.261487156152725,-0.965206921100616,0,0.261487156152725,-0.965206921100616,0,0.261487156152725,-0.965206921100616,0,0.261487156152725,-0.965206921100616,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-0.261487126350403,-0.965206980705261,0,-0.261487126350403,-0.965206980705261,0,-0.261487126350403,-0.965206980705261,0,-0.261487126350403,-0.965206980705261,0,-0.965206921100616,-0.261487156152725,0,-0.965206921100616,-0.261487156152725,0,-0.965206921100616,-0.261487156152725,0,-0.965206921100616,-0.261487156152725,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-0.965206980705261,0.261487185955048,0,-0.965206980705261,0.261487185955048,0,-0.965206980705261,0.261487185955048,0,-0.965206980705261,0.261487185955048,0,-0.261487156152725,0.965206921100616,0,-0.261487156152725,0.965206921100616,0,-0.261487156152725,0.965206921100616,0,-0.261487156152725,0.965206921100616,0,0,1,0,0,1,0,0,1,0,0,1,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,0,1,0,0,1,0,0,1,0, +0,1,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,-0.0554696954786777,0.977241098880768,0.204750895500183,0.0677256807684898,0.997704029083252,-0,0.0995207726955414,0.966452240943909,0.236782029271126,0.022095151245594,0.974918127059937,0.221464186906815,0,0.965206980705261,0.261487185955048,0,0.965206980705261,0.261487185955048,0,0.965206980705261,0.261487185955048,0,0.965206980705261,0.261487185955048,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0.0554696545004845,0.204750746488571,-0.977241158485413,0.0677258297801018,0,-0.997703969478607,0.0995210781693459,0.23678195476532,-0.966452240943909,0.0220953319221735,0.221464082598686,-0.974918246269226,0,0.261487126350403,-0.965206980705261,0,0.261487126350403,-0.965206980705261,0,0.261487126350403,-0.965206980705261,0,0.261487126350403,-0.965206980705261,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.0554697290062904,-0.977241039276123,-0.204751029610634,0.0677258297801018,-0.997703969478607,0,0.0995209515094757,-0.966452121734619,-0.236782252788544,0.0220952276140451,-0.974918127059937,-0.221464350819588,0,-0.965206980705261,-0.261487185955048,0,-0.965206980705261,-0.261487185955048,0,-0.965206980705261,-0.261487185955048,0,-0.965206980705261,-0.261487185955048,0,-1,-0,0,-1,-0,0,-1,-0,0,-1,-0,-0.0554696619510651,-0.204750776290894,0.977241098880768,0.0677259787917137,0,0.997703969478607,0.0995214134454727,-0.236782014369965,0.966452121734619,0.0220954976975918,-0.221464157104492,0.974918186664581,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,0.20475073158741,0.977241218090057,0.0554696507751942,0,0.997704029083252,-0.0677256807684898,0.236781880259514,0.966452300548553,-0.0995208472013474,0.221463993191719,0.974918186664581,-0.0220952145755291,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0, +-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0.204750791192055,0.977241098880768,-0.0554696619510651,0,0.997704029083252,0.0677257031202316,-0.236781939864159,0.966452240943909,0.099520817399025,-0.221464112401009,0.974918246269226,0.022095188498497,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,0,-0.099520780146122,0.966452240943909,0.236781999468803,-0.0677256733179092,0.997704029083252,0,0.0554696880280972,0.977241098880768,0.204750865697861,-0.022095151245594,0.974918127059937,0.221464157104492,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0.0554696880280972,0.977241098880768,-0.204750865697861,0.0677258223295212,0.997703969478607,-0,0.0995210558176041,0.966452181339264,-0.236782059073448,0.0220952890813351,0.974918246269226,-0.221464201807976,0,0.965206921100616,-0.261487156152725,0,0.965206921100616,-0.261487156152725,0,0.965206921100616,-0.261487156152725,0,0.965206921100616,-0.261487156152725,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0.0995210707187653,0.966452240943909,-0.236782118678093,-0.0677258297801018,0.997703969478607,0,0.0554696954786777,0.977241098880768,-0.204750895500183,-0.0220952928066254,0.974918186664581,-0.221464231610298,0,1,0,0,1,0,0,1,0,0,1,0,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0.0995210558176041,0.236782118678093,-0.966452240943909,-0.0677258223295212,0,-0.997703969478607,0.0554696880280972,0.204750880599022,-0.977241098880768,-0.0220952853560448,0.221464216709137,-0.974918127059937,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.0554697066545486,-0.204750955104828,-0.977241158485413,0.0677259713411331,0,-0.997703969478607,0.0995213389396667,-0.236782237887383,-0.966452181339264,0.0220954176038504,-0.221464291214943,-0.974918127059937,0,-0.261487156152725,-0.965206921100616,0,-0.261487156152725,-0.965206921100616,0,-0.261487156152725,-0.965206921100616,0,-0.261487156152725,-0.965206921100616,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.0995213687419891,-0.236782059073448,-0.966452181339264, +-0.0677259787917137,0,-0.997703969478607,0.0554696545004845,-0.204750776290894,-0.977241158485413,-0.0220954604446888,-0.221464172005653,-0.974918246269226,0,0,-1,0,0,-1,-0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.0995209366083145,-0.966452121734619,-0.236782252788544,-0.0677258223295212,-0.997703969478607,-0,0.0554697290062904,-0.977241098880768,-0.204751014709473,-0.0220952201634645,-0.974918127059937,-0.221464365720749,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0,0,-1,-0,0,-1,-0,0,-1,-0,-0.0554697252810001,-0.977241158485413,0.204751014709473,0.0677256733179092,-0.997704029083252,0,0.099520668387413,-0.966452181339264,0.236782178282738,0.0220950860530138,-0.974918127059937,0.221464276313782,0,-0.965206921100616,0.261487156152725,0,-0.965206921100616,0.261487156152725,0,-0.965206921100616,0.261487156152725,0,-0.965206921100616,0.261487156152725,0,-1,0,0,-1,0,0,-1,-0,0,-1,0,-0.0995206832885742,-0.966452181339264,0.236782178282738,-0.0677256807684898,-0.997704029083252,-0,0.0554697178304195,-0.977241098880768,0.20475098490715,-0.0220950935035944,-0.974918127059937,0.221464276313782,0,-1,-0,0,-1,-0,-0,-1,0,0,-1,-0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-0.0995213836431503,-0.23678220808506,0.966452121734619,-0.0677259713411331,0,0.997703969478607,0.0554697066545486,-0.204750940203667,0.977241098880768,-0.0220954623073339,-0.221464291214943,0.974918186664581,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,-0.0554696954786777,0.204750895500183,0.977241098880768,0.0677258223295212,0,0.997703969478607,0.0995211154222488,0.236782103776932,0.966452181339264,0.0220953226089478,0.221464246511459,0.974918186664581,0,0.261487156152725,0.965206921100616,0,0.261487156152725,0.965206921100616,0,0.261487156152725,0.965206921100616,0,0.261487156152725,0.965206921100616,0,0,1,0,0,1,0,0,1,0,0,1,-0.0995211452245712,0.23678195476532,0.966452181339264,-0.0677258297801018,0,0.997703969478607,0.0554696656763554,0.204750776290894,0.977241218090057,-0.022095363587141,0.221464082598686,0.974918246269226,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0.236781939864159,0.966452240943909,0.0995208621025085, +-0,0.997704029083252,0.0677257031202316,0.204750806093216,0.977241158485413,-0.0554696656763554,0.221464112401009,0.974918186664581,0.0220951996743679,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0.204750806093216,0.977241098880768,0.0554696694016457,0,0.997703969478607,-0.0677258521318436,-0.236782044172287,0.966452240943909,-0.0995211452245712,-0.221464172005653,0.974918246269226,-0.0220953542739153,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,0,1,-0,-0,1,0,-0,1,0,-0,1,0,-0.236781984567642,0.966452300548553,0.09952113032341,-0,0.997703969478607,0.0677258297801018,-0.204750761389732,0.977241158485413,-0.0554696582257748,-0.221464067697525,0.974918246269226,0.0220953486859798,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,1,-0,-0,1,0,-0.236781880259514,0.966452360153198,-0.0995208248496056,0,0.997704029083252,-0.0677256807684898,-0.20475073158741,0.977241158485413,0.0554696470499039,-0.221464022994041,0.974918246269226,-0.0220951903611422,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0.204750746488571,0.977241158485413,-0.0554696545004845,0,0.997703969478607,0.0677258297801018,0.23678195476532,0.966452240943909,0.0995210781693459,0.221464082598686,0.974918246269226,0.0220953319221735,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,0,0.236782073974609,0.966452240943909,-0.0995211005210876,0,0.997703969478607,-0.0677258521318436,0.204750806093216,0.977241098880768,0.0554696656763554,0.221464142203331,0.974918186664581,-0.0220953188836575,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,-0,-1,0,-0,-1,0,-0,-1,0,-0,-1,-0,-1,0,-0,-1,-0,-0,-1,-0,-0,-1,-0,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,0,-0,-1,0,-0,-1, +0,-0,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + + } + LayerElementTangent: 0 { + Version: 102 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "Direct" + Tangents: *2304 { + a: 0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965207040309906,0.26148721575737,0,0.965207040309906,0.26148721575737,0,0.965207040309906,0.26148721575737,0,0.965207040309906,0.26148721575737,0,0.965206980705261,-0,-0.261487126350403,0.965206980705261,-0,-0.261487126350403,0.965206980705261,-0,-0.261487126350403,0.965206980705261,-0,-0.261487126350403,0.965206980705261,-0.261487156152725,-0,0.965206980705261,-0.261487156152725,-0,0.965206980705261,-0.261487156152725,-0,0.965206980705261,-0.261487156152725,-0,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,0,1,-0,0,1,-0,-0,1,-0,0,0.965206980705261,-0.261487156152725,0,0.965206980705261,-0.261487156152725,0,0.965206980705261,-0.261487156152725,0,0.965206980705261,-0.261487156152725,0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,-0,0,1,0,0,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,-0,0,-1,-0,0,-1,-0,0,-1,-0,0,-1,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0.26148721575737,-0,0.965207040309906, +0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0.97571212053299,0.00952975451946259,0.218849271535873,0.997704029083252,-0.0677256807684898,0,0.972207129001617,-0.145124465227127,0.183717742562294,0.977037787437439,-0.0680116266012192,0.201919630169868,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,0.97571212053299,0.218849420547485,-0.0095297135412693,0.997703969478607,0,0.0677258297801018,0.972207069396973,0.183717846870422,0.145124778151512,0.977037727832794,0.20191977918148,0.0680118054151535,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,0.975712060928345,-0.00952969118952751,-0.218849584460258,0.997703969478607,0.0677258297801018,0,0.972207009792328,0.145124763250351,-0.183717995882034,0.977037727832794,0.0680118054151535,-0.201919928193092,1,0,0,1,0,0,1,0,0,1,0,0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,0.97571212053299,-0.218849301338196,0.00952974148094654,0.997703969478607,0,-0.0677259787917137,0.972207069396973,-0.183717638254166,-0.145125105977058,0.977037727832794,-0.201919630169868,-0.068011961877346,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0.218849286437035,0.00952974148094654,-0.97571212053299,0,-0.0677256807684898,-0.997704029083252,0.183717831969261,-0.145124509930611,-0.972207069396973,0.201919674873352,-0.0680116564035416,-0.977037787437439,-0,0,-1,-0,0,-1,-0,0,-1,-0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.218849420547485,0.0095297172665596,0.97571212053299,0,-0.0677257031202316,0.997704029083252,-0.183717906475067,-0.145124524831772,0.972207069396973,-0.201919823884964,-0.068011686205864,0.977037727832794,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0.972207129001617,0.145124465227127,-0.183717742562294,0.997704029083252,0.0677256733179092,0,0.97571212053299,-0.00952975824475288,-0.218849256634712,0.977037787437439,0.0680116191506386,-0.201919630169868,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403, +1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,0.97571212053299,0.00952975172549486,-0.218849286437035,0.997703969478607,-0.0677258223295212,0,0.972207069396973,-0.14512474834919,-0.183717682957649,0.977037847042084,-0.0680117681622505,-0.20191964507103,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,0,1,-0,0,1,-0,-0,1,-0,0,0.972207069396973,0.14512474834919,0.183717668056488,0.997703969478607,0.0677258297801018,0,0.97571212053299,-0.00952975451946259,0.218849271535873,0.977037847042084,0.0680117756128311,0.201919630169868,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,1,-0,-0,1,-0,0,1,-0,0,1,-0,0,0.972207069396973,-0.183717831969261,-0.145124778151512,0.997703969478607,0,-0.0677258223295212,0.97571212053299,-0.218849405646324,0.00952972564846277,0.977037727832794,-0.20191977918148,-0.0680117979645729,0.965207040309906,-0.26148721575737,-0,0.965207040309906,-0.26148721575737,-0,0.965207040309906,-0.26148721575737,-0,0.965207040309906,-0.26148721575737,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,0.97571212053299,-0.218849420547485,-0.0095297247171402,0.997703969478607,0,0.0677259713411331,0.972207009792328,-0.183717757463455,0.145125061273575,0.977037727832794,-0.201919749379158,0.0680119395256042,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,-0,-0,1,0,0,0.972207009792328,0.183717772364616,-0.145125061273575,0.997703969478607,0,-0.0677259787917137,0.97571212053299,0.218849420547485,0.00952971447259188,0.977037727832794,0.20191977918148,-0.0680119544267654,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,-0,0.965206980705261,0.261487156152725,0,1,-0,0,1,0,0,1,0,0,1,0,0,0.972207009792328,-0.14512474834919,0.183718010783195,0.997703969478607,-0.0677258223295212,0,0.975712060928345,0.00952969118952751,0.218849584460258,0.977037727832794,-0.0680117979645729,0.201919928193092,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403, +1,-0,0,1,-0,0,1,-0,0,1,-0,0,0.975712060928345,-0.00952969398349524,0.218849569559097,0.997704029083252,0.0677256733179092,0,0.972207069396973,0.145124465227127,0.18371807038784,0.977037727832794,0.0680116564035416,0.201919972896576,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,-0,0,1,0,0,0.972207069396973,-0.145124480128288,-0.183718055486679,0.997704029083252,-0.0677256807684898,0,0.975712060928345,0.00952969398349524,-0.218849569559097,0.977037727832794,-0.0680116638541222,-0.201919972896576,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,-0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,1,0,0,1,0,0,1,0,0,1,0,0,0.972207069396973,0.183717623353004,0.145125105977058,0.997703969478607,0,0.0677259713411331,0.97571212053299,0.218849316239357,-0.00952974893152714,0.977037847042084,0.201919630169868,0.0680119544267654,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0.97571212053299,0.218849271535873,0.00952975638210773,0.997703969478607,0,-0.0677258223295212,0.972207069396973,0.183717668056488,-0.145124807953835,0.977037847042084,0.201919630169868,-0.0680118054151535,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0.972207069396973,-0.18371769785881,0.145124822854996,0.997703969478607,0,0.0677258297801018,0.97571212053299,-0.218849286437035,-0.00952974613755941,0.977037847042084,-0.201919630169868,0.0680118054151535,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,-0.183717846870422,0.145124554634094,-0.972207069396973,0,0.0677257031202316,-0.997704029083252,-0.218849360942841,-0.0095297284424305,-0.97571212053299,-0.20191977918148,0.068011686205864,-0.977037727832794,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906, +0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.218849450349808,0.00952971167862415,-0.97571212053299,0,-0.0677258521318436,-0.997703969478607,-0.1837178170681,-0.145124852657318,-0.972207069396973,-0.201919764280319,-0.0680118426680565,-0.977037727832794,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0,0,-1,0,0,-1,0.183717772364616,0.145124807953835,-0.972207069396973,0,0.0677258297801018,-0.997703969478607,0.218849375844002,-0.00952972657978535,-0.97571212053299,0.201919689774513,0.0680118054151535,-0.977037727832794,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0.183717876672745,0.145124495029449,0.972207069396973,0,0.0677256807684898,0.997704029083252,0.218849375844002,-0.00952972192317247,0.97571212053299,0.20191977918148,0.0680116564035416,0.977037727832794,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0.218849420547485,0.0095297135412693,0.97571212053299,0,-0.0677258297801018,0.997703969478607,0.183717846870422,-0.145124778151512,0.972207069396973,0.20191977918148,-0.0680118054151535,0.977037727832794,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,-0.183717921376228,0.145124837756157,0.972207009792328,0,0.0677258521318436,0.997703969478607,-0.21884948015213,-0.00952970236539841,0.97571212053299,-0.201919838786125,0.0680118277668953,0.977037727832794,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,0,-0,1,0,-0,1,0,-0,1,0,-0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,0,1,0,0,1,0,0,1,-0,-0,1,0,0,1,0,0,1,0,0,1,-0,0,1,0,0,1,0,0,1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0, +1,0,0,1,0,0,1,-0,0,1,-0,0,1,-0,-0,1,-0,0,1,0,0,1,0,0,1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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementUV: 0 { + Version: 101 + Name: "map1" + MappingInformationType: "ByPolygonVertex" + ReferenceInformationType: "IndexToDirect" + UV: *542 { + a: 0.375,0,0.625,0,0.375,0.25,0.625,0.25,0.375,0.5,0.625,0.5,0.375,0.75,0.625,0.75,0.375,1,0.625,1,0.875,0,0.875,0.25,0.125,0,0.125,0.25,0.5,0.125,0.5,0,0.5,1,0.625,0.125,0.5,0.25,0.375,0.125,0.5,0.375,0.625,0.375,0.75,0.25,0.5,0.5,0.375,0.375,0.25,0.25,0.5,0.625,0.625,0.625,0.875,0.125,0.5,0.75,0.375,0.625,0.125,0.125,0.5,0.875,0.625,0.875,0.75,0,0.5,1,0.375,0.875,0.25,0,0.75,0.125,0.75,0,0.875,0.125,0.75,0.25,0.25,0.125,0.25,0,0.25,0.25,0.125,0.125,0.4375,0.0625,0.375,0.0625,0.4375,0,0.4375,1,0.5,0.0625,0.4375,0.125,0.4375,0.3125,0.375,0.3125,0.3125,0.25,0.4375,0.25,0.5,0.3125,0.4375,0.375,0.4375,0.5625,0.375,0.5625,0.125,0.1875,0.4375,0.5,0.5,0.5625,0.4375,0.625,0.4375,0.8125,0.375,0.8125,0.1875,0,0.4375,0.75,0.5,0.8125,0.4375,0.875,0.6875,0.0625,0.625,0.0625,0.625,0.9375,0.6875,0,0.75,0.0625,0.6875,0.125,0.1875,0.0625,0.375,0.6875,0.125,0.0625,0.1875,0,0.25,0.0625,0.1875,0.125,0.5625,0.0625,0.5625,0,0.5625,1,0.5625,0.125,0.5625,0.1875,0.625,0.1875,0.5625,0.25,0.5,0.1875,0.4375,0.1875,0.375,0.1875,0.5625,0.3125,0.625,0.3125,0.6875,0.25,0.5625,0.375,0.5625,0.4375,0.625,0.4375,0.8125,0.25,0.5625,0.5,0.5,0.4375,0.4375,0.4375,0.375,0.4375,0.1875,0.25,0.5625,0.5625,0.625,0.5625,0.875,0.1875,0.5625,0.625,0.5625,0.6875,0.625,0.6875,0.875,0.0625,0.5625,0.75,0.5,0.6875,0.4375,0.6875,0.375,0.6875,0.5625,0.8125,0.625,0.8125,0.8125,0,0.5625,0.875,0.5625,0.9375,0.625,0.9375,0.5625,1,0.5,0.9375,0.4375,0.9375,0.4375,1,0.375,0.9375,0.3125,0,0.8125,0.0625,0.8125,0,0.875,0.0625,0.8125,0.125,0.8125,0.1875,0.875,0.1875,0.8125,0.25,0.75,0.1875,0.6875,0.1875,0.6875,0.25,0.3125,0.0625,0.3125,0,0.3125,0.125,0.3125,0.1875,0.3125,0.25,0.25,0.1875,0.1875,0.1875,0.1875,0.25,0.125,0.1875,0.4375,0.125,0.375,0.125,0.375,0.0625,0.4375,0.0625,0.4375,0.375,0.375,0.375,0.375,0.3125,0.4375,0.3125,0.4375,0.625,0.375,0.625,0.375,0.5625,0.4375,0.5625,0.4375,0.875,0.375,0.875,0.375,0.8125,0.4375,0.8125,0.6875,0.125,0.625,0.125,0.625,0.0625,0.6875,0.0625,0.1875,0.125,0.125,0.125,0.125,0.0625,0.1875,0.0625,0.5,0.0625,0.5,0,0.5625,0, +0.5625,0.0625,0.5625,0.125,0.625,0.1875,0.5625,0.1875,0.5,0.1875,0.5,0.25,0.4375,0.25,0.4375,0.1875,0.5,0.3125,0.5625,0.25,0.5625,0.3125,0.5625,0.375,0.625,0.375,0.625,0.4375,0.5625,0.4375,0.5,0.4375,0.5,0.5,0.4375,0.5,0.4375,0.4375,0.5,0.5625,0.5625,0.5,0.5625,0.5625,0.5625,0.625,0.625,0.625,0.625,0.6875,0.5625,0.6875,0.5,0.6875,0.5,0.75,0.4375,0.75,0.4375,0.6875,0.5,0.8125,0.5625,0.75,0.5625,0.8125,0.5625,0.875,0.625,0.875,0.625,0.9375,0.5625,0.9375,0.5,0.9375,0.5,1,0.4375,1,0.4375,0.9375,0.75,0.0625,0.75,0,0.8125,0,0.8125,0.0625,0.8125,0.125,0.875,0.125,0.875,0.1875,0.8125,0.1875,0.75,0.1875,0.75,0.25,0.6875,0.25,0.6875,0.1875,0.25,0.0625,0.25,0,0.3125,0,0.3125,0.0625,0.3125,0.125,0.375,0.1875,0.3125,0.1875,0.25,0.1875,0.25,0.25,0.1875,0.25,0.1875,0.1875,0.375,0,0.4375,0,0.5,0.125,0.375,0.25,0.5,0.375,0.375,0.5,0.5,0.625,0.375,0.75,0.5,0.875,0.625,0,0.6875,0,0.75,0.125,0.125,0,0.1875,0,0.25,0.125,0.625,0.25,0.625,0.3125,0.625,0.5,0.375,0.4375,0.625,0.5625,0.625,0.75,0.375,0.6875,0.625,0.8125,0.625,1,0.5625,1,0.375,1,0.375,0.9375,0.875,0,0.875,0.0625,0.875,0.25,0.8125,0.25,0.3125,0.25,0.125,0.25,0.125,0.1875 + } + UVIndex: *768 { + a: 51,19,47,46,57,24,53,52,63,30,59,58,69,36,65,64,75,17,71,70,81,45,78,76,50,15,83,82,85,17,87,86,89,18,55,90,56,18,88,92,95,21,97,96,100,23,61,101,62,23,99,104,107,27,109,108,112,29,67,113,68,29,111,115,118,33,120,119,122,35,124,123,74,39,128,127,130,40,132,131,134,41,136,135,80,43,138,137,139,19,91,140,142,44,144,143,47,0,48,46,48,15,50,46,50,14,51,46,53,2,55,52,55,18,56,52,56,20,57,52,59,4,61,58,61,23,62,58,62,26,63,58,65,6,67,64,67,29,68,64,68,32,69,64,71,1,73,70,73,39,74,70,74,38,75,70,78,12,79,76,79,43,80,76,80,42,81,76,83,1,71,82,71,17,85,82,85,14,50,82,87,3,88,86,88,18,89,86,89,14,85,86,55,2,91,90,91,19,51,90,51,14,89,90,88,3,93,92,93,21,95,92,95,20,56,92,97,5,99,96,99,23,100,96,100,20,95,96,61,4,102,101,102,24,57,101,57,20,100,101,99,5,105,104,105,27,107,104,107,26,62,104,109,7,111,108,111,29,112,108,112,26,107,108,67,6,114,113,114,30,63,113,63,26,112,113,111,7,116,115,116,33,118,115,118,32,68,115,120,9,121,119,121,35,122,119,122,32,118,119,124,8,125,123,125,36,69,123,69,32,122,123,128,10,129,127,129,40,130,127,130,38,74,127,132,11,133,131,133,41,134,131,134,38,130,131,136,3,87,135,87,17,75,135,75,38,134,135,138,0,47,137,47,19,139,137,139,42,80,137,91,2,141,140,141,44,142,140,142,42,139,140,144,13,145,143,145,45,81,143,81,42,142,143,146,149,148,147,150,153,152,151,154,157,156,155,158,161,160,159,162,165,164,163,166,169,168,167,170,173,172,171,174,176,175,163,177,180,179,178,181,183,182,178,184,187,186,185,188,191,190,189,192,194,193,189,195,198,197,196,199,202,201,200,203,205,204,200,206,209,208,207,210,213,212,211,214,217,216,215,218,221,220,219,222,225,224,223,226,229,228,227,230,232,231,147,233,236,235,234,148,149,238,237,238,149,170,171,170,149,146,239,152,153,179,240,179,153,181,178,181,153,150,241,156,157,190,242,190,157,192,189,192,157,154,243,160,161,201,244,201,161,203,200,203,161,158,245,164,165,247,246,247,165,214,215,214,165,162,248,168,169,250,249,250,169,226,227,226,169,166,251,172,173,164,246,164,173,174,163,174,173,170,239,175,176,182,252,182,176,177,178,177,176,174,239, +179,180,231,240,231,180,146,147,146,180,177,239,182,183,253,252,253,183,184,185,184,183,181,241,186,187,193,254,193,187,188,189,188,187,184,241,190,191,255,242,255,191,150,151,150,191,188,241,193,194,256,254,256,194,195,196,195,194,192,243,197,198,204,257,204,198,199,200,199,198,195,243,201,202,258,244,258,202,154,155,154,202,199,243,204,205,259,257,259,205,206,207,206,205,203,245,208,209,261,260,261,209,210,211,210,209,206,245,212,213,263,262,263,213,158,159,158,213,210,245,216,217,265,264,265,217,218,219,218,217,214,248,220,221,267,266,267,221,222,223,222,221,218,248,224,225,175,252,175,225,162,163,162,225,222,248,228,229,148,237,148,229,230,147,230,229,226,251,231,232,268,240,268,232,233,234,233,232,230,251,235,236,270,269,270,236,166,167,166,236,233,251 + } + } + LayerElementSmoothing: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByEdge" + ReferenceInformationType: "Direct" + Smoothing: *384 { + a: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + } + } + LayerElementMaterial: 0 { + Version: 101 + Name: "" + MappingInformationType: "AllSame" + ReferenceInformationType: "IndexToDirect" + Materials: *1 { + a: 0 + } + } + Layer: 0 { + Version: 100 + LayerElement: { + Type: "LayerElementNormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementBinormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementTangent" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementMaterial" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementSmoothing" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementUV" + TypedIndex: 0 + } + } + } + Model: 2359439406816, "Model::Cube2", "Mesh" { + Version: 232 + Properties70: { + P: "RotationActive", "bool", "", "",1 + P: "InheritType", "enum", "", "",1 + P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 + P: "DefaultAttributeIndex", "int", "Integer", "",0 + P: "Lcl Translation", "Lcl Translation", "", "A",-1.04023893373156,0.998288783259251,-1.04375962988677 + P: "Lcl Scaling", "Lcl Scaling", "", "A",10,10,10 + P: "currentUVSet", "KString", "", "U", "map1" + } + Shading: T + Culling: "CullingOff" + } + Model: 2359439411456, "Model::Куб1", "Mesh" { + Version: 232 + Properties70: { + P: "RotationActive", "bool", "", "",1 + P: "InheritType", "enum", "", "",1 + P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 + P: "DefaultAttributeIndex", "int", "Integer", "",0 + P: "Lcl Translation", "Lcl Translation", "", "A",1.04023893373156,-0.998288783259251,1.04375962988677 + P: "currentUVSet", "KString", "", "U", "map1" + } + Shading: T + Culling: "CullingOff" + } + Model: 2359439409136, "Model::Cube3", "Mesh" { + Version: 232 + Properties70: { + P: "RotationActive", "bool", "", "",1 + P: "InheritType", "enum", "", "",1 + P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 + P: "DefaultAttributeIndex", "int", "Integer", "",0 + P: "Lcl Translation", "Lcl Translation", "", "A",-1.0671176743957,0.998288783259251,9.39023469168045 + P: "Lcl Scaling", "Lcl Scaling", "", "A",10,10,10 + P: "currentUVSet", "KString", "", "U", "map1" + } + Shading: T + Culling: "CullingOff" + } + Model: 2359439416096, "Model::Куб1", "Mesh" { + Version: 232 + Properties70: { + P: "RotationActive", "bool", "", "",1 + P: "InheritType", "enum", "", "",1 + P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 + P: "DefaultAttributeIndex", "int", "Integer", "",0 + P: "Lcl Translation", "Lcl Translation", "", "A",1.04023893373156,-0.998288783259251,1.1806740271636 + P: "Lcl Scaling", "Lcl Scaling", "", "A",0.77384837213491,0.77384837213491,0.77384837213491 + P: "currentUVSet", "KString", "", "U", "map1" + } + Shading: T + Culling: "CullingOff" + } + Material: 2359823919504, "Material::Mat_1", "" { + Version: 102 + ShadingModel: "lambert" + MultiLayer: 0 + Properties70: { + P: "AmbientColor", "Color", "", "A", 0.4,0.2,0.4 + P: "AmbientFactor", "Number", "", "A", 0.25 + P: "DiffuseColor", "Color", "", "A", 0.8,0.4,0.2,0.9 + P: "DiffuseFactor", "Number", "", "A", 0.5 + P: "TransparentColor", "Color", "", "A", 0.1,0.2,0.3 + P: "TransparencyFactor", "Number", "", "A", 2.0 + P: "Opacity", "Number", "", "A", 0.35 + } + } + Material: 2359823921584, "Material::Mat_2", "" { + Version: 102 + ShadingModel: "lambert" + MultiLayer: 0 + Properties70: { + P: "AmbientColor", "Color", "", "A", 0.1,0.05,0.1 + P: "DiffuseColor", "Color", "", "A", 0.8,0.4,0.2 + P: "DiffuseFactor", "Number", "", "A", 0.5 + P: "TransparencyFactor", "Number", "", "A", 0.25 + P: "SomeColor", "Vector3D", "Vector", "", 0.1,0.2,0.3 + P: "AString", "KString", "", "", "Ministry of Finance (Turkmenistan)" + } + } + AnimationStack: 2359349464816, "AnimStack::Take 001", "" { + Properties70: { + P: "LocalStart", "KTime", "Time", "",1924423250 + P: "LocalStop", "KTime", "Time", "",230930790000 + P: "ReferenceStart", "KTime", "Time", "",1924423250 + P: "ReferenceStop", "KTime", "Time", "",230930790000 + } + } + AnimationLayer: 2359327403664, "AnimLayer::BaseLayer", "" { + } +} + +; Object connections +;------------------------------------------------------------------ + +Connections: { + + ;Model::Cube2, Model::RootNode + C: "OO",2359439406816,0 + + ;Model::Cube3, Model::RootNode + C: "OO",2359439409136,0 + + ;AnimLayer::BaseLayer, AnimStack::Take 001 + C: "OO",2359327403664,2359349464816 + + ;Geometry::, Model::Cube2 + C: "OO",2358377979296,2359439406816 + + ;Material::Mat_1, Model::Cube2 + C: "OO",2359823919504,2359439406816 + + ;Model::Куб1, Model::Cube2 + C: "OO",2359439411456,2359439406816 + + ;Geometry::, Model::Куб1 + C: "OO",2358377961872,2359439411456 + + ;Material::Mat_1, Model::Куб1 + C: "OO",2359823919504,2359439411456 + + ;Geometry::, Model::Cube3 + C: "OO",2358377982464,2359439409136 + + ;Material::Mat_2, Model::Cube3 + C: "OO",2359823921584,2359439409136 + + ;Model::Куб1, Model::Cube3 + C: "OO",2359439416096,2359439409136 + + ;Geometry::, Model::Куб1 + C: "OO",2358377979824,2359439416096 + + ;Material::Mat_2, Model::Куб1 + C: "OO",2359823921584,2359439416096 +} +;Takes section +;---------------------------------------------------- + +Takes: { + Current: "Take 001" + Take: "Take 001" { + FileName: "Take_001.tak" + LocalTime: 1924423250,230930790000 + ReferenceTime: 1924423250,230930790000 + } +} diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf b/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf new file mode 100644 index 000000000..ba58d5f90 --- /dev/null +++ b/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf @@ -0,0 +1,73 @@ +{ + "asset": { + "version": "2.0" + }, + "images": [ + { + "uri": "texture.png" + } + ], + "nodes": [ + { "mesh": 0 } + ], + "scene": 0, + "scenes": [{ + "nodes": [0] + }], + "meshes": [ + { + "primitives": [{ + "attributes": {}, + "material": 0 + }] + } + ], + "materials": [ + { + "name": "raw", + "pbrMetallicRoughness": { + "baseColorFactor": [ 0.8, 0.2, 0.4, 0.3 ], + "baseColorTexture": { + "index": 0, + "texCoord": 1 + } + }, + "emissiveFactor": [ 0.1, 0.2, 0.3 ], + "doubleSided": true, + "normalTexture": { + "index": 1, + "texCoord": 2, + "extensions": { + "KHR_texture_transform": { + "offset": [0.0, 1.0], + "scale": [0.25, 0.75], + "texCoord": 3 + } + } + }, + "emissiveTexture": { + "index": 2 + } + } + ], + "samplers": [ + {} + ], + "textures": [ + { + "sampler": 0, + "source": 0 + }, + { + "sampler": 0, + "source": 0 + }, + { + "sampler": 0, + "source": 0 + } + ], + "extensionsUsed": [ + "KHR_texture_transform" + ] +} From 7287d087161b1816dbabec45da22fcfb6bbc7ac7 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 18:42:22 +0100 Subject: [PATCH 22/48] AssimpImporter: fix raw material test for assimp 5.1.0+ --- .../Test/AssimpImporterTest.cpp | 26 +++++------ .../AssimpImporter/Test/material-raw.bin | Bin 0 -> 60 bytes .../AssimpImporter/Test/material-raw.bin.in | 14 ++++++ .../AssimpImporter/Test/material-raw.gltf | 43 +++++++++++++++++- 4 files changed, 67 insertions(+), 16 deletions(-) create mode 100644 src/MagnumPlugins/AssimpImporter/Test/material-raw.bin create mode 100644 src/MagnumPlugins/AssimpImporter/Test/material-raw.bin.in diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 1329997e6..c29a96441 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2184,6 +2184,9 @@ void AssimpImporterTest::materialRaw() { CORRADE_COMPARE(material->attribute(4), (Vector3{0.1f, 0.2f, 0.3f})); } + if(_assimpVersion < 410) + CORRADE_SKIP("glTF 2 is supported since Assimp 4.1."); + /* glTF covers a few types/sizes not covered by FBX */ CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-raw.gltf"))); { @@ -2196,13 +2199,10 @@ void AssimpImporterTest::materialRaw() { CORRADE_VERIFY(material); CORRADE_COMPARE(material->types(), MaterialType{}); { - /* While it's weird, this extra layer is very handy to make sure all - raw attributes land in layer 0. Only texture attributes can have an - index, and hence, a layer. */ - CORRADE_EXPECT_FAIL("glTF files with non-0 texture coordinate set add an extra diffuse-only material layer."); + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, + "glTF files with non-0 texture coordinate set add an extra diffuse-only material layer."); CORRADE_COMPARE(material->layerCount(), 1); } - CORRADE_COMPARE(material->layerCount(), 2); /* Attributes that would normally be recognized */ CORRADE_VERIFY(!material->hasAttribute(MaterialAttribute::DiffuseColor)); @@ -2230,7 +2230,7 @@ void AssimpImporterTest::materialRaw() { CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVTRANSFORM."); - constexpr Containers::StringView name = _AI_MATKEY_UVTRANSFORM_BASE ".NORMAL"_s; + constexpr Containers::StringView name = _AI_MATKEY_UVTRANSFORM_BASE ".NORMALS"_s; const bool hasAttribute = material->hasAttribute(name); CORRADE_VERIFY(hasAttribute); @@ -2241,19 +2241,12 @@ void AssimpImporterTest::materialRaw() { CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::String); const auto value = material->attribute(name); /* +1 is null byte */ - CORRADE_COMPARE(value.size(), sizeof(aiUVTransform) + 1); + CORRADE_COMPARE(value.size(), sizeof(aiUVTransform)); const aiUVTransform& transform = *reinterpret_cast(value.data()); const Vector2 scaling{transform.mScaling.x, transform.mScaling.y}; CORRADE_COMPARE(scaling, (Vector2{0.25f, 0.75f})); } } - - /* Test that the second layer only contains texture attributes. Those all - start with "$tex.": - https://github.com/assimp/assimp/blob/889e55969647b9bd9e832d6208b41973156ce46b/include/assimp/material.h#L1051 - Non-texture attributes always have mIndex set to 0 so shouldn't be here. */ - for(UnsignedInt i = 0; i != material->attributeCount(1); ++i) - CORRADE_VERIFY(material->attributeName(1, i).hasPrefix("$tex."_s)); } void AssimpImporterTest::materialRawTextureLayers() { @@ -2347,7 +2340,10 @@ void AssimpImporterTest::materialRawTextureLayers() { } } - /* Test that layers > 0 only contain raw texture attributes */ + /* Test that layers > 0 only contains texture attributes. Those all start + with "$tex.": + https://github.com/assimp/assimp/blob/889e55969647b9bd9e832d6208b41973156ce46b/include/assimp/material.h#L1051 + Non-texture attributes always have mIndex set to 0 so shouldn't be here. */ for(UnsignedInt l = 1; l != material->layerCount(); ++l) for(UnsignedInt i = 0; i != material->attributeCount(l); ++i) CORRADE_VERIFY(material->attributeName(l, i).hasPrefix("$tex."_s)); diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.bin b/src/MagnumPlugins/AssimpImporter/Test/material-raw.bin new file mode 100644 index 0000000000000000000000000000000000000000..0716ed9b2363d3f96984e45230f847451efe5767 GIT binary patch literal 60 qcmZQzIAG7f(6FC@fdPsY92giJfMN^>fa3PEX3n$&VIUs{;9>xdAP#~6 literal 0 HcmV?d00001 diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.bin.in b/src/MagnumPlugins/AssimpImporter/Test/material-raw.bin.in new file mode 100644 index 000000000..2b47670f0 --- /dev/null +++ b/src/MagnumPlugins/AssimpImporter/Test/material-raw.bin.in @@ -0,0 +1,14 @@ +type = '<3f3f3f 2f2f2f' +input = [ + # positions + 1.5, -1.0, -0.5, + -0.5, 2.5, 0.75, + -2.0, 1.0, 0.3, + + # texture coordinates + 0.3, 0.0, + 0.0, 0.5, + 0.3, 0.3 +] + +# kate: hl python diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf b/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf index ba58d5f90..d011f34a0 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf +++ b/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf @@ -17,11 +17,52 @@ "meshes": [ { "primitives": [{ - "attributes": {}, + "attributes": { + "POSITION": 0, + "TEXCOORD_0": 1, + "TEXCOORD_1": 1, + "TEXCOORD_2": 1, + "TEXCOORD_3": 1 + }, "material": 0 }] } ], + "accessors": [ + { + "name": "2", + "bufferView": 0, + "byteOffset": 0, + "componentType": 5126, + "count": 3, + "type": "VEC3" + }, + { + "name": "3", + "bufferView": 1, + "componentType": 5126, + "count": 3, + "type": "VEC2" + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 36 + }, + { + "buffer": 0, + "byteOffset": 36, + "byteLength": 24 + } + ], + "buffers": [ + { + "byteLength": 60, + "uri": "material-raw.bin" + } + ], "materials": [ { "name": "raw", From feb352795b9fd66362d419bba9662eb5885501a4 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 19:33:31 +0100 Subject: [PATCH 23/48] AssimpImporter: enable the C language This seems to be needed in project scope, even if we inject enable_language(C) into the project that's being try_compile'd --- src/MagnumPlugins/AssimpImporter/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt index d0e97fa77..49117323c 100644 --- a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt @@ -70,6 +70,8 @@ endif() # temporary CMakeList.txt created by try_compile: # https://github.com/Kitware/CMake/blob/v3.4.0/Source/cmCoreTryCompile.cxx#L313 file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/checkAssimpVersionLanguageOverride.cmake "enable_language(C)") +# For some reason, this also needs C to be enabled in this scope +enable_language(C) # Go through all versions of interest and pick the highest one that compiles foreach(_version 20210102 20201123 20200225 20191122 20190915 20151031) From 41bf8fd47f15473394c5baeb67ac0b69d3dd9e89 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 22:35:19 +0100 Subject: [PATCH 24/48] AssimpImporter: fix warnings --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 1 + src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 44bec5834..745b1a697 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -628,6 +628,7 @@ Int AssimpImporter::doDefaultScene() const { return _f->scene->mRootNode ? 0 : - UnsignedInt AssimpImporter::doSceneCount() const { return _f->scene->mRootNode ? 1 : 0; } Int AssimpImporter::doSceneForName(const std::string& name) { + static_cast(name); #if ASSIMP_HAS_SCENE_NAME if(_f->scene->mRootNode && name == _f->scene->mName.C_Str()) return 0; diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index c29a96441..e998a97be 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2176,7 +2176,6 @@ void AssimpImporterTest::materialRaw() { } { CORRADE_COMPARE(material->attributeName(3), "$raw.AString"_s); CORRADE_COMPARE(material->attributeType(3), MaterialAttributeType::String); - const auto x = material->attribute(3); CORRADE_COMPARE(material->attribute(3), "Ministry of Finance (Turkmenistan)"); } { CORRADE_COMPARE(material->attributeName(4), "$raw.SomeColor"_s); From 5942ec1f945855668d1442b9502f72578c4c237a Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Thu, 25 Nov 2021 22:37:27 +0100 Subject: [PATCH 25/48] AssimpImporter: Containers::InPlaceInit is deprecated --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 745b1a697..ec918644e 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1492,7 +1492,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt continue; } - arrayAppend(attributes, Containers::InPlaceInit, keyString, type, valuePointer); + arrayAppend(attributes, InPlaceInit, keyString, type, valuePointer); } } } From 5408d05e4a76c22878412d6b4022a6a31a79f186 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:14:46 +0100 Subject: [PATCH 26/48] AssimpImporter: fix compiler errors --- src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index e998a97be..35eceafd5 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -27,6 +27,7 @@ DEALINGS IN THE SOFTWARE. */ +#include #include #include #include @@ -1370,7 +1371,7 @@ std::string fixMeshName(const Containers::StringView meshName, const Containers: std::string fixed = meshName; if(assimpVersion >= 510 && fileName.hasSuffix(".dae"_s)) { for(char& c: fixed) - if(c != '-' && !std::isalnum(unsigned char(c))) c = '_'; + if(c != '-' && !std::isalnum(static_cast(c))) c = '_'; fixed += "-mesh"; } From 786d8a9f6cc2b2cb616d07279b87d9800f46872f Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:16:15 +0100 Subject: [PATCH 27/48] AssimpImporter: use ASCII .fbx material test files For easier extensibility in the future. Interestingly, they're smaller than the binary versions. --- .../Test/AssimpImporterTest.cpp | 20 +- .../AssimpImporter/Test/material-layers.fbx | Bin 27856 -> 16027 bytes .../AssimpImporter/Test/material-raw.fbx | 667 +++--------------- 3 files changed, 123 insertions(+), 564 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 35eceafd5..be1b341a1 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2099,7 +2099,7 @@ void AssimpImporterTest::materialRawUnrecognized() { CORRADE_COMPARE(importer->materialCount(), 2); - Containers::Optional material = importer->material("Mat_1"); + Containers::Optional material = importer->material("Standard_Types"); CORRADE_VERIFY(material); CORRADE_COMPARE(material->types(), MaterialType::Phong); CORRADE_COMPARE(material->layerCount(), 1); @@ -2119,11 +2119,11 @@ void AssimpImporterTest::materialRawUnrecognized() { } { CORRADE_COMPARE(material->attributeName(0), extractMaterialKey(AI_MATKEY_COLOR_TRANSPARENT)); CORRADE_COMPARE(material->attributeType(0), MaterialAttributeType::Vector3); - CORRADE_COMPARE(material->attribute(0), (Vector3{0.2f, 0.4f, 0.6f})); + CORRADE_COMPARE(material->attribute(0), (Vector3{0.8f, 0.4f, 0.6f})); } { CORRADE_COMPARE(material->attributeName(1), extractMaterialKey(AI_MATKEY_OPACITY)); CORRADE_COMPARE(material->attributeType(1), MaterialAttributeType::Float); - CORRADE_COMPARE(material->attribute(1), 0.35f); + CORRADE_COMPARE(material->attribute(1), 0.4f); } { /* The transparency factor is multiplied with the transparent color but still reported separately. We don't get the factors for ambient or @@ -2143,7 +2143,7 @@ void AssimpImporterTest::materialRaw() { CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "material-raw.fbx"))); CORRADE_COMPARE(importer->materialCount(), 2); - Containers::Optional material = importer->material("Mat_2"); + Containers::Optional material = importer->material("Custom_Types"); CORRADE_VERIFY(material); CORRADE_COMPARE(material->types(), MaterialType{}); CORRADE_COMPARE(material->layerCount(), 1); @@ -2175,13 +2175,13 @@ void AssimpImporterTest::materialRaw() { /* Raw attributes taken directly from the FBX file, prefixed with "$raw.". Seems to be the only importer that supports that. */ } { - CORRADE_COMPARE(material->attributeName(3), "$raw.AString"_s); - CORRADE_COMPARE(material->attributeType(3), MaterialAttributeType::String); - CORRADE_COMPARE(material->attribute(3), "Ministry of Finance (Turkmenistan)"); + CORRADE_COMPARE(material->attributeName(3), "$raw.SomeColor"_s); + CORRADE_COMPARE(material->attributeType(3), MaterialAttributeType::Vector3); + CORRADE_COMPARE(material->attribute(3), (Vector3{0.1f, 0.2f, 0.3f})); } { - CORRADE_COMPARE(material->attributeName(4), "$raw.SomeColor"_s); - CORRADE_COMPARE(material->attributeType(4), MaterialAttributeType::Vector3); - CORRADE_COMPARE(material->attribute(4), (Vector3{0.1f, 0.2f, 0.3f})); +CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); + CORRADE_COMPARE(material->attributeType(4), MaterialAttributeType::String); + CORRADE_COMPARE(material->attribute(4), "Ministry of Finance (Turkmenistan)"); } if(_assimpVersion < 410) diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-layers.fbx b/src/MagnumPlugins/AssimpImporter/Test/material-layers.fbx index 52de0ed144e9f1684c12795c899d57a91d91fbf6..82af29f7359ae0b477a29a916c44cc66ca06025d 100644 GIT binary patch literal 16027 zcmeHOTUXmi5`MOSg$|E%9M(1j6X(g8kl_Rai-DQhmmFa?MiW`mN^*jCH~)RVs_s^| zY~9R|Jk887V5zFQE?w7dzjw|~es>1@gZ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K3{|_T=y~(uo zJ%(W6wmx=kxVFk{-ONOyugjSyc3h+G;smYa!`e3(Xj^@>*pXcZ7~TT9dmq;%wh{Ra zdp~cGVM>GI+qw#MEgb!`tkvW7NVt0)zE9F94llb^rFEaJ+yKG)l8#HUvPtllp2Jg z(g_U4J9nlL4^5?ex|N<};a@XO_$u*sb-rAuc=a6!uKl~1Jq4P#*(T7A+2mK{v>=Nw84daJtDi3=seNX)SQYP{I{DJ$~&(EPJ z6{D7*zu(3oBia|ojQ01h8ywOD zCzxqkA#^f=xn>CcuOVu@5L(YpKRY3GB9%}jGK6k@FfxQ_Fc=J>e`3MJOtnMkZG%Jn zw=9I#jA#i3Hf9L|=l5Gj z!>Jc`xY;cJ=(U?I^f;PE^ms0_%;`wNsrvf7msdRk_NAIEvTw%YeY7Tvyjt;CK4cbg zmo6$DekH>OIV-eS?IJTrKZmAm$gVs^I z@Efkl3{`sbr~Yy`zf}l_h`#&lrygp0>D0?Nee>pzZ@cK%mrXJy{;#h8ukx#F|M1Aa Se(=f{-+jCJjnW^lUig2(6(2$X diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx b/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx index e9bf1a36e..e239a91d1 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx +++ b/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx @@ -1,20 +1,23 @@ -; FBX 7.5.0 project file +; FBX 7.7.0 project file ; ---------------------------------------------------- FBXHeaderExtension: { - FBXHeaderVersion: 1003 - FBXVersion: 7500 + FBXHeaderVersion: 1004 + FBXVersion: 7700 CreationTimeStamp: { Version: 1000 - Year: 2019 - Month: 1 - Day: 7 - Hour: 16 - Minute: 17 - Second: 31 - Millisecond: 730 + Year: 2021 + Month: 11 + Day: 26 + Hour: 12 + Minute: 0 + Second: 47 + Millisecond: 358 + } + Creator: "FBX SDK/FBX Plugins version 2020.0.1" + OtherFlags: { + TCDefinition: 127 } - Creator: "FBX SDK/FBX Plugins version 2018.1.1" SceneInfo: "SceneInfo::GlobalInfo", "UserData" { Type: "UserData" Version: 100 @@ -28,20 +31,19 @@ FBXHeaderExtension: { Comment: "" } Properties70: { - P: "DocumentUrl", "KString", "Url", "", "U:\Some\Absolute\Path\cubes_with_names.fbx" - P: "SrcDocumentUrl", "KString", "Url", "", "U:\Some\Absolute\Path\cubes_with_names.fbx" + P: "DocumentUrl", "KString", "Url", "", "material-raw.fbx" + P: "SrcDocumentUrl", "KString", "Url", "", "material-raw.fbx" P: "Original", "Compound", "", "" - P: "Original|ApplicationVendor", "KString", "", "", "Autodesk" - P: "Original|ApplicationName", "KString", "", "", "Maya" - P: "Original|ApplicationVersion", "KString", "", "", "201800" - P: "Original|DateTime_GMT", "DateTime", "", "", "07/01/2019 16:17:31.730" - P: "Original|FileName", "KString", "", "", "U:\Some\Absolute\Path\cubes_with_names.fbx" + P: "Original|ApplicationVendor", "KString", "", "", "" + P: "Original|ApplicationName", "KString", "", "", "" + P: "Original|ApplicationVersion", "KString", "", "", "" + P: "Original|DateTime_GMT", "DateTime", "", "", "" + P: "Original|FileName", "KString", "", "", "" P: "LastSaved", "Compound", "", "" - P: "LastSaved|ApplicationVendor", "KString", "", "", "Autodesk" - P: "LastSaved|ApplicationName", "KString", "", "", "Maya" - P: "LastSaved|ApplicationVersion", "KString", "", "", "201800" - P: "LastSaved|DateTime_GMT", "DateTime", "", "", "07/01/2019 16:17:31.730" - P: "Original|ApplicationActiveProject", "KString", "", "", "U:\Some\Absolute\Path" + P: "LastSaved|ApplicationVendor", "KString", "", "", "" + P: "LastSaved|ApplicationName", "KString", "", "", "" + P: "LastSaved|ApplicationVersion", "KString", "", "", "" + P: "LastSaved|DateTime_GMT", "DateTime", "", "", "" } } } @@ -54,17 +56,17 @@ GlobalSettings: { P: "FrontAxisSign", "int", "Integer", "",1 P: "CoordAxis", "int", "Integer", "",0 P: "CoordAxisSign", "int", "Integer", "",1 - P: "OriginalUpAxis", "int", "Integer", "",1 + P: "OriginalUpAxis", "int", "Integer", "",-1 P: "OriginalUpAxisSign", "int", "Integer", "",1 P: "UnitScaleFactor", "double", "Number", "",1 P: "OriginalUnitScaleFactor", "double", "Number", "",1 P: "AmbientColor", "ColorRGB", "Color", "",0,0,0 P: "DefaultCamera", "KString", "", "", "Producer Perspective" - P: "TimeMode", "enum", "", "",11 + P: "TimeMode", "enum", "", "",0 P: "TimeProtocol", "enum", "", "",2 P: "SnapOnFrameMode", "enum", "", "",0 - P: "TimeSpanStart", "KTime", "Time", "",1924423250 - P: "TimeSpanStop", "KTime", "Time", "",384884650000 + P: "TimeSpanStart", "KTime", "Time", "",0 + P: "TimeSpanStop", "KTime", "Time", "",46186158000 P: "CustomFrameRate", "double", "Number", "",-1 P: "TimeMarker", "Compound", "", "" P: "CurrentTimeMarker", "int", "Integer", "",-1 @@ -76,10 +78,10 @@ GlobalSettings: { Documents: { Count: 1 - Document: 2359325563280, "", "Scene" { + Document: 7151232, "", "Scene" { Properties70: { P: "SourceObject", "object", "", "" - P: "ActiveAnimStackName", "KString", "", "", "Take 001" + P: "ActiveAnimStackName", "KString", "", "", "" } RootNode: 0 } @@ -96,61 +98,12 @@ References: { Definitions: { Version: 100 - Count: 13 + Count: 7 ObjectType: "GlobalSettings" { Count: 1 } - ObjectType: "AnimationStack" { - Count: 1 - PropertyTemplate: "FbxAnimStack" { - Properties70: { - P: "Description", "KString", "", "", "" - P: "LocalStart", "KTime", "Time", "",0 - P: "LocalStop", "KTime", "Time", "",0 - P: "ReferenceStart", "KTime", "Time", "",0 - P: "ReferenceStop", "KTime", "Time", "",0 - } - } - } - ObjectType: "AnimationLayer" { - Count: 1 - PropertyTemplate: "FbxAnimLayer" { - Properties70: { - P: "Weight", "Number", "", "A",100 - P: "Mute", "bool", "", "",0 - P: "Solo", "bool", "", "",0 - P: "Lock", "bool", "", "",0 - P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 - P: "BlendMode", "enum", "", "",0 - P: "RotationAccumulationMode", "enum", "", "",0 - P: "ScaleAccumulationMode", "enum", "", "",0 - P: "BlendModeBypass", "ULongLong", "", "",0 - } - } - } - ObjectType: "Geometry" { - Count: 4 - PropertyTemplate: "FbxMesh" { - Properties70: { - P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 - P: "BBoxMin", "Vector3D", "Vector", "",0,0,0 - P: "BBoxMax", "Vector3D", "Vector", "",0,0,0 - P: "Primary Visibility", "bool", "", "",1 - P: "Casts Shadows", "bool", "", "",1 - P: "Receive Shadows", "bool", "", "",1 - } - } - } - ObjectType: "Material" { - Count: 2 - PropertyTemplate: "FbxSurfaceLambert" { - Properties70: { - P: "ShadingModel", "KString", "", "", "Phong" - } - } - } ObjectType: "Model" { - Count: 4 + Count: 2 PropertyTemplate: "FbxNode" { Properties70: { P: "QuaternionInterpolate", "enum", "", "",0 @@ -227,297 +180,65 @@ Definitions: { } } } -} - -; Object properties -;------------------------------------------------------------------ - -Objects: { - Geometry: 2358377979296, "Geometry::", "Mesh" { - Vertices: *24 { - a: -0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5 - } - PolygonVertexIndex: *24 { - a: 0,1,3,-3,2,3,5,-5,4,5,7,-7,6,7,1,-1,1,7,5,-4,6,0,2,-5 - } - Edges: *12 { - a: 0,1,2,3,5,6,7,9,10,11,13,15 - } - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Normals: *72 { - a: 0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0 - } - NormalsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - } - LayerElementBinormal: 0 { - Version: 102 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Binormals: *72 { - a: 0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,-0,1,0,-0,1,0,0,1,-0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0 - } - BinormalsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - - } - LayerElementTangent: 0 { - Version: 102 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Tangents: *72 { - a: 1,-0,-0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0,-0,1,0,-0,1,0,-0,1,0,-0,1 - } - TangentsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - } - LayerElementUV: 0 { - Version: 101 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: *28 { - a: 0.375,0,0.625,0,0.375,0.25,0.625,0.25,0.375,0.5,0.625,0.5,0.375,0.75,0.625,0.75,0.375,1,0.625,1,0.875,0,0.875,0.25,0.125,0,0.125,0.25 - } - UVIndex: *24 { - a: 0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,1,10,11,3,12,0,2,13 - } - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByEdge" - ReferenceInformationType: "Direct" - Smoothing: *12 { - a: 0,0,0,0,0,0,0,0,0,0,0,0 - } - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: *1 { - a: 0 - } - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementBinormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementTangent" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementUV" - TypedIndex: 0 + ObjectType: "Geometry" { + Count: 2 + PropertyTemplate: "FbxMesh" { + Properties70: { + P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 + P: "BBoxMin", "Vector3D", "Vector", "",0,0,0 + P: "BBoxMax", "Vector3D", "Vector", "",0,0,0 + P: "Primary Visibility", "bool", "", "",1 + P: "Casts Shadows", "bool", "", "",1 + P: "Receive Shadows", "bool", "", "",1 } } } - Geometry: 2358377961872, "Geometry::", "Mesh" { - Vertices: *24 { - a: -0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5 - } - PolygonVertexIndex: *24 { - a: 0,1,3,-3,2,3,5,-5,4,5,7,-7,6,7,1,-1,1,7,5,-4,6,0,2,-5 - } - Edges: *12 { - a: 0,1,2,3,5,6,7,9,10,11,13,15 - } - GeometryVersion: 124 - LayerElementNormal: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Normals: *72 { - a: 0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0 - } - NormalsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - } - LayerElementBinormal: 0 { - Version: 102 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Binormals: *72 { - a: 0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,-0,1,0,-0,1,0,0,1,-0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0 - } - BinormalsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - - } - LayerElementTangent: 0 { - Version: 102 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Tangents: *72 { - a: 1,-0,-0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0,-0,1,0,-0,1,0,-0,1,0,-0,1 - } - TangentsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - } - LayerElementUV: 0 { - Version: 101 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: *28 { - a: 0.375,0,0.625,0,0.375,0.25,0.625,0.25,0.375,0.5,0.625,0.5,0.375,0.75,0.625,0.75,0.375,1,0.625,1,0.875,0,0.875,0.25,0.125,0,0.125,0.25 - } - UVIndex: *24 { - a: 0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,1,10,11,3,12,0,2,13 - } - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByEdge" - ReferenceInformationType: "Direct" - Smoothing: *12 { - a: 0,0,0,0,0,0,0,0,0,0,0,0 - } - } - LayerElementMaterial: 0 { - Version: 101 - Name: "" - MappingInformationType: "AllSame" - ReferenceInformationType: "IndexToDirect" - Materials: *1 { - a: 0 - } - } - Layer: 0 { - Version: 100 - LayerElement: { - Type: "LayerElementNormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementBinormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementTangent" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementMaterial" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementUV" - TypedIndex: 0 + ObjectType: "Material" { + Count: 2 + PropertyTemplate: "FbxSurfaceLambert" { + Properties70: { } } } - Geometry: 2358377982464, "Geometry::", "Mesh" { - Vertices: *24 { - a: -0.5,-0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,0.5,0.5,0.5,-0.5,0.5,-0.5,0.5,0.5,-0.5,-0.5,-0.5,-0.5,0.5,-0.5,-0.5 - } - PolygonVertexIndex: *24 { - a: 0,1,3,-3,2,3,5,-5,4,5,7,-7,6,7,1,-1,1,7,5,-4,6,0,2,-5 +} + +; Object properties +;------------------------------------------------------------------ + +Objects: { + Geometry: 7639056, "Geometry::planeMesh_0", "Mesh" { + Vertices: *12 { + a: -5,-5,0,5,-5,0,5,5,0,-5,5,0 } - Edges: *12 { - a: 0,1,2,3,5,6,7,9,10,11,13,15 + PolygonVertexIndex: *4 { + a: 0,1,2,-4 } GeometryVersion: 124 LayerElementNormal: 0 { Version: 102 - Name: "" - MappingInformationType: "ByPolygonVertex" + Name: "normals" + MappingInformationType: "ByVertice" ReferenceInformationType: "Direct" - Normals: *72 { - a: 0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0 + Normals: *12 { + a: 0,0,1,0,0,1,0,0,1,0,0,1 } - NormalsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - } - LayerElementBinormal: 0 { - Version: 102 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Binormals: *72 { - a: 0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,-0,1,0,-0,1,0,0,1,-0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0 - } - BinormalsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - - } - LayerElementTangent: 0 { - Version: 102 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Tangents: *72 { - a: 1,-0,-0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0,-0,1,0,-0,1,0,-0,1,0,-0,1 - } - TangentsW: *24 { - a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + NormalsW: *4 { + a: 0,0,0,0 } } LayerElementUV: 0 { Version: 101 - Name: "map1" + Name: "diffuseUV" MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: *28 { - a: 0.375,0,0.625,0,0.375,0.25,0.625,0.25,0.375,0.5,0.625,0.5,0.375,0.75,0.625,0.75,0.375,1,0.625,1,0.875,0,0.875,0.25,0.125,0,0.125,0.25 - } - UVIndex: *24 { - a: 0,1,3,2,2,3,5,4,4,5,7,6,6,7,9,8,1,10,11,3,12,0,2,13 - } - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByEdge" ReferenceInformationType: "Direct" - Smoothing: *12 { - a: 0,0,0,0,0,0,0,0,0,0,0,0 + UV: *8 { + a: 0,0,1,0,1,1,0,1 } } LayerElementMaterial: 0 { Version: 101 Name: "" - MappingInformationType: "AllSame" + MappingInformationType: "NoMappingInformation" ReferenceInformationType: "IndexToDirect" Materials: *1 { a: 0 @@ -529,126 +250,49 @@ Objects: { Type: "LayerElementNormal" TypedIndex: 0 } - LayerElement: { - Type: "LayerElementBinormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementTangent" - TypedIndex: 0 - } LayerElement: { Type: "LayerElementMaterial" TypedIndex: 0 } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } LayerElement: { Type: "LayerElementUV" TypedIndex: 0 } } } - Geometry: 2358377979824, "Geometry::", "Mesh" { - Vertices: *588 { - a: -0.499999970197678,-0.5,0.5,0.500000059604645,-0.5,0.5,-0.499999970197678,0.5,0.5,0.500000059604645,0.5,0.5,-0.499999970197678,0.5,-0.49999988079071,0.500000059604645,0.5,-0.49999988079071,-0.499999970197678,-0.5,-0.49999988079071,0.500000059604645,-0.5,-0.49999988079071,0,0,0.5,0,-0.5,0.5,0.500000059604645,0,0.5,0,0.5,0.5,-0.499999970197678,0,0.5,0,0.5,1.19209289550781e-07,0.500000059604645,0.5,1.19209289550781e-07,0,0.5,-0.49999988079071,-0.499999970197678,0.5,1.19209289550781e-07,0,0,-0.49999988079071,0.500000059604645,0,-0.49999988079071,0,-0.5,-0.49999988079071,-0.499999970197678,0,-0.49999988079071,0,-0.5,1.19209289550781e-07,0.500000059604645,-0.5,1.19209289550781e-07,-0.499999970197678,-0.5,1.19209289550781e-07,0.500000059604645,0,1.19209289550781e-07,-0.499999970197678,0,1.19209289550781e-07,-0.25,-0.25,0.5,-0.499999970197678,-0.25,0.5,-0.25,-0.5,0.5,0,-0.25,0.5,-0.25,0,0.5,-0.25,0.5,0.25,-0.499999970197678,0.5,0.25,-0.25,0.5,0.5,0,0.5,0.25,-0.25,0.5,1.19209289550781e-07,-0.25,0.25,-0.49999988079071,-0.499999970197678,0.25,-0.49999988079071,-0.25,0.5,-0.49999988079071,0,0.25,-0.49999988079071,-0.25,0,-0.49999988079071,-0.25,-0.5,-0.24999988079071,-0.499999970197678,-0.5,-0.24999988079071,-0.25,-0.5,-0.49999988079071,0,-0.5,-0.24999988079071,-0.25,-0.5,1.19209289550781e-07,0.500000059604645,-0.25,0.25,0.500000059604645,-0.25,0.5,0.500000059604645,-0.5,0.25,0.500000059604645,-0.25,1.19209289550781e-07,0.500000059604645,0,0.25,-0.499999970197678,-0.25,-0.24999988079071,-0.499999970197678,-0.25,-0.49999988079071,-0.499999970197678,-0.25,1.19209289550781e-07,-0.499999970197678,0,-0.24999988079071,0.250000059604645,-0.25,0.5,0.250000059604645,-0.5,0.5,0.250000059604645,0,0.5,0.250000059604645,0.25,0.5,0.500000059604645,0.25,0.5,0.250000059604645,0.5,0.5,0,0.25,0.5,-0.25,0.25,0.5,-0.499999970197678,0.25,0.5,0.250000059604645,0.5,0.25,0.500000059604645,0.5,0.25,0.250000059604645,0.5,1.19209289550781e-07,0.250000059604645,0.5,-0.24999988079071,0.500000059604645,0.5,-0.24999988079071,0.250000059604645,0.5,-0.49999988079071, -0,0.5,-0.24999988079071,-0.25,0.5,-0.24999988079071,-0.499999970197678,0.5,-0.24999988079071,0.250000059604645,0.25,-0.49999988079071,0.500000059604645,0.25,-0.49999988079071,0.250000059604645,0,-0.49999988079071,0.250000059604645,-0.25,-0.49999988079071,0.500000059604645,-0.25,-0.49999988079071,0.250000059604645,-0.5,-0.49999988079071,0,-0.25,-0.49999988079071,-0.25,-0.25,-0.49999988079071,0.250000059604645,-0.5,-0.24999988079071,0.500000059604645,-0.5,-0.24999988079071,0.250000059604645,-0.5,1.19209289550781e-07,0.250000059604645,-0.5,0.25,0,-0.5,0.25,-0.25,-0.5,0.25,-0.499999970197678,-0.5,0.25,0.500000059604645,-0.25,-0.24999988079071,0.500000059604645,0,-0.24999988079071,0.500000059604645,0.25,-0.24999988079071,0.500000059604645,0.25,1.19209289550781e-07,0.500000059604645,0.25,0.25,-0.499999970197678,-0.25,0.25,-0.499999970197678,0,0.25,-0.499999970197678,0.25,0.25,-0.499999970197678,0.25,1.19209289550781e-07,-0.499999970197678,0.25,-0.24999988079071,-0.594913899898529,0,0.594913899898529,-0.152911216020584,0,0.714658200740814,-0.594913899898529,-0.152911216020584,0.594913899898529,-0.152911216020584,-0.152911216020584,0.714658200740814,-0.594913899898529,0.594913899898529,7.29137497046395e-08,-0.152911216020584,0.714658200740814,7.29137497046395e-08,-0.594913899898529,0.594913899898529,0.152911216020584,-0.152911216020584,0.714658200740814,0.152911216020584,-0.594913899898529,0,-0.594913899898529,-0.152911216020584,0,-0.714658200740814,-0.594913899898529,0.152911216020584,-0.594913899898529,-0.152911216020584,0.152911216020584,-0.714658200740814,-0.594913899898529,-0.594913899898529,7.29137497046395e-08,-0.152911216020584,-0.714658200740814,7.29137497046395e-08,-0.594913899898529,-0.594913899898529,-0.152911216020584,-0.152911216020584,-0.714658200740814,-0.152911216020584,0.594913899898529,0,0.594913899898529,0.714658200740814,0,0.152911216020584,0.594913899898529,-0.152911216020584,0.594913899898529,0.714658200740814,-0.152911216020584,0.152911216020584,-0.714658200740814,0,-0.152911216020584,-0.594913899898529,-0.152911216020584,-0.594913899898529, --0.714658200740814,-0.152911216020584,-0.152911216020584,8.62321627254444e-17,-0.594913899898529,0.594913899898529,8.62321627254444e-17,-0.152911216020584,0.714658200740814,0.152911230921745,-0.594913899898529,0.594913899898529,0.152911230921745,-0.152911216020584,0.714658200740814,0.152911230921745,0,0.714658200740814,0.594913899898529,0.152911216020584,0.594913899898529,0.152911230921745,0.152911216020584,0.714658200740814,8.62321627254444e-17,0.594913899898529,0.594913899898529,8.62321627254444e-17,0.152911216020584,0.714658200740814,-0.152911216020584,0.594913899898529,0.594913899898529,-0.152911216020584,0.152911216020584,0.714658200740814,8.62321627254444e-17,0.714658200740814,0.152911216020584,0.152911230921745,0.594913899898529,0.594913899898529,0.152911230921745,0.714658200740814,0.152911216020584,0.594913899898529,0.594913899898529,7.29137497046395e-08,0.152911230921745,0.714658200740814,7.29137497046395e-08,0.594913899898529,0.594913899898529,-0.152911216020584,0.152911230921745,0.714658200740814,-0.152911216020584,8.62321627254444e-17,0.594913899898529,-0.594913899898529,8.62321627254444e-17,0.714658200740814,-0.152911216020584,-0.152911216020584,0.594913899898529,-0.594913899898529,-0.152911216020584,0.714658200740814,-0.152911216020584,8.62321627254444e-17,0.152911216020584,-0.714658200740814,0.152911230921745,0.594913899898529,-0.594913899898529,0.152911230921745,0.152911216020584,-0.714658200740814,0.594913899898529,0,-0.594913899898529,0.152911230921745,0,-0.714658200740814,0.594913899898529,-0.152911216020584,-0.594913899898529,0.152911230921745,-0.152911216020584,-0.714658200740814,8.62321627254444e-17,-0.594913899898529,-0.594913899898529,8.62321627254444e-17,-0.152911216020584,-0.714658200740814,-0.152911216020584,-0.594913899898529,-0.594913899898529,-0.152911216020584,-0.152911216020584,-0.714658200740814,8.62321627254444e-17,-0.714658200740814,-0.152911216020584,0.152911230921745,-0.594913899898529,-0.594913899898529,0.152911230921745,-0.714658200740814,-0.152911216020584,0.594913899898529,-0.594913899898529,7.29137497046395e-08, -0.152911230921745,-0.714658200740814,7.29137497046395e-08,0.594913899898529,-0.594913899898529,0.152911216020584,0.152911230921745,-0.714658200740814,0.152911216020584,8.62321627254444e-17,-0.714658200740814,0.152911216020584,-0.152911216020584,-0.594913899898529,0.594913899898529,-0.152911216020584,-0.714658200740814,0.152911216020584,0.714658200740814,-0.152911216020584,7.29137497046395e-08,0.594913899898529,-0.594913899898529,-0.152911216020584,0.714658200740814,-0.152911216020584,-0.152911216020584,0.714658200740814,0,-0.152911216020584,0.594913899898529,0.152911216020584,-0.594913899898529,0.714658200740814,0.152911216020584,-0.152911216020584,0.714658200740814,0.152911216020584,7.29137497046395e-08,0.594913899898529,0.594913899898529,0.152911216020584,0.714658200740814,0.152911216020584,0.152911216020584,-0.714658200740814,-0.152911216020584,7.29137497046395e-08,-0.594913899898529,-0.594913899898529,0.152911216020584,-0.714658200740814,-0.152911216020584,0.152911216020584,-0.714658200740814,0,0.152911216020584,-0.594913899898529,0.152911216020584,0.594913899898529,-0.714658200740814,0.152911216020584,0.152911216020584,-0.714658200740814,0.152911216020584,7.29137497046395e-08,-0.594913899898529,0.594913899898529,-0.152911216020584,-0.714658200740814,0.152911216020584,-0.152911216020584,-0.541863918304443,-0.541864037513733,0.541863918304443,8.62321627254444e-17,0,0.714658200740814,-0.541863918304443,0.541863918304443,0.541863918304443,8.62321627254444e-17,0.714658200740814,7.29137497046395e-08,-0.541863918304443,0.541863918304443,-0.541863799095154,8.62321627254444e-17,0,-0.714658200740814,-0.541863918304443,-0.541864037513733,-0.541863799095154,8.62321627254444e-17,-0.714658200740814,7.29137497046395e-08,0.541863977909088,-0.541864037513733,0.541863918304443,0.714658200740814,0,7.29137497046395e-08,-0.714658200740814,0,7.29137497046395e-08,0.541863977909088,0.541863918304443,0.541863918304443,0.541863977909088,0.541863918304443,-0.541863799095154,0.541863977909088,-0.541864037513733,-0.541863799095154 - } - PolygonVertexIndex: *768 { - a: 99,98,100,-102,103,102,104,-106,107,106,108,-110,111,110,112,-114,115,114,116,-118,118,106,119,-121,122,121,123,-125,125,114,126,-128,129,128,130,-132,132,128,133,-135,136,135,137,-139,140,139,141,-143,143,139,144,-146,147,146,148,-150,151,150,152,-154,154,150,155,-157,158,157,159,-161,161,121,162,-164,164,157,165,-167,167,146,168,-170,170,135,171,-173,173,110,174,-176,176,98,177,-179,179,102,180,-182,100,182,162,-102,162,121,122,-102,122,183,99,-102,104,184,130,-106,130,128,132,-106,132,185,103,-106,108,186,141,-110,141,139,143,-110,143,187,107,-110,112,188,152,-114,152,150,154,-114,154,189,111,-114,116,190,159,-118,159,157,164,-118,164,191,115,-118,119,188,112,-121,112,110,173,-121,173,192,118,-121,123,190,116,-125,116,114,125,-125,125,183,122,-125,126,193,133,-128,133,128,129,-128,129,183,125,-128,130,184,177,-132,177,98,99,-132,99,183,129,-132,133,193,171,-135,171,135,136,-135,136,185,132,-135,137,194,144,-139,144,139,140,-139,140,185,136,-139,141,186,180,-143,180,102,103,-143,103,185,140,-143,144,194,168,-146,168,146,147,-146,147,187,143,-146,148,195,155,-150,155,150,151,-150,151,187,147,-150,152,188,119,-154,119,106,107,-154,107,187,151,-154,155,195,165,-157,165,157,158,-157,158,189,154,-157,159,190,123,-161,123,121,161,-161,161,189,158,-161,162,182,174,-164,174,110,111,-164,111,189,161,-164,165,195,148,-167,148,146,167,-167,167,191,164,-167,168,194,137,-170,137,135,170,-170,170,191,167,-170,171,193,126,-173,126,114,115,-173,115,191,170,-173,174,182,100,-176,100,98,176,-176,176,192,173,-176,177,184,104,-179,104,102,179,-179,179,192,176,-179,180,186,108,-182,108,106,118,-182,118,192,179,-182,30,26,27,-13,35,31,32,-17,40,36,37,-21,45,41,42,-24,50,46,47,-11,54,51,52,-21,29,55,56,-10,57,58,59,-11,61,62,33,-12,34,64,60,-12,66,67,68,-15,70,71,38,-16,39,73,69,-16,75,76,77,-19,79,80,43,-20,44,81,78,-20,83,84,48,-23,85,86,28,-10,49,88,82,-23,89,90,74,-19,91,92,65,-15,53,93,87,-24,94,95,63,-13,96,97,72,-17,27,26,28,-1,28,26,29,-10,29,26,30,-9,32,31,33,-3,33,31,34,-12,34,31,35,-14,37,36,38,-5,38,36,39, --16,39,36,40,-18,42,41,43,-7,43,41,44,-20,44,41,45,-22,47,46,48,-2,48,46,49,-23,49,46,50,-25,52,51,42,-7,42,51,53,-24,53,51,54,-26,56,55,47,-2,47,55,57,-11,57,55,29,-9,59,58,60,-4,60,58,61,-12,61,58,57,-9,33,62,63,-3,63,62,30,-13,30,62,61,-9,60,64,65,-4,65,64,66,-15,66,64,34,-14,68,67,69,-6,69,67,70,-16,70,67,66,-14,38,71,72,-5,72,71,35,-17,35,71,70,-14,69,73,74,-6,74,73,75,-19,75,73,39,-18,77,76,78,-8,78,76,79,-20,79,76,75,-18,43,80,52,-7,52,80,40,-21,40,80,79,-18,78,81,82,-8,82,81,83,-23,83,81,44,-22,48,84,56,-2,56,84,85,-10,85,84,83,-22,28,86,87,-1,87,86,45,-24,45,86,85,-22,82,88,77,-8,77,88,89,-19,89,88,49,-25,74,90,68,-6,68,90,91,-15,91,90,89,-25,65,92,59,-4,59,92,50,-11,50,92,91,-25,87,93,27,-1,27,93,94,-13,94,93,53,-26,63,95,32,-3,32,95,96,-17,96,95,94,-26,72,97,37,-5,37,97,54,-21,54,97,96,-26 + Geometry: 7642320, "Geometry::planeMesh_1", "Mesh" { + Vertices: *12 { + a: -5,-5,0,5,-5,0,5,5,0,-5,5,0 } - Edges: *384 { - a: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,102,104,105,108,109,110,114,116,117,120,121,122,126,128,129,132,133,134,138,140,141,144,145,146,150,152,153,156,158,162,164,165,168,170,174,176,180,181,182,186,188,193,194,198,205,206,210,212,216,217,218,222,224,229,230,234,241,242,246,248,252,253,254,258,260,266,270,277,278,282,284,290,294,296,301,302,306,314,318,320,326,330,332,338,342,350,354,356,362,366,368,374,378,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,481,482,483,485,490,491,493,494,495,497,502,503,505,506,507,509,514,515,517,518,519,521,526,527,529,530,531,533,538,539,541,543,545,550,551,553,555,557,563,565,566,567,569,575,577,578,581,589,590,593,599,601,602,603,605,611,613,614,617,625,626,629,635,637,638,639,641,647,649,653,661,662,665,671,673,677,683,685,686,689,697,701,707,709,713,719,721,725,733,737,743,745,749,755,757,761 + PolygonVertexIndex: *4 { + a: 0,1,2,-4 } GeometryVersion: 124 LayerElementNormal: 0 { Version: 102 - Name: "" - MappingInformationType: "ByPolygonVertex" + Name: "normals" + MappingInformationType: "ByVertice" ReferenceInformationType: "Direct" - Normals: *2304 { - a: -0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.26148721575737,0.965207040309906,0,-0.26148721575737,0.965207040309906,0,-0.26148721575737,0.965207040309906,0,-0.26148721575737,0.965207040309906,0,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.965207040309906,0.261487185955048,0,0.965207040309906,0.261487185955048,0,0.965207040309906,0.261487185955048,0,0.965207040309906,0.261487185955048,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0.261487126350403,0,-0.965206980705261, -0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.965207040309906,-0.261487185955048,0,-0.965207040309906,-0.261487185955048,0,-0.965207040309906,-0.261487185955048,0,-0.965207040309906,-0.261487185955048,0.26148721575737,-0.965207040309906,0,0.26148721575737,-0.965207040309906,0,0.26148721575737,-0.965207040309906,0,0.26148721575737,-0.965207040309906,0,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0.965206980705261,-0.261487066745758,0,0.965206980705261,-0.261487066745758,0,0.965206980705261,-0.261487066745758,0,0.965206980705261,-0.261487066745758,0,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0.261487066745758,0,-0.965206980705261,0.261487066745758,0,-0.965206980705261,0.261487066745758,0,-0.965206980705261,0.261487066745758,0,-0.211917281150818,-0.211917445063591,0.954034626483917,0,0,1,-0.211917281150818,-0.21191743016243,0.954034626483917,-0.211917266249657,-0.211917445063591,0.954034626483917,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,-0.211917445063591,0.954034626483917,0.211917281150818, -0,1,0,-0.211917445063591,0.954034626483917,0.211917281150818,-0.211917445063591,0.954034626483917,0.211917266249657,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,1,0,0,1,0,0,1,0,0,1,0,-0.211917623877525,0.211917608976364,-0.954034626483917,0,0,-1,-0.211917623877525,0.211917608976364,-0.954034626483917,-0.211917623877525,0.211917594075203,-0.954034626483917,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.211917355656624,-0.954034745693207,-0.211917355656624,0,-1,0,-0.211917325854301,-0.954034686088562,-0.211917325854301,-0.211917355656624,-0.954034686088562,-0.211917355656624,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0.954034745693207,-0.211917281150818,0.211917340755463,1,0,0,0.954034745693207,-0.211917281150818,0.211917370557785,0.954034626483917,-0.211917236447334,0.211917296051979,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,1,0,0,1,0,0,1,0,0,1,0,0,-0.954034686088562,-0.211917355656624,-0.211917459964752,-1,0,0,-0.954034626483917,-0.211917325854301,-0.211917445063591,-0.954034686088562,-0.211917355656624,-0.211917474865913,-0.965206980705261,-0.261487066745758,0,-0.965206980705261,-0.261487066745758,0,-0.965206980705261,-0.261487066745758,0,-0.965206980705261,-0.261487066745758,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0.211917281150818,-0.211917400360107,0.954034626483917,0,0,1,0.211917266249657,-0.211917415261269,0.954034626483917,0.211917266249657,-0.211917415261269,0.954034626483917,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261,0.261487126350403,0,0.965206980705261, -0,0,1,0,0,1,0,0,1,0,0,1,0.211917296051979,0.211917415261269,0.954034626483917,0,0,1,0.211917296051979,0.211917415261269,0.954034626483917,0.211917281150818,0.211917415261269,0.954034626483917,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0.261487185955048,0.965207040309906,0,0,1,0,0,1,0,0,1,0,0,1,-0.211917281150818,0.211917445063591,0.954034626483917,0,0,1,-0.211917281150818,0.211917445063591,0.954034626483917,-0.211917266249657,0.211917445063591,0.954034626483917,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,-0.261487126350403,0,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,0.211917445063591,0.954034626483917,0.211917445063591,0,1,0,0.211917445063591,0.954034686088562,0.211917445063591,0.211917445063591,0.954034626483917,0.211917445063591,0.26148721575737,0.965207040309906,0,0.26148721575737,0.965207040309906,0,0.26148721575737,0.965207040309906,0,0.26148721575737,0.965207040309906,0,0,1,0,0,1,0,0,1,0,0,1,0,0.211917445063591,0.954034626483917,-0.211917489767075,0,1,0,0.211917459964752,0.954034686088562,-0.211917519569397,0.211917474865913,0.954034686088562,-0.211917504668236,0,0.965207040309906,-0.261487185955048,0,0.965207040309906,-0.261487185955048,0,0.965207040309906,-0.261487185955048,0,0.965207040309906,-0.261487185955048,0,1,0,0,1,0,0,1,0,0,1,0,-0.211917459964752,0.954034686088562,-0.211917340755463,0,1,0,-0.211917445063591,0.954034626483917,-0.21191731095314,-0.211917489767075,0.954034686088562,-0.211917355656624,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,-0.261487185955048,0.965207040309906,0,0,1,0,0,1,0,0,1,0,0,1,0,0.211917638778687,0.211917608976364,-0.954034626483917,0,0,-1,0.211917608976364,0.211917564272881,-0.954034566879272,0.211917623877525,0.211917608976364,-0.954034626483917,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261, -0.261487126350403,0,-0.965206980705261,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0.211917608976364,-0.211917564272881,-0.954034626483917,0,0,-1,0.211917623877525,-0.211917579174042,-0.954034626483917,0.211917623877525,-0.211917549371719,-0.954034626483917,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,-0.261487185955048,-0.965207040309906,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.211917623877525,-0.211917579174042,-0.954034626483917,0,0,-1,-0.211917579174042,-0.211917534470558,-0.954034566879272,-0.211917623877525,-0.211917549371719,-0.954034626483917,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,-0.261487126350403,0,-0.965206980705261,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0.211917340755463,-0.954034686088562,-0.211917519569397,0,-1,0,0.211917325854301,-0.954034626483917,-0.211917489767075,0.211917325854301,-0.954034686088562,-0.211917489767075,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0.261487185955048,-0.965207040309906,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0.211917281150818,-0.954034626483917,0.211917445063591,0,-1,0,0.211917296051979,-0.954034626483917,0.211917445063591,0.211917266249657,-0.954034626483917,0.211917445063591,0,-0.965207040309906,0.261487185955048,0,-0.965207040309906,0.261487185955048,0,-0.965207040309906,0.261487185955048,0,-0.965207040309906,0.261487185955048,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-0.211917325854301,-0.954034745693207,0.211917325854301,0,-1,0,-0.211917325854301,-0.954034745693207,0.211917325854301,-0.211917281150818,-0.954034686088562,0.211917281150818,-0.26148721575737,-0.965207040309906,0,-0.26148721575737,-0.965207040309906,0,-0.26148721575737,-0.965207040309906,0,-0.26148721575737,-0.965207040309906,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0.954034626483917,-0.211917325854301,-0.211917400360107,1,0,0,0.954034686088562,-0.211917340755463,-0.211917400360107,0.954034686088562,-0.211917355656624,-0.21191743016243,0.965206980705261,0,-0.261487185955048, -0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,0.965206980705261,0,-0.261487185955048,1,0,0,1,0,0,1,0,0,1,0,0,0.954034686088562,0.211917370557785,-0.211917489767075,1,0,0,0.954034686088562,0.211917355656624,-0.211917445063591,0.954034626483917,0.211917355656624,-0.211917445063591,0.965206980705261,0.261487066745758,0,0.965206980705261,0.261487066745758,0,0.965206980705261,0.261487066745758,0,0.965206980705261,0.261487066745758,0,1,0,0,1,0,0,1,0,0,1,0,0,0.954034626483917,0.211917296051979,0.211917385458946,1,0,0,0.954034626483917,0.211917296051979,0.211917385458946,0.954034745693207,0.211917296051979,0.211917385458946,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,0.965206980705261,0,0.261487185955048,1,0,0,1,0,0,1,0,0,1,0,0,-0.954034626483917,-0.211917251348495,0.211917400360107,-1,0,0,-0.954034626483917,-0.211917266249657,0.211917400360107,-0.954034626483917,-0.211917251348495,0.211917400360107,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-0.965206980705261,0,0.261487185955048,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-0.954034626483917,0.211917281150818,0.211917445063591,-1,0,0,-0.954034626483917,0.211917281150818,0.211917445063591,-0.954034626483917,0.211917266249657,0.211917445063591,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-0.965206980705261,0.261487126350403,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-0.954034686088562,0.211917385458946,-0.211917549371719,-1,0,0,-0.954034686088562,0.211917370557785,-0.211917534470558,-0.954034626483917,0.211917355656624,-0.211917504668236,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-0.965206980705261,0,-0.261487185955048,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0, -1,0,0,1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - } - LayerElementBinormal: 0 { - Version: 102 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Binormals: *2304 { - a: 0,1,0,0,1,0,0,1,0,0,1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0,-1,0,-0,-1,0,-0,-1,0,-0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0.965206921100616,0.261487156152725,0,0.965206921100616,0.261487156152725,0,0.965206921100616,0.261487156152725,0,0.965206921100616,0.261487156152725,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,0.965206980705261,-0.261487185955048,0,0.965206980705261,-0.261487185955048,0,0.965206980705261,-0.261487185955048,0,0.965206980705261,-0.261487185955048,0,0.261487156152725,-0.965206921100616,0,0.261487156152725,-0.965206921100616,0,0.261487156152725,-0.965206921100616,0,0.261487156152725,-0.965206921100616,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-0.261487126350403,-0.965206980705261,0,-0.261487126350403,-0.965206980705261,0,-0.261487126350403,-0.965206980705261,0,-0.261487126350403,-0.965206980705261,0,-0.965206921100616,-0.261487156152725,0,-0.965206921100616,-0.261487156152725,0,-0.965206921100616,-0.261487156152725,0,-0.965206921100616,-0.261487156152725,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-0.965206980705261,0.261487185955048,0,-0.965206980705261,0.261487185955048,0,-0.965206980705261,0.261487185955048,0,-0.965206980705261,0.261487185955048,0,-0.261487156152725,0.965206921100616,0,-0.261487156152725,0.965206921100616,0,-0.261487156152725,0.965206921100616,0,-0.261487156152725,0.965206921100616,0,0,1,0,0,1,0,0,1,0,0,1,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,0,1,0,0,1,0,0,1,0, -0,1,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,0.261487066745758,0.965206980705261,0,-0.0554696954786777,0.977241098880768,0.204750895500183,0.0677256807684898,0.997704029083252,-0,0.0995207726955414,0.966452240943909,0.236782029271126,0.022095151245594,0.974918127059937,0.221464186906815,0,0.965206980705261,0.261487185955048,0,0.965206980705261,0.261487185955048,0,0.965206980705261,0.261487185955048,0,0.965206980705261,0.261487185955048,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0.0554696545004845,0.204750746488571,-0.977241158485413,0.0677258297801018,0,-0.997703969478607,0.0995210781693459,0.23678195476532,-0.966452240943909,0.0220953319221735,0.221464082598686,-0.974918246269226,0,0.261487126350403,-0.965206980705261,0,0.261487126350403,-0.965206980705261,0,0.261487126350403,-0.965206980705261,0,0.261487126350403,-0.965206980705261,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.0554697290062904,-0.977241039276123,-0.204751029610634,0.0677258297801018,-0.997703969478607,0,0.0995209515094757,-0.966452121734619,-0.236782252788544,0.0220952276140451,-0.974918127059937,-0.221464350819588,0,-0.965206980705261,-0.261487185955048,0,-0.965206980705261,-0.261487185955048,0,-0.965206980705261,-0.261487185955048,0,-0.965206980705261,-0.261487185955048,0,-1,-0,0,-1,-0,0,-1,-0,0,-1,-0,-0.0554696619510651,-0.204750776290894,0.977241098880768,0.0677259787917137,0,0.997703969478607,0.0995214134454727,-0.236782014369965,0.966452121734619,0.0220954976975918,-0.221464157104492,0.974918186664581,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,0.20475073158741,0.977241218090057,0.0554696507751942,0,0.997704029083252,-0.0677256807684898,0.236781880259514,0.966452300548553,-0.0995208472013474,0.221463993191719,0.974918186664581,-0.0220952145755291,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0, --0,1,0,-0,1,0,-0,1,0,-0,1,0,-0.204750791192055,0.977241098880768,-0.0554696619510651,0,0.997704029083252,0.0677257031202316,-0.236781939864159,0.966452240943909,0.099520817399025,-0.221464112401009,0.974918246269226,0.022095188498497,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,0,-0.099520780146122,0.966452240943909,0.236781999468803,-0.0677256733179092,0.997704029083252,0,0.0554696880280972,0.977241098880768,0.204750865697861,-0.022095151245594,0.974918127059937,0.221464157104492,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0.0554696880280972,0.977241098880768,-0.204750865697861,0.0677258223295212,0.997703969478607,-0,0.0995210558176041,0.966452181339264,-0.236782059073448,0.0220952890813351,0.974918246269226,-0.221464201807976,0,0.965206921100616,-0.261487156152725,0,0.965206921100616,-0.261487156152725,0,0.965206921100616,-0.261487156152725,0,0.965206921100616,-0.261487156152725,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0.0995210707187653,0.966452240943909,-0.236782118678093,-0.0677258297801018,0.997703969478607,0,0.0554696954786777,0.977241098880768,-0.204750895500183,-0.0220952928066254,0.974918186664581,-0.221464231610298,0,1,0,0,1,0,0,1,0,0,1,0,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0.0995210558176041,0.236782118678093,-0.966452240943909,-0.0677258223295212,0,-0.997703969478607,0.0554696880280972,0.204750880599022,-0.977241098880768,-0.0220952853560448,0.221464216709137,-0.974918127059937,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.0554697066545486,-0.204750955104828,-0.977241158485413,0.0677259713411331,0,-0.997703969478607,0.0995213389396667,-0.236782237887383,-0.966452181339264,0.0220954176038504,-0.221464291214943,-0.974918127059937,0,-0.261487156152725,-0.965206921100616,0,-0.261487156152725,-0.965206921100616,0,-0.261487156152725,-0.965206921100616,0,-0.261487156152725,-0.965206921100616,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.0995213687419891,-0.236782059073448,-0.966452181339264, --0.0677259787917137,0,-0.997703969478607,0.0554696545004845,-0.204750776290894,-0.977241158485413,-0.0220954604446888,-0.221464172005653,-0.974918246269226,0,0,-1,0,0,-1,-0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.0995209366083145,-0.966452121734619,-0.236782252788544,-0.0677258223295212,-0.997703969478607,-0,0.0554697290062904,-0.977241098880768,-0.204751014709473,-0.0220952201634645,-0.974918127059937,-0.221464365720749,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0,0,-1,-0,0,-1,-0,0,-1,-0,-0.0554697252810001,-0.977241158485413,0.204751014709473,0.0677256733179092,-0.997704029083252,0,0.099520668387413,-0.966452181339264,0.236782178282738,0.0220950860530138,-0.974918127059937,0.221464276313782,0,-0.965206921100616,0.261487156152725,0,-0.965206921100616,0.261487156152725,0,-0.965206921100616,0.261487156152725,0,-0.965206921100616,0.261487156152725,0,-1,0,0,-1,0,0,-1,-0,0,-1,0,-0.0995206832885742,-0.966452181339264,0.236782178282738,-0.0677256807684898,-0.997704029083252,-0,0.0554697178304195,-0.977241098880768,0.20475098490715,-0.0220950935035944,-0.974918127059937,0.221464276313782,0,-1,-0,0,-1,-0,-0,-1,0,0,-1,-0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-0.0995213836431503,-0.23678220808506,0.966452121734619,-0.0677259713411331,0,0.997703969478607,0.0554697066545486,-0.204750940203667,0.977241098880768,-0.0220954623073339,-0.221464291214943,0.974918186664581,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,-0.0554696954786777,0.204750895500183,0.977241098880768,0.0677258223295212,0,0.997703969478607,0.0995211154222488,0.236782103776932,0.966452181339264,0.0220953226089478,0.221464246511459,0.974918186664581,0,0.261487156152725,0.965206921100616,0,0.261487156152725,0.965206921100616,0,0.261487156152725,0.965206921100616,0,0.261487156152725,0.965206921100616,0,0,1,0,0,1,0,0,1,0,0,1,-0.0995211452245712,0.23678195476532,0.966452181339264,-0.0677258297801018,0,0.997703969478607,0.0554696656763554,0.204750776290894,0.977241218090057,-0.022095363587141,0.221464082598686,0.974918246269226,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0.236781939864159,0.966452240943909,0.0995208621025085, --0,0.997704029083252,0.0677257031202316,0.204750806093216,0.977241158485413,-0.0554696656763554,0.221464112401009,0.974918186664581,0.0220951996743679,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0.204750806093216,0.977241098880768,0.0554696694016457,0,0.997703969478607,-0.0677258521318436,-0.236782044172287,0.966452240943909,-0.0995211452245712,-0.221464172005653,0.974918246269226,-0.0220953542739153,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,-0.261487066745758,0.965206980705261,0,0,1,-0,-0,1,0,-0,1,0,-0,1,0,-0.236781984567642,0.966452300548553,0.09952113032341,-0,0.997703969478607,0.0677258297801018,-0.204750761389732,0.977241158485413,-0.0554696582257748,-0.221464067697525,0.974918246269226,0.0220953486859798,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,0,1,-0,-0,1,0,-0.236781880259514,0.966452360153198,-0.0995208248496056,0,0.997704029083252,-0.0677256807684898,-0.20475073158741,0.977241158485413,0.0554696470499039,-0.221464022994041,0.974918246269226,-0.0220951903611422,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0.204750746488571,0.977241158485413,-0.0554696545004845,0,0.997703969478607,0.0677258297801018,0.23678195476532,0.966452240943909,0.0995210781693459,0.221464082598686,0.974918246269226,0.0220953319221735,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0,1,0,0,1,0,0,1,0,0,1,0,0.236782073974609,0.966452240943909,-0.0995211005210876,0,0.997703969478607,-0.0677258521318436,0.204750806093216,0.977241098880768,0.0554696656763554,0.221464142203331,0.974918186664581,-0.0220953188836575,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,-0,-1,0,-0,-1,0,-0,-1,0,-0,-1,-0,-1,0,-0,-1,-0,-0,-1,-0,-0,-1,-0,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,-0,-0,1,-0,-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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 - } - - } - LayerElementTangent: 0 { - Version: 102 - Name: "map1" - MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "Direct" - Tangents: *2304 { - a: 0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965207040309906,0.26148721575737,0,0.965207040309906,0.26148721575737,0,0.965207040309906,0.26148721575737,0,0.965207040309906,0.26148721575737,0,0.965206980705261,-0,-0.261487126350403,0.965206980705261,-0,-0.261487126350403,0.965206980705261,-0,-0.261487126350403,0.965206980705261,-0,-0.261487126350403,0.965206980705261,-0.261487156152725,-0,0.965206980705261,-0.261487156152725,-0,0.965206980705261,-0.261487156152725,-0,0.965206980705261,-0.261487156152725,-0,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,0,1,-0,0,1,-0,-0,1,-0,0,0.965206980705261,-0.261487156152725,0,0.965206980705261,-0.261487156152725,0,0.965206980705261,-0.261487156152725,0,0.965206980705261,-0.261487156152725,0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,-0,0,1,0,0,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,-0,0,-1,-0,0,-1,-0,0,-1,-0,0,-1,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,0.26148721575737,-0,0.965207040309906, -0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0.97571212053299,0.00952975451946259,0.218849271535873,0.997704029083252,-0.0677256807684898,0,0.972207129001617,-0.145124465227127,0.183717742562294,0.977037787437439,-0.0680116266012192,0.201919630169868,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,0.97571212053299,0.218849420547485,-0.0095297135412693,0.997703969478607,0,0.0677258297801018,0.972207069396973,0.183717846870422,0.145124778151512,0.977037727832794,0.20191977918148,0.0680118054151535,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,0.975712060928345,-0.00952969118952751,-0.218849584460258,0.997703969478607,0.0677258297801018,0,0.972207009792328,0.145124763250351,-0.183717995882034,0.977037727832794,0.0680118054151535,-0.201919928193092,1,0,0,1,0,0,1,0,0,1,0,0,1,-0,0,1,-0,0,1,-0,0,1,-0,0,0.97571212053299,-0.218849301338196,0.00952974148094654,0.997703969478607,0,-0.0677259787917137,0.972207069396973,-0.183717638254166,-0.145125105977058,0.977037727832794,-0.201919630169868,-0.068011961877346,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0.218849286437035,0.00952974148094654,-0.97571212053299,0,-0.0677256807684898,-0.997704029083252,0.183717831969261,-0.145124509930611,-0.972207069396973,0.201919674873352,-0.0680116564035416,-0.977037787437439,-0,0,-1,-0,0,-1,-0,0,-1,-0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.218849420547485,0.0095297172665596,0.97571212053299,0,-0.0677257031202316,0.997704029083252,-0.183717906475067,-0.145124524831772,0.972207069396973,-0.201919823884964,-0.068011686205864,0.977037727832794,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0.972207129001617,0.145124465227127,-0.183717742562294,0.997704029083252,0.0677256733179092,0,0.97571212053299,-0.00952975824475288,-0.218849256634712,0.977037787437439,0.0680116191506386,-0.201919630169868,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403, -1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,0.97571212053299,0.00952975172549486,-0.218849286437035,0.997703969478607,-0.0677258223295212,0,0.972207069396973,-0.14512474834919,-0.183717682957649,0.977037847042084,-0.0680117681622505,-0.20191964507103,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,0,1,-0,0,1,-0,-0,1,-0,0,0.972207069396973,0.14512474834919,0.183717668056488,0.997703969478607,0.0677258297801018,0,0.97571212053299,-0.00952975451946259,0.218849271535873,0.977037847042084,0.0680117756128311,0.201919630169868,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,0.965206980705261,-0,0.261487126350403,1,-0,-0,1,-0,0,1,-0,0,1,-0,0,0.972207069396973,-0.183717831969261,-0.145124778151512,0.997703969478607,0,-0.0677258223295212,0.97571212053299,-0.218849405646324,0.00952972564846277,0.977037727832794,-0.20191977918148,-0.0680117979645729,0.965207040309906,-0.26148721575737,-0,0.965207040309906,-0.26148721575737,-0,0.965207040309906,-0.26148721575737,-0,0.965207040309906,-0.26148721575737,-0,1,-0,-0,1,-0,-0,1,-0,-0,1,-0,-0,0.97571212053299,-0.218849420547485,-0.0095297247171402,0.997703969478607,0,0.0677259713411331,0.972207009792328,-0.183717757463455,0.145125061273575,0.977037727832794,-0.201919749379158,0.0680119395256042,1,-0,0,1,-0,0,1,-0,0,1,-0,0,1,0,0,1,0,0,1,-0,-0,1,0,0,0.972207009792328,0.183717772364616,-0.145125061273575,0.997703969478607,0,-0.0677259787917137,0.97571212053299,0.218849420547485,0.00952971447259188,0.977037727832794,0.20191977918148,-0.0680119544267654,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,-0,0.965206980705261,0.261487156152725,0,1,-0,0,1,0,0,1,0,0,1,0,0,0.972207009792328,-0.14512474834919,0.183718010783195,0.997703969478607,-0.0677258223295212,0,0.975712060928345,0.00952969118952751,0.218849584460258,0.977037727832794,-0.0680117979645729,0.201919928193092,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403,0.965206980705261,0,0.261487126350403, -1,-0,0,1,-0,0,1,-0,0,1,-0,0,0.975712060928345,-0.00952969398349524,0.218849569559097,0.997704029083252,0.0677256733179092,0,0.972207069396973,0.145124465227127,0.18371807038784,0.977037727832794,0.0680116564035416,0.201919972896576,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,-0,0,1,0,0,0.972207069396973,-0.145124480128288,-0.183718055486679,0.997704029083252,-0.0677256807684898,0,0.975712060928345,0.00952969398349524,-0.218849569559097,0.977037727832794,-0.0680116638541222,-0.201919972896576,0.965206980705261,0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,0.965206980705261,-0,-0.261487126350403,0.965206980705261,0,-0.261487126350403,1,0,0,1,0,0,1,0,0,1,0,0,0.972207069396973,0.183717623353004,0.145125105977058,0.997703969478607,0,0.0677259713411331,0.97571212053299,0.218849316239357,-0.00952974893152714,0.977037847042084,0.201919630169868,0.0680119544267654,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,0,0.965206980705261,0.261487156152725,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0.97571212053299,0.218849271535873,0.00952975638210773,0.997703969478607,0,-0.0677258223295212,0.972207069396973,0.183717668056488,-0.145124807953835,0.977037847042084,0.201919630169868,-0.0680118054151535,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,0.972207069396973,-0.18371769785881,0.145124822854996,0.997703969478607,0,0.0677258297801018,0.97571212053299,-0.218849286437035,-0.00952974613755941,0.977037847042084,-0.201919630169868,0.0680118054151535,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,-0.183717846870422,0.145124554634094,-0.972207069396973,0,0.0677257031202316,-0.997704029083252,-0.218849360942841,-0.0095297284424305,-0.97571212053299,-0.20191977918148,0.068011686205864,-0.977037727832794,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906,-0.26148721575737,-0,-0.965207040309906, -0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0.218849450349808,0.00952971167862415,-0.97571212053299,0,-0.0677258521318436,-0.997703969478607,-0.1837178170681,-0.145124852657318,-0.972207069396973,-0.201919764280319,-0.0680118426680565,-0.977037727832794,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0,0,-1,0,0,-1,0.183717772364616,0.145124807953835,-0.972207069396973,0,0.0677258297801018,-0.997703969478607,0.218849375844002,-0.00952972657978535,-0.97571212053299,0.201919689774513,0.0680118054151535,-0.977037727832794,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0.26148721575737,0,-0.965207040309906,0,0,-1,0,0,-1,0,-0,-1,0,0,-1,0.183717876672745,0.145124495029449,0.972207069396973,0,0.0677256807684898,0.997704029083252,0.218849375844002,-0.00952972192317247,0.97571212053299,0.20191977918148,0.0680116564035416,0.977037727832794,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0.26148721575737,-0,0.965207040309906,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0.218849420547485,0.0095297135412693,0.97571212053299,0,-0.0677258297801018,0.997703969478607,0.183717846870422,-0.145124778151512,0.972207069396973,0.20191977918148,-0.0680118054151535,0.977037727832794,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,0,-0,1,-0.183717921376228,0.145124837756157,0.972207009792328,0,0.0677258521318436,0.997703969478607,-0.21884948015213,-0.00952970236539841,0.97571212053299,-0.201919838786125,0.0680118277668953,0.977037727832794,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,-0.26148721575737,0,0.965207040309906,0,-0,1,0,-0,1,0,-0,1,0,-0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,-0,1,0,0,1,0,0,1,0,0,1,-0,-0,1,0,0,1,0,0,1,0,0,1,-0,0,1,0,0,1,0,0,1,0,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,-0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + NormalsW: *4 { + a: 0,0,0,0 } } LayerElementUV: 0 { Version: 101 - Name: "map1" + Name: "diffuseUV" MappingInformationType: "ByPolygonVertex" - ReferenceInformationType: "IndexToDirect" - UV: *542 { - a: 0.375,0,0.625,0,0.375,0.25,0.625,0.25,0.375,0.5,0.625,0.5,0.375,0.75,0.625,0.75,0.375,1,0.625,1,0.875,0,0.875,0.25,0.125,0,0.125,0.25,0.5,0.125,0.5,0,0.5,1,0.625,0.125,0.5,0.25,0.375,0.125,0.5,0.375,0.625,0.375,0.75,0.25,0.5,0.5,0.375,0.375,0.25,0.25,0.5,0.625,0.625,0.625,0.875,0.125,0.5,0.75,0.375,0.625,0.125,0.125,0.5,0.875,0.625,0.875,0.75,0,0.5,1,0.375,0.875,0.25,0,0.75,0.125,0.75,0,0.875,0.125,0.75,0.25,0.25,0.125,0.25,0,0.25,0.25,0.125,0.125,0.4375,0.0625,0.375,0.0625,0.4375,0,0.4375,1,0.5,0.0625,0.4375,0.125,0.4375,0.3125,0.375,0.3125,0.3125,0.25,0.4375,0.25,0.5,0.3125,0.4375,0.375,0.4375,0.5625,0.375,0.5625,0.125,0.1875,0.4375,0.5,0.5,0.5625,0.4375,0.625,0.4375,0.8125,0.375,0.8125,0.1875,0,0.4375,0.75,0.5,0.8125,0.4375,0.875,0.6875,0.0625,0.625,0.0625,0.625,0.9375,0.6875,0,0.75,0.0625,0.6875,0.125,0.1875,0.0625,0.375,0.6875,0.125,0.0625,0.1875,0,0.25,0.0625,0.1875,0.125,0.5625,0.0625,0.5625,0,0.5625,1,0.5625,0.125,0.5625,0.1875,0.625,0.1875,0.5625,0.25,0.5,0.1875,0.4375,0.1875,0.375,0.1875,0.5625,0.3125,0.625,0.3125,0.6875,0.25,0.5625,0.375,0.5625,0.4375,0.625,0.4375,0.8125,0.25,0.5625,0.5,0.5,0.4375,0.4375,0.4375,0.375,0.4375,0.1875,0.25,0.5625,0.5625,0.625,0.5625,0.875,0.1875,0.5625,0.625,0.5625,0.6875,0.625,0.6875,0.875,0.0625,0.5625,0.75,0.5,0.6875,0.4375,0.6875,0.375,0.6875,0.5625,0.8125,0.625,0.8125,0.8125,0,0.5625,0.875,0.5625,0.9375,0.625,0.9375,0.5625,1,0.5,0.9375,0.4375,0.9375,0.4375,1,0.375,0.9375,0.3125,0,0.8125,0.0625,0.8125,0,0.875,0.0625,0.8125,0.125,0.8125,0.1875,0.875,0.1875,0.8125,0.25,0.75,0.1875,0.6875,0.1875,0.6875,0.25,0.3125,0.0625,0.3125,0,0.3125,0.125,0.3125,0.1875,0.3125,0.25,0.25,0.1875,0.1875,0.1875,0.1875,0.25,0.125,0.1875,0.4375,0.125,0.375,0.125,0.375,0.0625,0.4375,0.0625,0.4375,0.375,0.375,0.375,0.375,0.3125,0.4375,0.3125,0.4375,0.625,0.375,0.625,0.375,0.5625,0.4375,0.5625,0.4375,0.875,0.375,0.875,0.375,0.8125,0.4375,0.8125,0.6875,0.125,0.625,0.125,0.625,0.0625,0.6875,0.0625,0.1875,0.125,0.125,0.125,0.125,0.0625,0.1875,0.0625,0.5,0.0625,0.5,0,0.5625,0, -0.5625,0.0625,0.5625,0.125,0.625,0.1875,0.5625,0.1875,0.5,0.1875,0.5,0.25,0.4375,0.25,0.4375,0.1875,0.5,0.3125,0.5625,0.25,0.5625,0.3125,0.5625,0.375,0.625,0.375,0.625,0.4375,0.5625,0.4375,0.5,0.4375,0.5,0.5,0.4375,0.5,0.4375,0.4375,0.5,0.5625,0.5625,0.5,0.5625,0.5625,0.5625,0.625,0.625,0.625,0.625,0.6875,0.5625,0.6875,0.5,0.6875,0.5,0.75,0.4375,0.75,0.4375,0.6875,0.5,0.8125,0.5625,0.75,0.5625,0.8125,0.5625,0.875,0.625,0.875,0.625,0.9375,0.5625,0.9375,0.5,0.9375,0.5,1,0.4375,1,0.4375,0.9375,0.75,0.0625,0.75,0,0.8125,0,0.8125,0.0625,0.8125,0.125,0.875,0.125,0.875,0.1875,0.8125,0.1875,0.75,0.1875,0.75,0.25,0.6875,0.25,0.6875,0.1875,0.25,0.0625,0.25,0,0.3125,0,0.3125,0.0625,0.3125,0.125,0.375,0.1875,0.3125,0.1875,0.25,0.1875,0.25,0.25,0.1875,0.25,0.1875,0.1875,0.375,0,0.4375,0,0.5,0.125,0.375,0.25,0.5,0.375,0.375,0.5,0.5,0.625,0.375,0.75,0.5,0.875,0.625,0,0.6875,0,0.75,0.125,0.125,0,0.1875,0,0.25,0.125,0.625,0.25,0.625,0.3125,0.625,0.5,0.375,0.4375,0.625,0.5625,0.625,0.75,0.375,0.6875,0.625,0.8125,0.625,1,0.5625,1,0.375,1,0.375,0.9375,0.875,0,0.875,0.0625,0.875,0.25,0.8125,0.25,0.3125,0.25,0.125,0.25,0.125,0.1875 - } - UVIndex: *768 { - a: 51,19,47,46,57,24,53,52,63,30,59,58,69,36,65,64,75,17,71,70,81,45,78,76,50,15,83,82,85,17,87,86,89,18,55,90,56,18,88,92,95,21,97,96,100,23,61,101,62,23,99,104,107,27,109,108,112,29,67,113,68,29,111,115,118,33,120,119,122,35,124,123,74,39,128,127,130,40,132,131,134,41,136,135,80,43,138,137,139,19,91,140,142,44,144,143,47,0,48,46,48,15,50,46,50,14,51,46,53,2,55,52,55,18,56,52,56,20,57,52,59,4,61,58,61,23,62,58,62,26,63,58,65,6,67,64,67,29,68,64,68,32,69,64,71,1,73,70,73,39,74,70,74,38,75,70,78,12,79,76,79,43,80,76,80,42,81,76,83,1,71,82,71,17,85,82,85,14,50,82,87,3,88,86,88,18,89,86,89,14,85,86,55,2,91,90,91,19,51,90,51,14,89,90,88,3,93,92,93,21,95,92,95,20,56,92,97,5,99,96,99,23,100,96,100,20,95,96,61,4,102,101,102,24,57,101,57,20,100,101,99,5,105,104,105,27,107,104,107,26,62,104,109,7,111,108,111,29,112,108,112,26,107,108,67,6,114,113,114,30,63,113,63,26,112,113,111,7,116,115,116,33,118,115,118,32,68,115,120,9,121,119,121,35,122,119,122,32,118,119,124,8,125,123,125,36,69,123,69,32,122,123,128,10,129,127,129,40,130,127,130,38,74,127,132,11,133,131,133,41,134,131,134,38,130,131,136,3,87,135,87,17,75,135,75,38,134,135,138,0,47,137,47,19,139,137,139,42,80,137,91,2,141,140,141,44,142,140,142,42,139,140,144,13,145,143,145,45,81,143,81,42,142,143,146,149,148,147,150,153,152,151,154,157,156,155,158,161,160,159,162,165,164,163,166,169,168,167,170,173,172,171,174,176,175,163,177,180,179,178,181,183,182,178,184,187,186,185,188,191,190,189,192,194,193,189,195,198,197,196,199,202,201,200,203,205,204,200,206,209,208,207,210,213,212,211,214,217,216,215,218,221,220,219,222,225,224,223,226,229,228,227,230,232,231,147,233,236,235,234,148,149,238,237,238,149,170,171,170,149,146,239,152,153,179,240,179,153,181,178,181,153,150,241,156,157,190,242,190,157,192,189,192,157,154,243,160,161,201,244,201,161,203,200,203,161,158,245,164,165,247,246,247,165,214,215,214,165,162,248,168,169,250,249,250,169,226,227,226,169,166,251,172,173,164,246,164,173,174,163,174,173,170,239,175,176,182,252,182,176,177,178,177,176,174,239, -179,180,231,240,231,180,146,147,146,180,177,239,182,183,253,252,253,183,184,185,184,183,181,241,186,187,193,254,193,187,188,189,188,187,184,241,190,191,255,242,255,191,150,151,150,191,188,241,193,194,256,254,256,194,195,196,195,194,192,243,197,198,204,257,204,198,199,200,199,198,195,243,201,202,258,244,258,202,154,155,154,202,199,243,204,205,259,257,259,205,206,207,206,205,203,245,208,209,261,260,261,209,210,211,210,209,206,245,212,213,263,262,263,213,158,159,158,213,210,245,216,217,265,264,265,217,218,219,218,217,214,248,220,221,267,266,267,221,222,223,222,221,218,248,224,225,175,252,175,225,162,163,162,225,222,248,228,229,148,237,148,229,230,147,230,229,226,251,231,232,268,240,268,232,233,234,233,232,230,251,235,236,270,269,270,236,166,167,166,236,233,251 - } - } - LayerElementSmoothing: 0 { - Version: 102 - Name: "" - MappingInformationType: "ByEdge" ReferenceInformationType: "Direct" - Smoothing: *384 { - a: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + UV: *8 { + a: 0,0,1,0,1,1,0,1 } } LayerElementMaterial: 0 { Version: 101 Name: "" - MappingInformationType: "AllSame" + MappingInformationType: "NoMappingInformation" ReferenceInformationType: "IndexToDirect" Materials: *1 { a: 0 @@ -660,120 +304,61 @@ Objects: { Type: "LayerElementNormal" TypedIndex: 0 } - LayerElement: { - Type: "LayerElementBinormal" - TypedIndex: 0 - } - LayerElement: { - Type: "LayerElementTangent" - TypedIndex: 0 - } LayerElement: { Type: "LayerElementMaterial" TypedIndex: 0 } - LayerElement: { - Type: "LayerElementSmoothing" - TypedIndex: 0 - } LayerElement: { Type: "LayerElementUV" TypedIndex: 0 } } } - Model: 2359439406816, "Model::Cube2", "Mesh" { - Version: 232 - Properties70: { - P: "RotationActive", "bool", "", "",1 - P: "InheritType", "enum", "", "",1 - P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 - P: "DefaultAttributeIndex", "int", "Integer", "",0 - P: "Lcl Translation", "Lcl Translation", "", "A",-1.04023893373156,0.998288783259251,-1.04375962988677 - P: "Lcl Scaling", "Lcl Scaling", "", "A",10,10,10 - P: "currentUVSet", "KString", "", "U", "map1" - } - Shading: T - Culling: "CullingOff" - } - Model: 2359439411456, "Model::Куб1", "Mesh" { + Model: 7637072, "Model::planeNode_0", "Mesh" { Version: 232 Properties70: { - P: "RotationActive", "bool", "", "",1 - P: "InheritType", "enum", "", "",1 P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 P: "DefaultAttributeIndex", "int", "Integer", "",0 - P: "Lcl Translation", "Lcl Translation", "", "A",1.04023893373156,-0.998288783259251,1.04375962988677 - P: "currentUVSet", "KString", "", "U", "map1" } Shading: T Culling: "CullingOff" } - Model: 2359439409136, "Model::Cube3", "Mesh" { + Model: 7640336, "Model::planeNode_1", "Mesh" { Version: 232 Properties70: { - P: "RotationActive", "bool", "", "",1 - P: "InheritType", "enum", "", "",1 P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 P: "DefaultAttributeIndex", "int", "Integer", "",0 - P: "Lcl Translation", "Lcl Translation", "", "A",-1.0671176743957,0.998288783259251,9.39023469168045 - P: "Lcl Scaling", "Lcl Scaling", "", "A",10,10,10 - P: "currentUVSet", "KString", "", "U", "map1" } Shading: T Culling: "CullingOff" } - Model: 2359439416096, "Model::Куб1", "Mesh" { - Version: 232 - Properties70: { - P: "RotationActive", "bool", "", "",1 - P: "InheritType", "enum", "", "",1 - P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 - P: "DefaultAttributeIndex", "int", "Integer", "",0 - P: "Lcl Translation", "Lcl Translation", "", "A",1.04023893373156,-0.998288783259251,1.1806740271636 - P: "Lcl Scaling", "Lcl Scaling", "", "A",0.77384837213491,0.77384837213491,0.77384837213491 - P: "currentUVSet", "KString", "", "U", "map1" - } - Shading: T - Culling: "CullingOff" - } - Material: 2359823919504, "Material::Mat_1", "" { + Material: 7647552, "Material::Standard_Types", "" { Version: 102 ShadingModel: "lambert" MultiLayer: 0 Properties70: { - P: "AmbientColor", "Color", "", "A", 0.4,0.2,0.4 - P: "AmbientFactor", "Number", "", "A", 0.25 - P: "DiffuseColor", "Color", "", "A", 0.8,0.4,0.2,0.9 - P: "DiffuseFactor", "Number", "", "A", 0.5 - P: "TransparentColor", "Color", "", "A", 0.1,0.2,0.3 - P: "TransparencyFactor", "Number", "", "A", 2.0 - P: "Opacity", "Number", "", "A", 0.35 + P: "AmbientColor", "Color", "", "A",0.4,0.2,0.4 + P: "AmbientFactor", "Number", "", "A",0.25 + P: "DiffuseColor", "Color", "", "A",0.8,0.4,0.2 + P: "DiffuseFactor", "Number", "", "A",0.5 + P: "TransparentColor", "Color", "", "A",0.4,0.2,0.3 + P: "TransparencyFactor", "Number", "", "A",2 + P: "Opacity", "double", "Number", "",0.4 } } - Material: 2359823921584, "Material::Mat_2", "" { + Material: 7658224, "Material::Custom_Types", "" { Version: 102 ShadingModel: "lambert" MultiLayer: 0 Properties70: { - P: "AmbientColor", "Color", "", "A", 0.1,0.05,0.1 - P: "DiffuseColor", "Color", "", "A", 0.8,0.4,0.2 - P: "DiffuseFactor", "Number", "", "A", 0.5 - P: "TransparencyFactor", "Number", "", "A", 0.25 - P: "SomeColor", "Vector3D", "Vector", "", 0.1,0.2,0.3 - P: "AString", "KString", "", "", "Ministry of Finance (Turkmenistan)" + P: "AmbientColor", "Color", "", "A",0.1,0.05,0.1 + P: "DiffuseColor", "Color", "", "A",0.8,0.4,0.2 + P: "DiffuseFactor", "Number", "", "A",0.5 + P: "TransparencyFactor", "Number", "", "A",0.25 + P: "SomeColor", "Vector3D", "", "",0.1,0.2,0.3 + P: "SomeString", "KString", "", "","Ministry of Finance (Turkmenistan)" } } - AnimationStack: 2359349464816, "AnimStack::Take 001", "" { - Properties70: { - P: "LocalStart", "KTime", "Time", "",1924423250 - P: "LocalStop", "KTime", "Time", "",230930790000 - P: "ReferenceStart", "KTime", "Time", "",1924423250 - P: "ReferenceStop", "KTime", "Time", "",230930790000 - } - } - AnimationLayer: 2359327403664, "AnimLayer::BaseLayer", "" { - } } ; Object connections @@ -781,53 +366,27 @@ Objects: { Connections: { - ;Model::Cube2, Model::RootNode - C: "OO",2359439406816,0 + ;Model::planeNode_0, Model::RootNode + C: "OO",7637072,0 - ;Model::Cube3, Model::RootNode - C: "OO",2359439409136,0 + ;Model::planeNode_1, Model::RootNode + C: "OO",7640336,0 - ;AnimLayer::BaseLayer, AnimStack::Take 001 - C: "OO",2359327403664,2359349464816 + ;Geometry::planeMesh_0, Model::planeNode_0 + C: "OO",7639056,7637072 - ;Geometry::, Model::Cube2 - C: "OO",2358377979296,2359439406816 + ;Material::Standard_Types, Model::planeNode_0 + C: "OO",7647552,7637072 - ;Material::Mat_1, Model::Cube2 - C: "OO",2359823919504,2359439406816 + ;Geometry::planeMesh_1, Model::planeNode_1 + C: "OO",7642320,7640336 - ;Model::Куб1, Model::Cube2 - C: "OO",2359439411456,2359439406816 - - ;Geometry::, Model::Куб1 - C: "OO",2358377961872,2359439411456 - - ;Material::Mat_1, Model::Куб1 - C: "OO",2359823919504,2359439411456 - - ;Geometry::, Model::Cube3 - C: "OO",2358377982464,2359439409136 - - ;Material::Mat_2, Model::Cube3 - C: "OO",2359823921584,2359439409136 - - ;Model::Куб1, Model::Cube3 - C: "OO",2359439416096,2359439409136 - - ;Geometry::, Model::Куб1 - C: "OO",2358377979824,2359439416096 - - ;Material::Mat_2, Model::Куб1 - C: "OO",2359823921584,2359439416096 + ;Material::Custom_Types, Model::planeNode_1 + C: "OO",7658224,7640336 } ;Takes section ;---------------------------------------------------- Takes: { - Current: "Take 001" - Take: "Take 001" { - FileName: "Take_001.tak" - LocalTime: 1924423250,230930790000 - ReferenceTime: 1924423250,230930790000 - } + Current: "" } From 18f5d0fe6631624db709c946b6ef2afaf29b18dd Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:34:24 +0100 Subject: [PATCH 28/48] AssimpImporter: simplify material-raw.gltf --- .../AssimpImporter/Test/material-raw.gltf | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf b/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf index d011f34a0..904f9cadd 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf +++ b/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf @@ -19,10 +19,7 @@ "primitives": [{ "attributes": { "POSITION": 0, - "TEXCOORD_0": 1, - "TEXCOORD_1": 1, - "TEXCOORD_2": 1, - "TEXCOORD_3": 1 + "TEXCOORD_0": 1 }, "material": 0 }] @@ -69,25 +66,20 @@ "pbrMetallicRoughness": { "baseColorFactor": [ 0.8, 0.2, 0.4, 0.3 ], "baseColorTexture": { - "index": 0, - "texCoord": 1 + "index": 0 } }, "emissiveFactor": [ 0.1, 0.2, 0.3 ], "doubleSided": true, "normalTexture": { "index": 1, - "texCoord": 2, + "texCoord": 1, "extensions": { "KHR_texture_transform": { "offset": [0.0, 1.0], - "scale": [0.25, 0.75], - "texCoord": 3 + "scale": [0.25, 0.75] } } - }, - "emissiveTexture": { - "index": 2 } } ], @@ -99,10 +91,6 @@ "sampler": 0, "source": 0 }, - { - "sampler": 0, - "source": 0 - }, { "sampler": 0, "source": 0 From b7d5545cb71baa477747645d4cff1db0350df0f1 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:35:46 +0100 Subject: [PATCH 29/48] AssimpImporter: test texture coordinate set for raw material import --- src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index be1b341a1..dcc6cbc25 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2226,6 +2226,11 @@ CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); CORRADE_VERIFY(material->hasAttribute(name)); CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Bool); CORRADE_COMPARE(material->attribute(name), true); + } { + constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".NORMALS"_s; + CORRADE_VERIFY(material->hasAttribute(name)); + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Int); + CORRADE_COMPARE(material->attribute(name), 1); } { CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVTRANSFORM."); From a5f1a9407f9f07c85d718016e92e037861cd4cf3 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:36:16 +0100 Subject: [PATCH 30/48] AssimpImporter: no need for constexpr here --- .../AssimpImporter/Test/AssimpImporterTest.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index dcc6cbc25..051c56ad7 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2087,8 +2087,8 @@ void AssimpImporterTest::materialTextureLayers() { } } -template constexpr Containers::StringView extractMaterialKey(const char(&data)[size], int, int) { - return Containers::Literals::operator"" _s(data, size - 1); +Containers::StringView extractMaterialKey(const char* data, int, int) { + return data; } void AssimpImporterTest::materialRawUnrecognized() { @@ -2210,19 +2210,19 @@ CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); /* Raw attributes. Only checking interesting attributes, because this would be a nightmare to maintain across multiple Assimp versions. */ { - constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_DIFFUSE); + const Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_DIFFUSE); CORRADE_VERIFY(material->hasAttribute(name)); CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Vector4); CORRADE_COMPARE(material->attribute(name), (Color4{0.8f, 0.2f, 0.4f, 0.3f})); } { /* For some reason Assimp adds an alpha channel to the emissive color */ - constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_EMISSIVE); + const Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_EMISSIVE); CORRADE_VERIFY(material->hasAttribute(name)); CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Vector4); CORRADE_COMPARE(material->attribute(name), (Color4{0.1f, 0.2f, 0.3f})); } { /* Opaque buffer of size 1 converted to Bool */ - constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_TWOSIDED); + const Containers::StringView name = extractMaterialKey(AI_MATKEY_TWOSIDED); CORRADE_VERIFY(material->hasAttribute(name)); CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Bool); CORRADE_COMPARE(material->attribute(name), true); @@ -2269,13 +2269,13 @@ void AssimpImporterTest::materialRawTextureLayers() { { { CORRADE_VERIFY(!material->hasAttribute(0, MaterialAttribute::AmbientColor)); - constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_AMBIENT); + const Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_AMBIENT); CORRADE_VERIFY(material->hasAttribute(0, name)); CORRADE_COMPARE(material->attributeType(0, name), MaterialAttributeType::Vector3); CORRADE_COMPARE(material->attribute(0, name), (Color3{0.1f, 0.2f, 0.3f})); } { CORRADE_VERIFY(!material->hasAttribute(0, MaterialAttribute::DiffuseColor)); - constexpr Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_DIFFUSE); + const Containers::StringView name = extractMaterialKey(AI_MATKEY_COLOR_DIFFUSE); CORRADE_VERIFY(material->hasAttribute(0, name)); CORRADE_COMPARE(material->attributeType(0, name), MaterialAttributeType::Vector3); CORRADE_COMPARE(material->attribute(0, name), (Color3{0.7f, 0.6f, 0.5f})); From d41e8a01cb29b9f8f027d8554f1d68ec0670004a Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:36:31 +0100 Subject: [PATCH 31/48] AssimpImporter: doc++ --- src/MagnumPlugins/AssimpImporter/AssimpImporter.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h index 838e1e974..ed81f6d1d 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.h +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.h @@ -274,8 +274,8 @@ verbosity levels in each instance. - To load all material attributes with the raw Assimp names and types, enable the @cb{.ini} forceRawMaterialData @ce @ref Trade-AssimpImporter-configuration "configuration option". You will - then get attributes like "$clr.diffuse" instead of - @cpp MaterialAttribute::DiffuseColor @ce. @ref MaterialData::types() will + then get attributes like `$clr.diffuse` instead of + @ref MaterialAttribute::DiffuseColor. @ref MaterialData::types() will always be empty with this option enabled. - Assimp seems to ignore ambient textures in COLLADA files - For some reason, Assimp 4.1 imports STL models with ambient set to From cc0ea712c76483bb47560ff7b85fa6c86f85d128 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:37:14 +0100 Subject: [PATCH 32/48] AssimpImporter: Utility::formatString understands StringView --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index ec918644e..d34767ffd 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1188,9 +1188,9 @@ Containers::String customMaterialKey(Containers::StringView key, const aiTexture CORRADE_INTERNAL_ASSERT(!keyExtra.isEmpty()); - /** @todo use format() and drop data() + FormatStl include - when format() is converted to StringViews */ - keyString = Utility::formatString("{}.{}", key.data(), keyExtra.data()); + /** @todo use format() and drop FormatStl include when format() is + converted to StringViews */ + keyString = Utility::formatString("{}.{}", key, keyExtra); } return keyString; From 137a9d0d8a55f279baf4d1f8ee1781e62bd6f57d Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:37:57 +0100 Subject: [PATCH 33/48] AssimpImporter: clarify comments --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index d34767ffd..fd1ab5cee 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1400,7 +1400,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt Revisit if this breaks for someone. */ /** @todo $ conflicts with Magnum's material layer names */ CORRADE_ASSERT(!key.isEmpty() && !std::isupper(key.front()), - "Trade::AssimpImporter::material(): uppercase attribute names are reserved", Containers::NullOpt); + "Trade::AssimpImporter::material(): attribute names starting with uppercase are reserved:" << key, {}); MaterialAttributeType type; if(property.mType == aiPTI_Integer) { @@ -1416,10 +1416,9 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt type = MaterialAttributeType::Vector4i; else { Warning{} << "Trade::AssimpImporter::material(): property" << key << "is an integer array of" << property.mDataLength/4 << "items, saving as a typeless buffer"; - /* Using Pointer to indicate this is a buffer. String - would indicate aiString which needs special handling - for the length prefix. This still becomes an owned - String later. */ + /* Abusing Pointer to indicate this is a buffer. + Together with other similar cases it's processed + below and turned into MaterialAttributeType::String. */ type = MaterialAttributeType::Pointer; } } else if(property.mType == aiPTI_Float) { @@ -1440,7 +1439,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt /** @todo This shouldn't happen without compiling Assimp with double support. But then the importer would only produce garbage because we assume ai_real equals float - everywhere. */ + everywhere. Just assert? */ Warning{} << "Trade::AssimpImporter::material():" << key << "is a double precision property, saving as a typeless buffer"; /* See comment above */ type = MaterialAttributeType::Pointer; @@ -1504,6 +1503,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt deleter */ arrayShrink(attributes, DefaultInit); + /** @todo detect PBR properties and add relevant types accordingly */ const MaterialType materialType = forceRaw ? MaterialType{} : MaterialType::Phong; return MaterialData{materialType, std::move(attributes), std::move(layers), mat}; } From 3e7888353de30d587751dd67747538d1b58d56f5 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 12:49:38 +0100 Subject: [PATCH 34/48] AssimpImporter: don't special-case glTF bugs for raw materials Already working around assimp bugs for a feature that was meant to allows us not to care about assimp bugs. Let's not. --- .../AssimpImporter/AssimpImporter.cpp | 16 ++++------------ .../AssimpImporter/Test/AssimpImporterTest.cpp | 9 ++++++--- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index fd1ab5cee..b58c855e1 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1402,7 +1402,6 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt CORRADE_ASSERT(!key.isEmpty() && !std::isupper(key.front()), "Trade::AssimpImporter::material(): attribute names starting with uppercase are reserved:" << key, {}); - MaterialAttributeType type; if(property.mType == aiPTI_Integer) { if(property.mDataLength == 1) type = MaterialAttributeType::Bool; @@ -1419,6 +1418,8 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt /* Abusing Pointer to indicate this is a buffer. Together with other similar cases it's processed below and turned into MaterialAttributeType::String. */ + /** @todo add MaterialAttributeType::Buffer for opaque + buffer data that can't be viewed as a string */ type = MaterialAttributeType::Pointer; } } else if(property.mType == aiPTI_Float) { @@ -1444,17 +1445,8 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt /* See comment above */ type = MaterialAttributeType::Pointer; } else if(property.mType == aiPTI_Buffer) { - if(property.mDataLength == 1) { - /* The glTF importer writes bool properties as buffers - with size 1, when all the other importers write them - as ints. Currently there is no importer that - writes opaque buffer data, so we try to detect this. - Funny library. */ - type = MaterialAttributeType::Bool; - } else { - /* See comment about Pointer further above */ - type = MaterialAttributeType::Pointer; - } + /* See comment about Pointer further above */ + type = MaterialAttributeType::Pointer; } else if(property.mType == aiPTI_String) { type = MaterialAttributeType::String; } else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 051c56ad7..849588f39 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2221,11 +2221,14 @@ CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Vector4); CORRADE_COMPARE(material->attribute(name), (Color4{0.1f, 0.2f, 0.3f})); } { - /* Opaque buffer of size 1 converted to Bool */ + /* The glTF importer writes bool properties as buffers with size 1, + when all the other importers write them as ints */ const Containers::StringView name = extractMaterialKey(AI_MATKEY_TWOSIDED); CORRADE_VERIFY(material->hasAttribute(name)); - CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Bool); - CORRADE_COMPARE(material->attribute(name), true); + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::String); + const auto value = material->attribute(name); + CORRADE_COMPARE(value.size(), 1); + CORRADE_VERIFY(value.front() != 0); } { constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".NORMALS"_s; CORRADE_VERIFY(material->hasAttribute(name)); From 094b50b8c5631cbde59fb60c54fb0c72752a322e Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 13:07:46 +0100 Subject: [PATCH 35/48] Revert "TinyGltfImporter: make test files compatible with AssimpImporter" This reverts commit e2ee78c99a474dedf8a053f09c4344f5b2b18d57. --- src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf | 10 ---------- src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf | 4 +--- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf b/src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf index 92dfe589e..91c1802e1 100644 --- a/src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf +++ b/src/MagnumPlugins/TinyGltfImporter/Test/camera.gltf @@ -42,15 +42,5 @@ }, "type" : "perspective" } - ], - "scene": 0, - "scenes": [ - { "nodes": [0, 1, 2, 3] } - ], - "nodes": [ - { "camera": 0 }, - { "camera": 1 }, - { "camera": 2 }, - { "camera": 3 } ] } diff --git a/src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf b/src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf index 366c55443..b07939eb2 100644 --- a/src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf +++ b/src/MagnumPlugins/TinyGltfImporter/Test/skin.gltf @@ -51,7 +51,5 @@ "count": 3, "type": "MAT4" } - ], - "scene": 0, - "scenes": [{}] + ] } From 294fc00933518c83c2004388c662922f7a1a338e Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 13:09:59 +0100 Subject: [PATCH 36/48] AssimpImporter: use our own camera and skin-without-meshes gltf test files Changing them in TinyGltfImporter might hide regressions like cameras needing nodes to import (take notes, assimp) --- .../Test/AssimpImporterTest.cpp | 5 +- .../AssimpImporter/Test/CMakeLists.txt | 3 + .../AssimpImporter/Test/camera.gltf | 57 +++++++++++++++++ .../AssimpImporter/Test/skin-no-mesh.bin | Bin 0 -> 192 bytes .../AssimpImporter/Test/skin-no-mesh.gltf | 58 ++++++++++++++++++ 5 files changed, 120 insertions(+), 3 deletions(-) create mode 100644 src/MagnumPlugins/AssimpImporter/Test/camera.gltf create mode 100644 src/MagnumPlugins/AssimpImporter/Test/skin-no-mesh.bin create mode 100644 src/MagnumPlugins/AssimpImporter/Test/skin-no-mesh.gltf diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 849588f39..5f2dd279a 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -1484,9 +1484,8 @@ void AssimpImporterTest::skinNoMeshes() { if(!supportsSkinning(".gltf"_s, _assimpVersion)) CORRADE_SKIP("glTF 2 skinning is not supported with the current version of Assimp"); - /* Reusing the TinyGltfImporter test file without meshes */ Containers::Pointer importer = _manager.instantiate("AssimpImporter"); - CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR, "skin.gltf"))); + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "skin-no-mesh.gltf"))); /* Assimp only lets us access joints for each mesh. No mesh = no joints. */ CORRADE_COMPARE(importer->meshCount(), 0); @@ -1611,7 +1610,7 @@ void AssimpImporterTest::cameraOrthographic() { CORRADE_SKIP("glTF 2 is supported since Assimp 4.1."); Containers::Pointer importer = _manager.instantiate("AssimpImporter"); - CORRADE_VERIFY(importer->openFile(Utility::Directory::join(TINYGLTFIMPORTER_TEST_DIR, "camera.gltf"))); + CORRADE_VERIFY(importer->openFile(Utility::Directory::join(ASSIMPIMPORTER_TEST_DIR, "camera.gltf"))); CORRADE_COMPARE(importer->cameraCount(), 4); /* For some reason glTF camera names are set to the names of the nodes that diff --git a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt index 9774a26ac..5eeb84743 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/Test/CMakeLists.txt @@ -61,6 +61,7 @@ corrade_add_test(AssimpImporterTest AssimpImporterTest.cpp animation-patching.bin animation-patching.gltf camera.dae + camera.gltf diffuse_texture.png embedded-texture.blend empty.dae @@ -100,6 +101,8 @@ corrade_add_test(AssimpImporterTest AssimpImporterTest.cpp skin-multiple-sets.dae skin-multiple-sets.bin skin-multiple-sets.gltf + skin-no-mesh.bin + skin-no-mesh.gltf skin-shared.gltf skin-shared.bin texture-ambient.obj diff --git a/src/MagnumPlugins/AssimpImporter/Test/camera.gltf b/src/MagnumPlugins/AssimpImporter/Test/camera.gltf new file mode 100644 index 000000000..41f5b69ea --- /dev/null +++ b/src/MagnumPlugins/AssimpImporter/Test/camera.gltf @@ -0,0 +1,57 @@ +{ + "asset" : { + "version" : "2.0" + }, + "note": "Same as camera.gltf from TinyGltfImporter tests, but with nodes referencing cameras so assimp imports them", + "cameras" : [ + { + "name" : "Orthographic 4:3", + "orthographic" : { + "xmag" : 2.0, + "ymag" : 1.5, + "zfar" : 100.0, + "znear" : 0.01 + }, + "type" : "orthographic" + }, + { + "name" : "Perspective 1:1 75° hFoV", + "perspective" : { + "aspectRatio" : 1.0, + "yfov" : 1.308996938995747, + "zfar" : 150.0, + "znear" : 0.1 + }, + "type" : "perspective" + }, + { + "name" : "Perspective 4:3 75° hFoV", + "perspective" : { + "aspectRatio" : 1.33333333333333, + "yfov" : 1.044412773812111, + "zfar" : 150.0, + "znear" : 0.1 + }, + "type" : "perspective" + }, + { + "name" : "Perspective 16:9 75° hFoV infinite", + "perspective" : { + "aspectRatio" : 1.77777777777777, + "yfov" : 0.8149313284027269, + "znear" : 0.1 + }, + "type" : "perspective" + } + ], + "scene": 0, + "scenes": [ + { "nodes": [0, 1, 2, 3] } + ], + "nodes": [ + { "camera": 0 }, + { "camera": 1 }, + { "camera": 2 }, + { "camera": 3 } + ] +} diff --git a/src/MagnumPlugins/AssimpImporter/Test/skin-no-mesh.bin b/src/MagnumPlugins/AssimpImporter/Test/skin-no-mesh.bin new file mode 100644 index 0000000000000000000000000000000000000000..2553f66702c19ed7bc42c49f28c77d6ee46d4ae4 GIT binary patch literal 192 zcmZQzXs~BM1D`er+CR7|1Q!Rg_k+aHlmWRQy_ot5h&eDYH~?`22!qT7(&zvrj}AcU I(LsYf08UvEFaQ7m literal 0 HcmV?d00001 diff --git a/src/MagnumPlugins/AssimpImporter/Test/skin-no-mesh.gltf b/src/MagnumPlugins/AssimpImporter/Test/skin-no-mesh.gltf new file mode 100644 index 000000000..2612ebae4 --- /dev/null +++ b/src/MagnumPlugins/AssimpImporter/Test/skin-no-mesh.gltf @@ -0,0 +1,58 @@ +{ + "asset": { + "version": "2.0" + }, + "note": "Same as skin.gltf from TinyGltfImporter tests, but with a default scene so assimp 5.1.0 loads it", + "nodes": [ + {}, + {}, + {} + ], + "skins": [ + { + "name": "implicit inverse bind matrices", + "joints": [1, 2] + }, + { + "name": "explicit inverse bind matrices", + "inverseBindMatrices": 1, + "joints": [0, 2, 1] + } + ], + "buffers": [ + { + "byteLength": 192, + "uri": "skin-no-mesh.bin" + } + ], + "bufferViews": [ + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 72 + }, + { + "buffer": 0, + "byteOffset": 0, + "byteLength": 192 + } + ], + "accessors": [ + { + "bufferView": 0, + "byteOffset": 0, + "componentType": 5123, + "count": 2, + "type": "MAT3" + }, + { + "bufferView": 1, + "byteOffset": 0, + "componentType": 5126, + "count": 3, + "type": "MAT4" + } + ], + "scene": 0, + "scenes": [{}] +} From 7195b8f1e1fb2447ed564ed432ac450678ed515b Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 22:05:39 +0100 Subject: [PATCH 37/48] AssimpImporter: detect if assimp was built with double support Not ASSIMP_DOUBLE_PRECISION which determines if everything is imported as floats, but the presence of aiPTI_Double which got added for that purpose. The first one is a compile option, the second is always there. --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 2 ++ src/MagnumPlugins/AssimpImporter/CMakeLists.txt | 2 +- src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp | 6 ++++++ src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index b58c855e1..4ea4c2d1c 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1436,6 +1436,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt /* See comment above */ type = MaterialAttributeType::Pointer; } + #if ASSIMP_HAS_DOUBLES } else if(property.mType == aiPTI_Double) { /** @todo This shouldn't happen without compiling Assimp with double support. But then the importer would only @@ -1444,6 +1445,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt Warning{} << "Trade::AssimpImporter::material():" << key << "is a double precision property, saving as a typeless buffer"; /* See comment above */ type = MaterialAttributeType::Pointer; + #endif } else if(property.mType == aiPTI_Buffer) { /* See comment about Pointer further above */ type = MaterialAttributeType::Pointer; diff --git a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt index 49117323c..436613bb9 100644 --- a/src/MagnumPlugins/AssimpImporter/CMakeLists.txt +++ b/src/MagnumPlugins/AssimpImporter/CMakeLists.txt @@ -74,7 +74,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/checkAssimpVersionLanguageOverride.cmake enable_language(C) # Go through all versions of interest and pick the highest one that compiles -foreach(_version 20210102 20201123 20200225 20191122 20190915 20151031) +foreach(_version 20210102 20201123 20200225 20191122 20190915 20160716 20151031) try_compile(_works ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/checkAssimpVersion.cpp ${_ASSIMP_TRY_COMPILE_LINK_OR_INCLUDE} diff --git a/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp b/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp index 579471ea4..e63039717 100644 --- a/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp +++ b/src/MagnumPlugins/AssimpImporter/checkAssimpVersion.cpp @@ -82,6 +82,12 @@ int main() { ret = static_cast(Assimp::Math::getEpsilon()); #endif + /* Support for double types (ai_real, aiPTI_Double): + https://github.com/assimp/assimp/commit/fa1d6d8c55484a1ab97b2773585ae76f71ef6fbc */ + #if CHECK_VERSION >= 20160716 + ai_real real{}; + #endif + unsigned int version = aiGetVersionMajor()*100 + aiGetVersionMinor(); ret = static_cast(version); diff --git a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake index 944b706de..398e82d4e 100644 --- a/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake +++ b/src/MagnumPlugins/AssimpImporter/configureInternal.h.cmake @@ -25,6 +25,7 @@ */ #define ASSIMP_VERSION ${ASSIMP_VERSION} +#define ASSIMP_HAS_DOUBLES (ASSIMP_VERSION>= 20160716) #define ASSIMP_IS_VERSION_5_OR_GREATER (ASSIMP_VERSION >= 20190915) #define ASSIMP_HAS_VERSION_PATCH (ASSIMP_VERSION >= 20191122) #define ASSIMP_HAS_ORTHOGRAPHIC_CAMERA (ASSIMP_VERSION >= 20200225) From 467b476ef95b858ffaa8bc312112195088d8c810 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 22:07:02 +0100 Subject: [PATCH 38/48] AssimpImporter: don't test glTF texture coordinate set attributes for versions before 5.1.0 --- .../AssimpImporter/Test/AssimpImporterTest.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 5f2dd279a..3b9546745 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2229,10 +2229,19 @@ CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); CORRADE_COMPARE(value.size(), 1); CORRADE_VERIFY(value.front() != 0); } { + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, + "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVWSRC."); + constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".NORMALS"_s; - CORRADE_VERIFY(material->hasAttribute(name)); - CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Int); - CORRADE_COMPARE(material->attribute(name), 1); + const bool hasAttribute = material->hasAttribute(name); + CORRADE_VERIFY(hasAttribute); + /* Still have to skip the checks to not trigger asserts for missing + attribute names in attributeType() and attribute() */ + if(hasAttribute) { + CORRADE_VERIFY(material->hasAttribute(name)); + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Int); + CORRADE_COMPARE(material->attribute(name), 1); + } } { CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVTRANSFORM."); @@ -2240,9 +2249,6 @@ CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); constexpr Containers::StringView name = _AI_MATKEY_UVTRANSFORM_BASE ".NORMALS"_s; const bool hasAttribute = material->hasAttribute(name); CORRADE_VERIFY(hasAttribute); - - /* Still have to skip the checks to not trigger asserts for missing - attribute names in attributeType() and attribute() */ if(hasAttribute) { /* Opaque buffer converted to String */ CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::String); From 61115709be1bf2f66b225725654262c3ba630fcb Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 22:07:27 +0100 Subject: [PATCH 39/48] AssimpImporter: comments++ --- .../AssimpImporter/AssimpImporter.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 4ea4c2d1c..cfa39a4e6 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1392,11 +1392,9 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt put it there as a custom attribute */ } else if(unrecognizedAsRaw) { /* Attribute names starting with uppercase letters are reserved - for Magnum. All assimp material keys either start with '$' - or '?'. The only format importing raw material names is FBX - and that prefixes them with "$raw.". A quick search through - the 5.0.1 code confirms that no importer sets attributes - starting uppercase, so an assert should be fine here. + for Magnum. All assimp material keys start with one of $/?/~ + so an assert should be fine here: + https://github.com/assimp/assimp/blob/v3.2/include/assimp/material.h#L548 Revisit if this breaks for someone. */ /** @todo $ conflicts with Magnum's material layer names */ CORRADE_ASSERT(!key.isEmpty() && !std::isupper(key.front()), @@ -1440,8 +1438,10 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt } else if(property.mType == aiPTI_Double) { /** @todo This shouldn't happen without compiling Assimp with double support. But then the importer would only - produce garbage because we assume ai_real equals float - everywhere. Just assert? */ + produce garbage because it assumes ai_real equals float + everywhere. + Always assert? Ignore if ASSIMP_DOUBLE_PRECISION is + not defined? */ Warning{} << "Trade::AssimpImporter::material():" << key << "is a double precision property, saving as a typeless buffer"; /* See comment above */ type = MaterialAttributeType::Pointer; From 63a48e7b83be7906ba26e9e8294bb0ddcb4960a4 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 22:27:37 +0100 Subject: [PATCH 40/48] AssimpImporter: work around possibly undefined aiTextureType And test that it works with the PBR texture types added in 5.0.0 --- .../AssimpImporter/AssimpImporter.cpp | 74 +++++++++++++++---- .../Test/AssimpImporterTest.cpp | 6 +- 2 files changed, 66 insertions(+), 14 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index cfa39a4e6..71c8ada9e 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1148,6 +1148,33 @@ MaterialAttributeData materialColor(MaterialAttribute attribute, const aiMateria return {attribute, Color4{Color3::from(reinterpret_cast(property.mData))}}; else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); /* LCOV_EXCL_LINE */ } +/* We use aiTextureType values to generate names in customMaterialKey(), but + older Assimp versions may not have those defined. Unfortunately Assimp + doesn't keep the values stable for us to define our own enum. Instead, this + SFINAE magic lets us pass through valid values or fall back to unique, + hopefully unused values otherwise. This way we save ourselves from ifdef-ing + around specific detected versions. Make sure to double-check any added + texture type names since they will invariably compile. */ +#define ASSIMP_OPTIONAL_TEXTURE_TYPE(name) \ + template struct AssimpOptionalTextureType_ ## name { \ + template constexpr static U get(T*, decltype(T::aiTextureType_ ## name)* = nullptr) { \ + return T::aiTextureType_ ## name; \ + } \ + constexpr static U get(...) { \ + return U(1000000 + __LINE__); \ + } \ + constexpr static U Value = get(static_cast(nullptr)); \ + }; + +ASSIMP_OPTIONAL_TEXTURE_TYPE(BASE_COLOR) +ASSIMP_OPTIONAL_TEXTURE_TYPE(NORMAL_CAMERA) +ASSIMP_OPTIONAL_TEXTURE_TYPE(EMISSION_COLOR) +ASSIMP_OPTIONAL_TEXTURE_TYPE(METALNESS) +ASSIMP_OPTIONAL_TEXTURE_TYPE(DIFFUSE_ROUGHNESS) +ASSIMP_OPTIONAL_TEXTURE_TYPE(AMBIENT_OCCLUSION) +ASSIMP_OPTIONAL_TEXTURE_TYPE(SHEEN) +ASSIMP_OPTIONAL_TEXTURE_TYPE(CLEARCOAT) +ASSIMP_OPTIONAL_TEXTURE_TYPE(TRANSMISSION) Containers::String customMaterialKey(Containers::StringView key, const aiTextureType semantic) { using namespace Containers::Literals; @@ -1158,29 +1185,50 @@ Containers::String customMaterialKey(Containers::StringView key, const aiTexture if(semantic != aiTextureType_NONE) { Containers::StringView keyExtra; switch(semantic) { - #define _c(type) case aiTextureType_ ## type: \ - keyExtra = #type ## _s; \ + /* Texture types present in all assimp versions we can reasonably + support. These are available as far back as 3.2. */ + #define _c(type) case aiTextureType_ ## type: \ + keyExtra = #type ## _s; \ break; + _c(UNKNOWN) _c(AMBIENT) _c(DIFFUSE) - _c(SPECULAR) + _c(DISPLACEMENT) _c(EMISSIVE) - _c(OPACITY) - _c(NORMALS) _c(HEIGHT) - _c(DISPLACEMENT) _c(LIGHTMAP) + _c(NORMALS) + _c(OPACITY) _c(REFLECTION) - _c(UNKNOWN) - _c(BASE_COLOR) _c(SHININESS) - _c(NORMAL_CAMERA) - _c(EMISSION_COLOR) - _c(METALNESS) - _c(DIFFUSE_ROUGHNESS) - _c(AMBIENT_OCCLUSION) + _c(SPECULAR) #undef _c + /* Texture types that may not be available in aiTextureType. Needs + SFINAE magic to produce unique, unreachable fallback values. */ + #define _f(type) case AssimpOptionalTextureType_ ## type ::Value: \ + keyExtra = #type ## _s; \ + break; + #ifdef _MSC_VER + #pragma warning(push) + #pragma warning(disable: 4063) /* not a valid value for switch of enum 'aiTextureType' */ + #endif + /* Added in 5.0.0 */ + _f(BASE_COLOR) + _f(NORMAL_CAMERA) + _f(EMISSION_COLOR) + _f(METALNESS) + _f(DIFFUSE_ROUGHNESS) + _f(AMBIENT_OCCLUSION) + /* Added in 5.1.0 */ + _f(SHEEN) + _f(CLEARCOAT) + _f(TRANSMISSION) + #ifdef _MSC_VER + #pragma warning(pop) + #endif + #undef _f + case aiTextureType_NONE: case _aiTextureType_Force32Bit: CORRADE_INTERNAL_ASSERT_UNREACHABLE(); diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 3b9546745..cbe9e1002 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2228,6 +2228,11 @@ CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); const auto value = material->attribute(name); CORRADE_COMPARE(value.size(), 1); CORRADE_VERIFY(value.front() != 0); + } { + constexpr Containers::StringView name = _AI_MATKEY_TEXTURE_BASE ".NORMALS"_s; + CORRADE_VERIFY(material->hasAttribute(name)); + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::String); + CORRADE_COMPARE(material->attribute(name), "texture.png"_s); } { CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVWSRC."); @@ -2238,7 +2243,6 @@ CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); /* Still have to skip the checks to not trigger asserts for missing attribute names in attributeType() and attribute() */ if(hasAttribute) { - CORRADE_VERIFY(material->hasAttribute(name)); CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Int); CORRADE_COMPARE(material->attribute(name), 1); } From c9d42e9971a2d15b5939aa6772425b842ee76748 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Fri, 26 Nov 2021 22:58:52 +0100 Subject: [PATCH 41/48] AssimpImporter: don't use possibly undefined material keys AI_MATKEY_TRANSPARENCYFACTOR only got added in 4.0.0. We're already testing other float attributes so we don't need to test this one, and there isn't really any good replacement that's universally supported --- .../Test/AssimpImporterTest.cpp | 21 +++++++------------ .../AssimpImporter/Test/material-raw.fbx | 5 ++--- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index cbe9e1002..c8d88b087 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2102,34 +2102,27 @@ void AssimpImporterTest::materialRawUnrecognized() { CORRADE_VERIFY(material); CORRADE_COMPARE(material->types(), MaterialType::Phong); CORRADE_COMPARE(material->layerCount(), 1); - CORRADE_COMPARE(material->attributeCount(), 5); + CORRADE_COMPARE(material->attributeCount(), 4); /* Recognized attributes */ { CORRADE_VERIFY(material->hasAttribute(MaterialAttribute::AmbientColor)); - CORRADE_COMPARE(material->attributeId(MaterialAttribute::AmbientColor), 3); - CORRADE_COMPARE(material->attribute(3), (Color4{0.1f, 0.05f, 0.1f, 1.0f})); + CORRADE_COMPARE(material->attributeId(MaterialAttribute::AmbientColor), 2); + CORRADE_COMPARE(material->attribute(2), (Color4{0.1f, 0.05f, 0.1f, 1.0f})); } { CORRADE_VERIFY(material->hasAttribute(MaterialAttribute::DiffuseColor)); - CORRADE_COMPARE(material->attributeId(MaterialAttribute::DiffuseColor), 4); - CORRADE_COMPARE(material->attribute(4), (Color4{0.4f, 0.2f, 0.1f, 1.0f})); + CORRADE_COMPARE(material->attributeId(MaterialAttribute::DiffuseColor), 3); + CORRADE_COMPARE(material->attribute(3), (Color4{0.4f, 0.2f, 0.1f, 1.0f})); /* Unrecognized attributes */ } { CORRADE_COMPARE(material->attributeName(0), extractMaterialKey(AI_MATKEY_COLOR_TRANSPARENT)); CORRADE_COMPARE(material->attributeType(0), MaterialAttributeType::Vector3); - CORRADE_COMPARE(material->attribute(0), (Vector3{0.8f, 0.4f, 0.6f})); + CORRADE_COMPARE(material->attribute(0), (Vector3{0.3f, 0.2f, 0.1f})); } { CORRADE_COMPARE(material->attributeName(1), extractMaterialKey(AI_MATKEY_OPACITY)); CORRADE_COMPARE(material->attributeType(1), MaterialAttributeType::Float); CORRADE_COMPARE(material->attribute(1), 0.4f); - } { - /* The transparency factor is multiplied with the transparent color but - still reported separately. We don't get the factors for ambient or - diffuse. */ - CORRADE_COMPARE(material->attributeName(2), extractMaterialKey(AI_MATKEY_TRANSPARENCYFACTOR)); - CORRADE_COMPARE(material->attributeType(2), MaterialAttributeType::Float); - CORRADE_COMPARE(material->attribute(2), 2.0f); } } @@ -2167,7 +2160,7 @@ void AssimpImporterTest::materialRaw() { CORRADE_COMPARE(material->attributeType(1), MaterialAttributeType::Vector3); CORRADE_COMPARE(material->attribute(1), (Color3{0.4f, 0.2f, 0.1f})); } { - CORRADE_COMPARE(material->attributeName(2), extractMaterialKey(AI_MATKEY_TRANSPARENCYFACTOR)); + CORRADE_COMPARE(material->attributeName(2), extractMaterialKey(AI_MATKEY_OPACITY)); CORRADE_COMPARE(material->attributeType(2), MaterialAttributeType::Float); CORRADE_COMPARE(material->attribute(2), 0.25f); diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx b/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx index e239a91d1..43fd1fa4a 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx +++ b/src/MagnumPlugins/AssimpImporter/Test/material-raw.fbx @@ -341,8 +341,7 @@ Objects: { P: "AmbientFactor", "Number", "", "A",0.25 P: "DiffuseColor", "Color", "", "A",0.8,0.4,0.2 P: "DiffuseFactor", "Number", "", "A",0.5 - P: "TransparentColor", "Color", "", "A",0.4,0.2,0.3 - P: "TransparencyFactor", "Number", "", "A",2 + P: "TransparentColor", "Color", "", "A",0.3,0.2,0.1 P: "Opacity", "double", "Number", "",0.4 } } @@ -354,7 +353,7 @@ Objects: { P: "AmbientColor", "Color", "", "A",0.1,0.05,0.1 P: "DiffuseColor", "Color", "", "A",0.8,0.4,0.2 P: "DiffuseFactor", "Number", "", "A",0.5 - P: "TransparencyFactor", "Number", "", "A",0.25 + P: "Opacity", "double", "Number", "",0.25 P: "SomeColor", "Vector3D", "", "",0.1,0.2,0.3 P: "SomeString", "KString", "", "","Ministry of Finance (Turkmenistan)" } From 670ad45500b85f816996f381cc170fddcbed17ef Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 27 Nov 2021 15:26:29 +0100 Subject: [PATCH 42/48] AssimpImporter: fix the camera name test Assimp 3.2 takes camera names from the node that they're attached to --- src/MagnumPlugins/AssimpImporter/Test/camera.dae | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/camera.dae b/src/MagnumPlugins/AssimpImporter/Test/camera.dae index 9f0350715..fa5cf563e 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/camera.dae +++ b/src/MagnumPlugins/AssimpImporter/Test/camera.dae @@ -31,7 +31,7 @@ -0.2988363 -0.2988363 0.9063078 0.1 0.6408563 0.6408564 0.4226183 0.2 -0.7071068 0.7071068 -3.09086e-8 0.3 0 0 0 1 - + -0.2988363 -0.2988363 0.9063078 0.1 0.6408563 0.6408564 0.4226183 0.2 -0.7071068 0.7071068 -3.09086e-8 0.3 0 0 0 1 From e41cd93e88cf3ca7a3d6670a4c1249914c7c2ef5 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 27 Nov 2021 15:33:10 +0100 Subject: [PATCH 43/48] AssimpImporter: work around My personal new favorite assimp bug: aiString::length is a size_t before version 5, but the material property functions dealing with strings decided to store them as a uin32_t directly followed by the string content. aiString::C_Str() however doesn't know about those hacks, so when you interpret the material property data as an aiString directly, this blows up in your face with parts of the string data being read as the length. The solution is to use the getter function, which leads to a copy. Alternatively I could have replicated the internal layout but it's enough if Assimp performs these atrocities. Any poor soul using prehistoric versions of this library has far more to worry about than an extra string copy. --- .../AssimpImporter/AssimpImporter.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 71c8ada9e..04c14e656 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1504,6 +1504,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt Containers::StringView value; std::size_t valueSize; const void* valuePointer; + aiString tempString; if(type == MaterialAttributeType::Pointer) { /* Opaque buffer, turn it into an owned String */ type = MaterialAttributeType::String; @@ -1512,10 +1513,23 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt valueSize = property.mDataLength + 2; valuePointer = &value; } else if(type == MaterialAttributeType::String) { + /* Prior to version 5.0.0 aiString::length is a size_t but + the material property code (and only that!) pretends + it's a uint32_t, storing the string data at offset 4: + (WARNING: Don't look if you're easily scared, this code + is nightmare material. You were warned!) + https://github.com/assimp/assimp/blob/v4.1.0/code/MaterialSystem.cpp#L526 + This incurs a copy but I don't want to commit the same + pointer crimes as assimp. */ + #if !ASSIMP_IS_VERSION_5_OR_GREATER + mat->Get(property.mKey.C_Str(), property.mSemantic, property.mIndex, tempString); + const aiString& str = tempString; + #else const aiString& str = *reinterpret_cast(property.mData); + #endif value = {str.C_Str(), str.length}; /* +2 is null byte + size */ - valueSize = str.length + 2; + valueSize = value.size() + 2; valuePointer = &value; } else { valueSize = materialAttributeTypeSize(type); From 7e4b8cc112bc7b2f5193b2ce41cd6dc5e306fa4c Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 27 Nov 2021 15:34:31 +0100 Subject: [PATCH 44/48] AssimpImporter: don't assert for unknown material attribute types And import them as a typeless buffer, since we have that functionality already. Currently untested. --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index 04c14e656..bb2c0f334 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1499,7 +1499,12 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt type = MaterialAttributeType::Pointer; } else if(property.mType == aiPTI_String) { type = MaterialAttributeType::String; - } else CORRADE_INTERNAL_ASSERT_UNREACHABLE(); + } else { + Warning{} << "Trade::AssimpImporter::material(): property" << key << "has unknown type" << property.mType << Debug::nospace << ", saving as a typeless buffer"; + type = MaterialAttributeType::Pointer; + } + + CORRADE_INTERNAL_ASSERT(type != MaterialAttributeType{}); Containers::StringView value; std::size_t valueSize; From 3c713e820fa65a9f8a8f4bd485e3f241cecce0ba Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 27 Nov 2021 15:34:45 +0100 Subject: [PATCH 45/48] AssimpImporter: cleanup --- src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp index bb2c0f334..79e244fbd 100644 --- a/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp +++ b/src/MagnumPlugins/AssimpImporter/AssimpImporter.cpp @@ -1282,13 +1282,13 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt UnsignedInt textureIndex = _f->textureIndices.at(mat); for(std::size_t i = 0; i != mat->mNumProperties; ++i) { - aiMaterialProperty& property = *mat->mProperties[i]; + const aiMaterialProperty& property = *mat->mProperties[i]; /* Process only properties from this layer (again, to have them consecutive in the attribute array), but properly increase texture index even for the skipped properties so we have the mapping correct */ - if(mat->mProperties[i]->mIndex != layer) { + if(property.mIndex != layer) { if(Containers::StringView{property.mKey.C_Str(), property.mKey.length} == _AI_MATKEY_TEXTURE_BASE) ++textureIndex; continue; @@ -1479,7 +1479,6 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt type = MaterialAttributeType::Vector4; else { Warning{} << "Trade::AssimpImporter::material(): property" << key << "is a float array of" << property.mDataLength/4 << "items, saving as a typeless buffer"; - /* See comment above */ type = MaterialAttributeType::Pointer; } #if ASSIMP_HAS_DOUBLES @@ -1491,11 +1490,9 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt Always assert? Ignore if ASSIMP_DOUBLE_PRECISION is not defined? */ Warning{} << "Trade::AssimpImporter::material():" << key << "is a double precision property, saving as a typeless buffer"; - /* See comment above */ type = MaterialAttributeType::Pointer; #endif } else if(property.mType == aiPTI_Buffer) { - /* See comment about Pointer further above */ type = MaterialAttributeType::Pointer; } else if(property.mType == aiPTI_String) { type = MaterialAttributeType::String; @@ -1511,7 +1508,7 @@ Containers::Optional AssimpImporter::doMaterial(const UnsignedInt const void* valuePointer; aiString tempString; if(type == MaterialAttributeType::Pointer) { - /* Opaque buffer, turn it into an owned String */ + /* Typeless buffer, turn it into an owned String */ type = MaterialAttributeType::String; value = {property.mData, property.mDataLength}; /* +2 is null byte + size */ From 2d12495f09e1c8a41a2618fc26ad348f0bfd1df1 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 27 Nov 2021 16:21:33 +0100 Subject: [PATCH 46/48] AssimpImporter: skip layered and one raw material test on assimp < 5 Layered FBX materials are not supported, and skipping around indices in materialRawUnrecognized() would be too awkward. Should be enough to test this on 5.0.0 and up --- .../Test/AssimpImporterTest.cpp | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index c8d88b087..b1e5e0cde 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2030,6 +2030,9 @@ void AssimpImporterTest::materialTextureCoordinateSets() { } void AssimpImporterTest::materialTextureLayers() { + if(_assimpVersion < 500) + CORRADE_SKIP("This version of assimp doesn't imported layered FBX materials."); + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); importer->configuration().setValue("ignoreUnrecognizedMaterialData", true); @@ -2091,6 +2094,9 @@ Containers::StringView extractMaterialKey(const char* data, int, int) { } void AssimpImporterTest::materialRawUnrecognized() { + if(_assimpVersion < 500) + CORRADE_SKIP("This version of Assimp doesn't import AI_MATKEY_COLOR_TRANSPARENT from FBX files."); + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); /* Disabled by default */ CORRADE_VERIFY(!importer->configuration().value("ignoreUnrecognizedMaterialData")); @@ -2139,7 +2145,11 @@ void AssimpImporterTest::materialRaw() { CORRADE_VERIFY(material); CORRADE_COMPARE(material->types(), MaterialType{}); CORRADE_COMPARE(material->layerCount(), 1); - CORRADE_COMPARE(material->attributeCount(), 5); + { + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 500, + "This version of Assimp doesn't import raw FBX material properties."); + CORRADE_COMPARE(material->attributeCount(), 5); + } /* Not all types and sizes are tested: - no importers currently output int2/3/4/5+ or float2/5+ @@ -2167,11 +2177,15 @@ void AssimpImporterTest::materialRaw() { /* Raw attributes taken directly from the FBX file, prefixed with "$raw.". Seems to be the only importer that supports that. */ } { + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 500, + "This version of Assimp doesn't import raw FBX material properties."); CORRADE_COMPARE(material->attributeName(3), "$raw.SomeColor"_s); CORRADE_COMPARE(material->attributeType(3), MaterialAttributeType::Vector3); CORRADE_COMPARE(material->attribute(3), (Vector3{0.1f, 0.2f, 0.3f})); } { -CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 500, + "This version of Assimp doesn't import raw FBX material properties."); + CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); CORRADE_COMPARE(material->attributeType(4), MaterialAttributeType::String); CORRADE_COMPARE(material->attribute(4), "Ministry of Finance (Turkmenistan)"); } @@ -2260,6 +2274,9 @@ CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); } void AssimpImporterTest::materialRawTextureLayers() { + if(_assimpVersion < 500) + CORRADE_SKIP("This version of assimp doesn't imported layered FBX materials."); + Containers::Pointer importer = _manager.instantiate("AssimpImporter"); importer->configuration().setValue("forceRawMaterialData", true); From ba7c80ec49ea122e3ffa8932539a36c521136895 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 27 Nov 2021 16:22:18 +0100 Subject: [PATCH 47/48] AssimpImporter: actually test raw import of new texture types --- .../Test/AssimpImporterTest.cpp | 20 ++++++++++++++----- .../AssimpImporter/Test/material-raw.gltf | 7 +++++-- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index b1e5e0cde..58aee4a15 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2239,16 +2239,27 @@ void AssimpImporterTest::materialRaw() { constexpr Containers::StringView name = _AI_MATKEY_TEXTURE_BASE ".NORMALS"_s; CORRADE_VERIFY(material->hasAttribute(name)); CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::String); - CORRADE_COMPARE(material->attribute(name), "texture.png"_s); + CORRADE_COMPARE(material->attribute(name), "normals.png"_s); } { + /* Testing that newer texture types are handled correctly by the SFINAE + magic that produces fallback switch values */ CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, - "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVWSRC."); - - constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".NORMALS"_s; + "Versions before Assimp 5.1.0 don't import BASE_COLOR textures."); + constexpr Containers::StringView name = _AI_MATKEY_TEXTURE_BASE ".BASE_COLOR"_s; const bool hasAttribute = material->hasAttribute(name); CORRADE_VERIFY(hasAttribute); /* Still have to skip the checks to not trigger asserts for missing attribute names in attributeType() and attribute() */ + if(hasAttribute) { + CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::String); + CORRADE_COMPARE(material->attribute(name), "basecolor.png"_s); + } + } { + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, + "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVWSRC."); + constexpr Containers::StringView name = _AI_MATKEY_UVWSRC_BASE ".NORMALS"_s; + const bool hasAttribute = material->hasAttribute(name); + CORRADE_VERIFY(hasAttribute); if(hasAttribute) { CORRADE_COMPARE(material->attributeType(name), MaterialAttributeType::Int); CORRADE_COMPARE(material->attribute(name), 1); @@ -2256,7 +2267,6 @@ void AssimpImporterTest::materialRaw() { } { CORRADE_EXPECT_FAIL_IF(_assimpVersion < 510, "Versions before Assimp 5.1.0 don't import AI_MATKEY_UVTRANSFORM."); - constexpr Containers::StringView name = _AI_MATKEY_UVTRANSFORM_BASE ".NORMALS"_s; const bool hasAttribute = material->hasAttribute(name); CORRADE_VERIFY(hasAttribute); diff --git a/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf b/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf index 904f9cadd..97510b1c5 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf +++ b/src/MagnumPlugins/AssimpImporter/Test/material-raw.gltf @@ -4,7 +4,10 @@ }, "images": [ { - "uri": "texture.png" + "uri": "basecolor.png" + }, + { + "uri": "normals.png" } ], "nodes": [ @@ -93,7 +96,7 @@ }, { "sampler": 0, - "source": 0 + "source": 1 } ], "extensionsUsed": [ From 9366ae0c984e710a1db599a0d3647778221376c4 Mon Sep 17 00:00:00 2001 From: Pablo Escobar Date: Sat, 27 Nov 2021 16:34:54 +0100 Subject: [PATCH 48/48] AssimpImporter: fix raw FBX property test on Assimp < 5 --- .../Test/AssimpImporterTest.cpp | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp index 58aee4a15..7b84aceed 100644 --- a/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp +++ b/src/MagnumPlugins/AssimpImporter/Test/AssimpImporterTest.cpp @@ -2173,21 +2173,24 @@ void AssimpImporterTest::materialRaw() { CORRADE_COMPARE(material->attributeName(2), extractMaterialKey(AI_MATKEY_OPACITY)); CORRADE_COMPARE(material->attributeType(2), MaterialAttributeType::Float); CORRADE_COMPARE(material->attribute(2), 0.25f); + } - /* Raw attributes taken directly from the FBX file, prefixed with "$raw.". - Seems to be the only importer that supports that. */ - } { - CORRADE_EXPECT_FAIL_IF(_assimpVersion < 500, - "This version of Assimp doesn't import raw FBX material properties."); - CORRADE_COMPARE(material->attributeName(3), "$raw.SomeColor"_s); - CORRADE_COMPARE(material->attributeType(3), MaterialAttributeType::Vector3); - CORRADE_COMPARE(material->attribute(3), (Vector3{0.1f, 0.2f, 0.3f})); - } { - CORRADE_EXPECT_FAIL_IF(_assimpVersion < 500, - "This version of Assimp doesn't import raw FBX material properties."); - CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); - CORRADE_COMPARE(material->attributeType(4), MaterialAttributeType::String); - CORRADE_COMPARE(material->attribute(4), "Ministry of Finance (Turkmenistan)"); + if(_assimpVersion < 500) + CORRADE_WARN("This version of Assimp doesn't import raw FBX material properties."); + else { + /* Raw attributes taken directly from the FBX file, prefixed with "$raw.". + Seems to be the only importer that supports that. */ + { + CORRADE_COMPARE(material->attributeName(3), "$raw.SomeColor"_s); + CORRADE_COMPARE(material->attributeType(3), MaterialAttributeType::Vector3); + CORRADE_COMPARE(material->attribute(3), (Vector3{0.1f, 0.2f, 0.3f})); + } { + CORRADE_EXPECT_FAIL_IF(_assimpVersion < 500, + "This version of Assimp doesn't import raw FBX material properties."); + CORRADE_COMPARE(material->attributeName(4), "$raw.SomeString"_s); + CORRADE_COMPARE(material->attributeType(4), MaterialAttributeType::String); + CORRADE_COMPARE(material->attribute(4), "Ministry of Finance (Turkmenistan)"); + } } if(_assimpVersion < 410)