Commit Graph

120 Commits (b609d5e2cb2c63e6f38568f7793d0c414e07cd88)

Author SHA1 Message Date
amzn-victor 7164b64bb5
Move BuildDebugSceneGraph function out of SceneProcessing gem (#3290)
Moved BuildDebugSceneGraph out of SceneProcessing gem and into DebugOutput class to allow the function to be shared, which ensures the same dbgsg format is outputted among any calls to the function.

* Move BuildDebugSceneGraph function, update all calls to this function

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Remove unused includes

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Remove z

Signed-off-by: Victor Huang <huavicto@amazon.com>
4 years ago
amzn-victor eb1593a19c
Changes to SDK wrappers and functions to allow more flexible scene file processing (#3112)
These changes allow for usage of different asset import SDKs to process scene files.

    Move AssImp specific code out of node, scene & material wrapper parent classes and into child wrapper classes (AssImpNodeWrapper, etc.), allowing child classes to expose import SDK code. Allows for more convenient implementation of other import SDK's elsewhere (such as in a gem).
    Add a loadingComponentUuid parameter to LoadSceneFromVerifiedPath to allow for usage of different loading components. Changed tests and all calls to this function accordingly.


* Move AssImp specific code out of wrapper parent classes and into child classes for gem usage

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Add loadingComponentUuid parameter to LoadSceneFromVerifiedPath function

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Make wrapper members protected, change pointer cast

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Adding spaces to fix style

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Fix for pointer cast causing test failures

Signed-off-by: Victor Huang <huavicto@amazon.com>
4 years ago
AMZN-stankowi b88a7faf64
Fixed issues with blend shape animations (#3080)
Duplicate blend shape animations are now handled correctly.
Invalid animation targets are now an error instead of a crash in the builder.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
4 years ago
Esteban Papp 9f7d280a1e Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/ResourceSelectorHost.cpp
4 years ago
Artur K 4cee263033
Minimal TypeInfo header/reduce std interdependencies. (#2688)
* Minimal TypeInfo header/reduce std interdependencies.

TypeInfoSimple.h is a small header that can replace the use of
TypeInfo.h in some cases.

Signed-off-by: Nemerle <nemerle5+git@gmail.com>

* Windows build fixed

Removed algorithm.h from string_view.h

smoke-test passed

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Resotore dynamic_pointer_cast in intrusive_ptr

Requested by reviewer.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix CI build

string.h - missed alogorithm.h, since it was removed from string_view
NodeWrapper.h - missing smart_ptr.h

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

Co-authored-by: Nemerle <nemerle5+git@gmail.com>
4 years ago
Esteban Papp 2147b1d128 Merge branch 'development' into cmake/SPEC-7484 4 years ago
Esteban Papp 2d1ed48fea Merge branch 'development' into cmake/SPEC-2513_w4018
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Gems/EMotionFX/Code/EMotionFX/Source/Actor.cpp
4 years ago
Esteban Papp ec1a08d487 Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/ConfigGroup.cpp
#	Code/Editor/ControlMRU.cpp
#	Code/Editor/CryEdit.cpp
#	Code/Editor/CryEdit.h
#	Code/Editor/IEditorImpl.cpp
#	Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameController.cpp
4 years ago
AMZN-stankowi 0005f2b9da
Updated skeleton logic: (#2957)
Import all nodes as bones. O3DE's concept of a bone is different than AssImp's.
Updated GetLocalSpaceBindPoseTransform to only use the offset matrix if the parent is also a bone.
Results:
All test assets I've tried match Blender's "Rest Position" when loaded in the Character tool.
All test animations I've tried work generally as well as they worked before, and a few better. This resolves the issue that was originally opened, an internal test asset loaded the skeleton incorrectly.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
4 years ago
Esteban Papp e28d04aea6 Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/CryEditDoc.cpp
#	Code/Editor/CryEditDoc.h
#	Code/Legacy/CryCommon/CryArray.h
#	Code/Legacy/CryCommon/CryString.h
#	Code/Legacy/CryCommon/UnicodeBinding.h
#	Code/Legacy/CrySystem/LocalizedStringManager.cpp
#	Gems/LyShine/Code/Source/StringUtfUtils.h
#	Gems/PhysXDebug/Code/Source/SystemComponent.cpp
4 years ago
Esteban Papp 9f18b6f1be fixes for new code
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste eb3e0b0998 updates after merging development
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste 10f950b726 fix w4018
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 895dc09176 addressing PR comments/suggestions
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 0dc829891a fixing build
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp aa12434728 removing some dead code, commented code referring old types, static AZStd::strings
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste f301c3b43a Code/Tools
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Benjamin Jillich a3712b5564
TSpace setting for MikkT tangent generation (#2386)
* Added TSpace method setting which is only visible for MikkT generation.
* Fixed a bug with generating tangents for blend shapes.
* Renamed tangent space into generation method.
* Some code cleaning

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Benjamin Jillich 8f35def25b
AssImp skeleton import improvements (#2348)
* Disabled to skip exporting a node in case there are child bones underneath, this broke motion extraction as we skipped the motion extraction node.
* Added several helper methods for getting the local space bind pose transform, finding all bones, getting the first bone for a given node name and a recursive has child bones.
* Unified the cloned get all bone methods.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Benjamin Jillich dbe6bb673e
Merge pull request #2277 from aws-lumberyard-dev/burelc/LYN-4490
[MeshOptimizer] Weld nearby vertices when optimizing meshes
4 years ago
Benjamin Jillich 001aa96fae
Merge pull request #2299 from aws-lumberyard-dev/jillich/TangentsGeneration
MikkT tangent generation support
4 years ago
Benjamin Jillich d987c45072 MikkT tangent generation support
* Default setting when no tangents rule: MikkT tangents.
* Calculates tangents/bitangents for all available uv sets.
* Creates tangent/bitangent data in in case they are not existing yet (as in: the source scene contains tangents/bitangents)
* Overwrites the tangent/bitangent data from the source scene in case MikkT is wished.
* Added helper functions to create tangent/bitangent scene nodes, finding tangent/bitangent data for a given uv layer and calculating the number of uv layers provided by the mesh scene node.

Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Esteban Papp a08f850766
Merge pull request #2284 from nemerle/header_inclution_reductions_pt1
Reduce inclusion overhead a little bit
4 years ago
AMZN-stankowi 69b5c04b7f
Cleared m_scriptFilename between scene files. (#2278)
This fixes a bug where a Python script file would be run on a scene file
that didn't have a script file set.
Added a general case version to SceneBuilderWorker.cpp, to make it easy
to mark all scene files as dirty.
Automated tests for this will come in a separate pull request.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
4 years ago
sharmajs-amzn d5431e1c57
{LYN-4996} Asset Processor is not reprocessing STL files after settings are edited/updated (#2095)
* add asset importer file extension

Signed-off-by: sharmajs <sharmajs@amazon.com>

* add new test setreg file

Signed-off-by: sharmajs <sharmajs@amazon.com>

* removed an unnecessary namespace

Signed-off-by: sharmajs <sharmajs@amazon.com>

* addressed feedback

Signed-off-by: sharmajs <sharmajs@amazon.com>

* addressed feedback

Signed-off-by: sharmajs <sharmajs@amazon.com>

* remove unnecessay method

Signed-off-by: sharmajs <sharmajs@amazon.com>

* add file

Signed-off-by: sharmajs <sharmajs@amazon.com>

* reduce waiting time in block until idle

Signed-off-by: sharmajs <sharmajs@amazon.com>
4 years ago
Benjamin Jillich fe661bc159 Register tangents rule for mesh groups, so users can add it to the scene settings
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
Benjamin Jillich 424ee5d5e8 Removed emfx legacy tangent generation settings from tangents rule
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
4 years ago
amzn-mike fc75dd5fda
Fix python fbx tests (#2171)
* Update fbx test dbgsg files

Remove rc products from fbx test expected output
Update warning counts for 2 of the tests - these are due to missing material properties
Add SkipAtomOutput setting to disable atom material and mesh processing in scene as these pull in a lot of external dependencies to Process
Removed BlendShapeData and MeshData debug output of positions/normals/faces
Updated ManifestImportRequestHandler to remove warning about Joining 2 absolute paths
Updated AssImpMaterialImporter to use new GenerateRelativeSourcePath API to fix issue where relative path generation failed with tmp project directories

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add comment for setting

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Add override dbgsg file to python test

The mesh optimizer specifically avoids creating optimized nodes for nodes that are not selected, resulting in a different scene graph that requires a different dbgsg file to compare with

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>

* Replace hardcoded passing of specific registry setting to instead pass all registry settings to AssetBuilder

Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
4 years ago
nemerle e76b65fce9 Reduce inclusion overhead a little bit
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
4 years ago
Chris Burel 8702f0cd2e Add test for the mesh optimizer's ability to weld nearby vertices
Signed-off-by: Chris Burel <burelc@amazon.com>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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>
4 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
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>
5 years ago
amzn-mike af45aa299e Merge branch 'stabilization/2106' into Helios_LYN-4880-IncorrectBoneNodes 5 years ago
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>
5 years ago
amzn-mike 0a241d8fd0 Bump version
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
5 years ago
amzn-mike d2d8e8bc3e unsigned to unsigned int
Signed-off-by: amzn-mike <80125227+amzn-mike@users.noreply.github.com>
5 years ago
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>
5 years ago
amzn-mike 63dd82aed3
Merge pull request #1498 from aws-lumberyard-dev/Helios_LYN-3723-FixPBRNormalMapImport
[LYN-3723] Fix Stingray PBR normal map import
5 years ago
amzn-mike 03a6d1e0f5 Merge branch 'stabilization/2106' into Helios_LYN-4742-AssImpRootTransformFix 5 years ago
amzn-mike 0e8a2ca110 Merge branch 'stabilization/2106' into Helios_LYN-3723-FixPBRNormalMapImport 5 years ago
amzn-mike 64e139aa97 Merge branch 'stabilization/2106' into Helios_LYN-3723-FixPBRNormalMapImport 5 years ago
amzn-mike 09b7d57dc4 Merge branch 'stabilization/2106' into Helios_AssImpAnimationOnAllBones 5 years ago
amzn-mike 9e2f1aed91 Add comment 5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago