Commit Graph

91 Commits

Author SHA1 Message Date
Chris Burel 8702f0cd2e Add test for the mesh optimizer's ability to weld nearby vertices
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-07-19 14:37:53 -07:00
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00
Benjamin Jillich 0863a24490 Revert "[MeshOptimizer] Determine the original vertex index based on the position (#2008)" (#2188)
This reverts commit a077a88d3f due to assets failing on Jenkins.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
2021-07-15 12:18:10 +02:00
Chris Burel a077a88d3f [MeshOptimizer] Determine the original vertex index based on the position (#2008)
* 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>

* Supply the vertex index remapping to the optimized skin weights

This ensures that the optimized skin weights use the vertex indexes from
the optimized mesh

Signed-off-by: Chris Burel <burelc@amazon.com>
2021-07-15 08:44:40 +02:00
jackalbe ffcfa44b49 {LYN-4514} Engine updates to enable PAB for the Blast Gem (#2140)
* {LYN-4514} Engine updates to enable PAB for the Blast Gem

* Engine updates to enable Python Asset Building for the Blast Gem
* added API to detect IsPythonActive()
* ExportProductList behavior
* scene manifest usage of generated assetinfo
* updated ScriptProcessorRuleBehavior to handle OnPrepareForExport

Tests: new tests for scene behavior via ExportProduct

Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>

* updated base on PR feedback
added more comments for IsPythonActive()
added a serializeContext for export product list

Signed-off-by: Jackson <23512001+jackalbe@users.noreply.github.com>
2021-07-14 14:54:22 -05:00
Benjamin Jillich 2ab2503337 Revert "[MeshOptimizer] Determine the original vertex index based on the position (#1562)" (#1902)
This reverts commit ef1f95f1d0.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
2021-07-07 14:28:53 +02:00
Chris Burel ef1f95f1d0 [MeshOptimizer] Determine the original vertex index based on the position (#1562)
* 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>
2021-07-07 11:21:09 +02:00
AMZN-stankowi 0c43493e29 FBX to Scene part 3, tangent generation rule FBX -> SourceScene (#1747)
* Tangent space FromFBX -> FromSourceScene

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
2021-07-02 07:56:54 -07:00
AMZN-stankowi 73522e90c9 FBX -> Scene, part 2. Code changes, file renames (#1704)
* 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>
2021-07-01 15:46:55 -07:00
amzn-mike af45aa299e Merge branch 'stabilization/2106' into Helios_LYN-4880-IncorrectBoneNodes 2021-07-01 10:18:57 -05:00
Steve Pham b4a2edec6a Final update copyright headers to reference license files at the repo root (#1693)
* 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>
2021-06-30 19:51:55 -07:00
amzn-mike 0a241d8fd0 Bump version
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
2021-06-30 13:45:51 -05:00
amzn-mike d2d8e8bc3e unsigned to unsigned int
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
2021-06-30 13:35:27 -05:00
amzn-mike 598c890cbc Fix nodes being incorrectly treated as bones
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>
2021-06-29 15:14:33 -05:00
amzn-mike 63dd82aed3 Merge pull request #1498 from aws-lumberyard-dev/Helios_LYN-3723-FixPBRNormalMapImport
[LYN-3723] Fix Stingray PBR normal map import
2021-06-23 21:15:35 -05:00
amzn-mike 03a6d1e0f5 Merge branch 'stabilization/2106' into Helios_LYN-4742-AssImpRootTransformFix 2021-06-23 18:06:36 -05:00
amzn-mike 0e8a2ca110 Merge branch 'stabilization/2106' into Helios_LYN-3723-FixPBRNormalMapImport 2021-06-23 17:36:04 -05:00
amzn-mike 64e139aa97 Merge branch 'stabilization/2106' into Helios_LYN-3723-FixPBRNormalMapImport 2021-06-23 14:57:38 -05:00
amzn-mike 09b7d57dc4 Merge branch 'stabilization/2106' into Helios_AssImpAnimationOnAllBones 2021-06-23 14:51:24 -05:00
amzn-mike 9e2f1aed91 Add comment 2021-06-23 14:47:47 -05:00
Steve Pham 70042fcdcd O3DE Copyright Updates for Linux Foundation (#1504) 2021-06-23 10:55:22 -07:00
amzn-mike feb58fac5e Fix calculation for root transform 2021-06-22 23:59:40 -05:00
amzn-mike 1137c2d09d Fix importing normals on PBR materials
Some normals are flagged as "NORMAL_CAMERA" by AssImp, so if we can't find NORMALS we fallback to looking for NORMAL_CAMERA
2021-06-22 18:09:06 -05:00
amzn-mike e4e5178261 Add in placeholder animations for all bones as some models require this for correct animations
Matches with previous FBX SDK behavior
2021-06-22 13:04:08 -05:00
amzn-mike 514cfc3b4c Fix compile error 2021-06-21 12:27:13 -05:00
amzn-mike d2d588901e Address PR feedback 2021-06-21 11:00:27 -05:00
amzn-mike ff81b0bfd6 Use contains method instead of find. Rename parentFillerAnimations -> fillerAnimations 2021-06-17 10:40:33 -05:00
amzn-mike 4c9b3b12cb Merge branch 'stabilization/2106' into V2Mainline 2021-06-16 12:05:28 -05:00
amzn-mike 57b19feca5 Cleanup code 2021-06-16 12:03:47 -05:00
AMZN-stankowi 1fd0886b70 Updated AssImp to v10 for Windows Invert PostRotation matrix in animation chains (#1340) 2021-06-16 08:32:47 -07:00
yuriy0 e40a598648 Bug fix: check for valid extension in case insensitive manner (#1339) 2021-06-15 12:41:58 -07:00
amzn-mike 7dc4d8438b Fix non-bone transforms setting the wrong matrix variable
(cherry picked from commit 838a8b47da73e50fca4ea9ee5abc7c33250bf25d)
2021-06-14 08:08:51 -05:00
amzn-mike 9b039c1f9d Fix creating bone data for non-bones
(cherry picked from commit 8d1bdd1456e70e4efc47aa36dce660bc91e7dfcf)
2021-06-14 08:08:31 -05:00
amzn-mike 10999b6999 All bones have animations
(cherry picked from commit d17a8070010cdc5bc4e08d17b1549736d031414a)
2021-06-14 08:06:48 -05:00
amzn-mike 66a030b800 Fix transform data
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
2021-06-14 08:06:25 -05:00
amzn-mike d841f0c0db Got transform result close for 3 bone chain, longer chains are still not correct
(cherry picked from commit 5ac65de6148dcc03b9f2953e97dd943493f23ed9)

# Conflicts:
#	Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp
2021-06-14 08:03:39 -05:00
amzn-mike 9ff007024d Merge branch 'main' into Helios_AssImp_TransformImporterFix 2021-06-13 16:56:44 -05:00
AMZN-stankowi fc0de9e0e3 Added [[maybe unused]] to fix release build compile issue (#1090) 2021-06-02 09:36:34 -07:00
amzn-mike 00a529ad74 Fix AssImpTransformImporter logic for bone nodes
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
2021-05-28 14:58:03 -05:00
greerdv 34abf7376e Merge branch 'main' into transform-float-scale-3 2021-05-28 19:14:45 +01:00
AMZN-stankowi 1369e29c73 Abort calls in AssImp, which occur when an assert is hit in builds th… (#1012)
* 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
2021-05-28 10:44:20 -07:00
greerdv c35c1d67e7 update transform widget to work with uniform scale 2021-05-28 11:34:42 +01:00
AMZN-stankowi 9d94977b2c FbxImportRequestHandler is now loaded only once per AssetBuilder and Editor + re-enabled STL support (#933)
* 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
2021-05-27 08:45:32 -07:00
greerdv ec1d129100 Merge branch 'main' into transform-float-scale 2021-05-25 19:21:32 +01:00
AMZN-stankowi 1da8c50e8e Temporarily backing out STL changes to unblock mainline (#921)
* 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.
2021-05-25 08:54:42 -07:00
greerdv ccccfb2c5b more tidying up 2021-05-25 14:56:08 +01:00
greerdv 42c5801c52 Merge branch 'main' into transform-float-scale 2021-05-24 23:01:29 +01:00
AMZN-stankowi b37be6cdbf New AssImp build, just for Windows. This has the crash fix with bones. (#875) 2021-05-24 10:41:19 -07:00
AMZN-stankowi 58adcf168f FBX settings can be opened again: g_fbxImporter is set, and if the ex… (#878)
* 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()
2021-05-24 10:05:12 -07:00
greerdv 945f55378e merge from main 2021-05-24 11:27:43 +01:00