* Determine the original vertex index based on the position
The Assimp library does not expose the FBX control point indices. This
change causes vertices that are close enough in their position to be
considered as coming from the same control point. This allows the mesh
optimizer to consider vertices with the same control point index (or
"original vertex index" as it is called in the code) for deduplication.
Signed-off-by: Chris Burel <burelc@amazon.com>
* Use a filter view instead of reimplementing a filter view
Signed-off-by: Chris Burel <burelc@amazon.com>
* Don't attempt to weld similar vertices if there's blendshapes
Signed-off-by: Chris Burel <burelc@amazon.com>
* Add test for the mesh optimizer's ability to weld nearby vertices
Signed-off-by: Chris Burel <burelc@amazon.com>
* Add logging call to show mesh optimizer effect on vertex count
Signed-off-by: Chris Burel <burelc@amazon.com>
* Use a bunch of temporaries in order to make `position` `const`
Signed-off-by: Chris Burel <burelc@amazon.com>
* First pass FBX -> Scene File conversion.
This is the simple pass, minimizing code changes and focused on comments.
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Step 1 of part 2 of the FBX -> Scene rename
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Renaming FbxSceneBuilder folder to SceneBuilder
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Renamed files
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* More FBX -> Scene
Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
* Final update copyright headers to reference license files at the repo root
Signed-off-by: spham <spham@amazon.com>
* Fix copyright validator unit tests to support the stale O3DE header scenario
Signed-off-by: spham <spham@amazon.com>
Some nodes have aiBones created by AssImp even though they aren't bones. Filter these out by looking through the node graph and only considering
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
Use first offsetMatrix for a bone (there may be multiple) and calculate using offsetOfParent * inverseRootOffset * rootOffset * inverseOffset
(cherry picked from commit a8eae976dda39ad28f9aa235e1e6ba34715ac48a)
# Conflicts:
# Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp
For bone nodes, the Transform is computed by multiplying the parent offsetMatrix by the inverse of the node's offsetMatrix
Note that this currently disables the LimitBoneWeights option since that results in the removal of bone nodes that are not attached to a mesh.
Without the bones there is no way to retrieve the offsetMatrix, so the Transform cannot be computed correctly
Fixes LYN-3755
* Abort calls in AssImp, which occur when an assert is hit in builds that have asserts enabled (like debug) no longer generate a popup. Instead, they are captured as errors and an asset processing failure.
* Added missing include
* Added check for _WRITE_ABORT_MSG, so platforms that don't have it but have signals enabled (Linux profile) compile correctly
* Revert "FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)"
This reverts commit 58adcf168f.
* Revert "Merge pull request #753 from aws-lumberyard-dev/Helios_DataDrivenAssetImporter"
This reverts commit 798d96f1a2, reversing
changes made to eb31d90ad9.
* Revert "Revert "Merge pull request #753 from aws-lumberyard-dev/Helios_DataDrivenAssetImporter""
This reverts commit c1124f26d957388e88cc4990021314b5af247e1d.
* Revert "Revert "FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)""
This reverts commit 978477097892a22e83519646527ff52ba6532f35.
* Fixed how FbxImportRequestHandler is loaded
* Bumped version to force FBX to rebuild + removed unused variable
* Revert "Revert "FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)""
This reverts commit 978477097892a22e83519646527ff52ba6532f35.
* Revert "Revert "Merge pull request #753 from aws-lumberyard-dev/Helios_DataDrivenAssetImporter""
This reverts commit c1124f26d957388e88cc4990021314b5af247e1d.
* Fixed a bad revert
* Better error reporting at AP launch
* AZ_CRC -> AZ_CRC_CE and removed delayed reload of settings registry file now that it's available at startup
* fixed typo in comment
* Revert "FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)"
This reverts commit 58adcf168f.
* Revert "Merge pull request #753 from aws-lumberyard-dev/Helios_DataDrivenAssetImporter"
This reverts commit 798d96f1a2, reversing
changes made to eb31d90ad9.
* FBX settings can be opened again: g_fbxImporter is set, and if the extension list is empty, it is reloaded.
* auto -> auto*, .size() == 0 -> .empty()
Previously FbxImportRequestHandler used to be activated as part of DllMain init and never had CreateDescriptor called, which meant reflect was not called. BehaviorComponents get created and Activated as part of special SceneCore logic. Since this component now needs to be activated as part of the normal flow, reflecting it caused it to be picked up by the SceneCore activate logic, causing it to be created/activated twice
* Helios - LYN-3250 - Fixed morph targets for meshes that had multiple materials (#374)
Fixed morph targets for meshes that had multiple materials and were split by AssImp: Recombined them into one mesh in the O3DE scene graph, so the behavior would match FBX SDK.