From 45fbc86d2d1c4da72dc59b0160f7f3f06847e178 Mon Sep 17 00:00:00 2001 From: Aaron Ruiz Mora Date: Fri, 23 Apr 2021 21:42:17 +0100 Subject: [PATCH] Fix cloth with MeshOptimization ON - Reexport cloth assets with AssImp ON. These was necessary because AssImp collects a different name for the color streams than FbxSDK and therefore they needed to be reassigned in the cloth rule. - Adding '_optimized' string to a global variable and using StringFunc RChop to remove it for a string. --- .../SceneCore/DataTypes/Rules/IClothRule.h | 8 +- .../Utilities/SceneGraphSelector.cpp | 2 +- .../SceneCore/Utilities/SceneGraphSelector.h | 2 + .../Model/ModelAssetBuilderComponent.cpp | 13 +- .../cloth/Chicken/Actor/chicken.fbx.assetinfo | 606 +++++++----------- .../Environment/cloth_blinds.fbx.assetinfo | 5 +- .../cloth_blinds_broken.fbx.assetinfo | 4 +- .../cloth_locked_corners_four.fbx.assetinfo | 5 +- .../cloth_locked_corners_two.fbx.assetinfo | 5 +- .../cloth_locked_edge.fbx.assetinfo | 5 +- .../MeshOptimizer/MeshOptimizerComponent.cpp | 4 +- 11 files changed, 281 insertions(+), 378 deletions(-) diff --git a/Code/Tools/SceneAPI/SceneCore/DataTypes/Rules/IClothRule.h b/Code/Tools/SceneAPI/SceneCore/DataTypes/Rules/IClothRule.h index 18162674e4..b88a0897b8 100644 --- a/Code/Tools/SceneAPI/SceneCore/DataTypes/Rules/IClothRule.h +++ b/Code/Tools/SceneAPI/SceneCore/DataTypes/Rules/IClothRule.h @@ -18,6 +18,7 @@ #include #include #include +#include namespace AZ { @@ -50,7 +51,12 @@ namespace AZ { AZStd::vector clothData; - const char* meshNodeName = graph.GetNodeName(meshNodeIndex).GetPath(); + AZStd::string_view meshNodeName = graph.GetNodeName(meshNodeIndex).GetPath(); + + if (meshNodeName.ends_with(Utilities::OptimizedMeshSuffix)) + { + meshNodeName.remove_suffix(Utilities::OptimizedMeshSuffix.size()); + } for (size_t ruleIndex = 0; ruleIndex < rules.GetRuleCount(); ++ruleIndex) { diff --git a/Code/Tools/SceneAPI/SceneCore/Utilities/SceneGraphSelector.cpp b/Code/Tools/SceneAPI/SceneCore/Utilities/SceneGraphSelector.cpp index 981380fe00..ee637dd4dc 100644 --- a/Code/Tools/SceneAPI/SceneCore/Utilities/SceneGraphSelector.cpp +++ b/Code/Tools/SceneAPI/SceneCore/Utilities/SceneGraphSelector.cpp @@ -47,7 +47,7 @@ namespace AZ Containers::SceneGraph::NodeIndex SceneGraphSelector::RemapToOptimizedMesh(const Containers::SceneGraph& graph, const Containers::SceneGraph::NodeIndex& index) { const auto& nodeName = graph.GetNodeName(index); - const AZStd::string optimizedName = AZStd::string(nodeName.GetPath(), nodeName.GetPathLength()) + "_optimized"; + const AZStd::string optimizedName = AZStd::string(nodeName.GetPath(), nodeName.GetPathLength()).append(OptimizedMeshSuffix); if (auto optimizedIndex = graph.Find(optimizedName); optimizedIndex.IsValid()) { return optimizedIndex; diff --git a/Code/Tools/SceneAPI/SceneCore/Utilities/SceneGraphSelector.h b/Code/Tools/SceneAPI/SceneCore/Utilities/SceneGraphSelector.h index 535a7a9637..8a86bf9dc2 100644 --- a/Code/Tools/SceneAPI/SceneCore/Utilities/SceneGraphSelector.h +++ b/Code/Tools/SceneAPI/SceneCore/Utilities/SceneGraphSelector.h @@ -22,6 +22,8 @@ namespace AZ::SceneAPI::DataTypes { class ISceneNodeSelectionList; } namespace AZ::SceneAPI::Utilities { + inline constexpr AZStd::string_view OptimizedMeshSuffix = "_optimized"; + // SceneGraphSelector provides utilities including converting selected and unselected node lists // in the MeshGroup into the final target node list. class SceneGraphSelector diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp index f16d2c6fc9..ea2bdd0d83 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelAssetBuilderComponent.cpp @@ -205,7 +205,7 @@ namespace AZ const auto isNonOptimizedMesh = [](const SceneAPI::Containers::SceneGraph& graph, SceneAPI::Containers::SceneGraph::NodeIndex& index) { return SceneAPI::Utilities::SceneGraphSelector::IsMesh(graph, index) && - !AZStd::string_view{graph.GetNodeName(index).GetName(), graph.GetNodeName(index).GetNameLength()}.ends_with("_optimized"); + !AZStd::string_view{graph.GetNodeName(index).GetName(), graph.GetNodeName(index).GetNameLength()}.ends_with(SceneAPI::Utilities::OptimizedMeshSuffix); }; if (lodRule) @@ -310,7 +310,16 @@ namespace AZ // Gather mesh content SourceMeshContent sourceMesh; - sourceMesh.m_name = meshName; + + // Although the nodes used to gather mesh content are the optimized ones (when found), to make + // this process transparent for the end-asset generated, the name assigned to the source mesh + // content will not include the "_optimized" prefix. + AZStd::string_view sourceMeshName = meshName; + if (sourceMeshName.ends_with(SceneAPI::Utilities::OptimizedMeshSuffix)) + { + sourceMeshName.remove_suffix(SceneAPI::Utilities::OptimizedMeshSuffix.size()); + } + sourceMesh.m_name = sourceMeshName; const auto node = sceneGraph.Find(meshPath); sourceMesh.m_worldTransform = AZ::SceneAPI::Utilities::DetermineWorldTransform(scene, node, context.m_group.GetRuleContainerConst()); diff --git a/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken.fbx.assetinfo index 808b024189..0036fa39f9 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken.fbx.assetinfo +++ b/Gems/NvCloth/Assets/Objects/cloth/Chicken/Actor/chicken.fbx.assetinfo @@ -1,362 +1,244 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +{ + "values": [ + { + "$type": "ActorGroup", + "name": "chicken", + "id": "{C086F309-EE7E-5AFD-A9C2-69DE5BA48461}", + "rules": { + "rules": [ + { + "$type": "MetaDataRule", + "metaData": "AdjustActor -actorID $(ACTORID) -name \"chicken\"\nActorSetCollisionMeshes -actorID $(ACTORID) -lod 0 -nodeList \"\"\nAdjustActor -actorID $(ACTORID) -nodesExcludedFromBounds \"\" -nodeAction \"select\"\nAdjustActor -actorID $(ACTORID) -nodeAction \"replace\" -attachmentNodes \"\"\nAdjustActor -actorID $(ACTORID) -mirrorSetup \"\"\n" + }, + { + "$type": "ActorPhysicsSetupRule", + "data": { + "config": { + "clothConfig": { + "nodes": [ + { + "name": "def_c_head_joint", + "shapes": [ + [ + { + "Visible": true, + "Position": [ + -0.08505599945783615, + 0.0, + 0.009370899759232998 + ], + "Rotation": [ + 0.7071437239646912, + 0.0, + 0.0, + 0.708984375 + ], + "propertyVisibilityFlags": 248 + }, + { + "$type": "CapsuleShapeConfiguration", + "Height": 0.191273495554924, + "Radius": 0.05063670128583908 + } + ] + ] + }, + { + "name": "def_c_neck_joint", + "shapes": [ + [ + { + "Visible": true, + "Position": [ + 0.08189810067415238, + -2.4586914726398847e-9, + -0.4713243842124939 + ], + "propertyVisibilityFlags": 248 + }, + { + "$type": "SphereShapeConfiguration", + "Radius": 0.2406993955373764 + } + ] + ] + }, + { + "name": "def_c_spine_end", + "shapes": [ + [ + { + "Visible": true, + "Position": [ + -2.0000000233721949e-7, + 0.012646200135350228, + -0.24104370176792146 + ], + "propertyVisibilityFlags": 248 + }, + { + "$type": "SphereShapeConfiguration", + "Radius": 0.24875959753990174 + } + ] + ] + }, + { + "name": "def_c_feather2_joint", + "shapes": [ + [ + { + "Visible": true, + "Position": [ + 0.06151500344276428, + 0.1300000101327896, + 7.729977369308472e-8 + ], + "Rotation": [ + 0.0, + 0.7071062922477722, + 0.0, + 0.7071072459220886 + ], + "propertyVisibilityFlags": 248 + }, + { + "$type": "CapsuleShapeConfiguration", + "Height": 0.5730299949645996, + "Radius": 0.06151498109102249 + } + ] + ] + } + ] + } + } + } + } + ] + } + }, + { + "$type": "{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup", + "name": "chicken", + "nodeSelectionList": { + "selectedNodes": [ + "RootNode", + "RootNode.chicken_skeleton", + "RootNode.chicken_feet_skin", + "RootNode.chicken_eyes_skin", + "RootNode.chicken_body_skin", + "RootNode.chicken_mohawk", + "RootNode.chicken_skeleton.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint", + "RootNode.chicken_feet_skin.SkinWeight_0", + "RootNode.chicken_feet_skin.transform", + "RootNode.chicken_feet_skin.map1", + "RootNode.chicken_feet_skin.chicken_body_mat", + "RootNode.chicken_eyes_skin.SkinWeight_0", + "RootNode.chicken_eyes_skin.transform", + "RootNode.chicken_eyes_skin.uvSet1", + "RootNode.chicken_eyes_skin.chicken_eye_mat", + "RootNode.chicken_body_skin.SkinWeight_0", + "RootNode.chicken_body_skin.transform", + "RootNode.chicken_body_skin.map1", + "RootNode.chicken_body_skin.chicken_body_mat", + "RootNode.chicken_mohawk.Col0", + "RootNode.chicken_mohawk.SkinWeight_0", + "RootNode.chicken_mohawk.transform", + "RootNode.chicken_mohawk.map1", + "RootNode.chicken_mohawk.mohawkMat", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.def_l_ball_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.def_r_ball_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.def_c_tail2_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.def_l_wing_end", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.def_r_wing_end", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_l_uprLeg_joint.def_l_lwrLeg_joint.def_l_foot_joint.def_l_ball_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_r_uprLeg_joint.def_r_lwrLeg_joint.def_r_foot_joint.def_r_ball_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_tail1_joint.def_c_tail2_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_l_wing1_joint.def_l_wing2_joint.def_l_wing_end.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_r_wing1_joint.def_r_wing2_joint.def_r_wing_end.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.def_c_mouth_end", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_mouth_joint.def_c_mouth_end.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.def_c_waddle_end", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.def_c_feather_end", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_waddle1_joint.def_c_waddle2_joint.def_c_waddle3_joint.def_c_waddle_end.transform", + "RootNode.chicken_skeleton.def_c_chickenRoot_joint.def_c_spine1_joint.def_c_spine2_joint.def_c_spine3_joint.def_c_spine_end.def_c_neck_joint.def_c_head_joint.def_c_feather1_joint.def_c_feather2_joint.def_c_feather3_joint.def_c_feather4_joint.def_c_feather_end.transform" + ] + }, + "rules": { + "rules": [ + { + "$type": "SkinRule" + }, + { + "$type": "StaticMeshAdvancedRule", + "vertexColorStreamName": "Disabled" + }, + { + "$type": "MaterialRule" + }, + { + "$type": "ClothRule", + "meshNodeName": "RootNode.chicken_mohawk", + "inverseMassesStreamName": "Col0", + "motionConstraintsStreamName": "Default: 1.0", + "backstopStreamName": "None" + } + ] + }, + "id": "{55E26F74-B35F-4BC1-87BB-83E3DE85C346}" + } + ] +} \ No newline at end of file diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.fbx.assetinfo index 31579601d7..cbde27b201 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.fbx.assetinfo +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds.fbx.assetinfo @@ -7,7 +7,8 @@ "selectedNodes": [ "RootNode", "RootNode.pPlane1", - "RootNode.pPlane1.colorSet1", + "RootNode.pPlane1.Col0", + "RootNode.pPlane1.transform", "RootNode.pPlane1.map1", "RootNode.pPlane1.lambert1" ] @@ -24,7 +25,7 @@ { "$type": "ClothRule", "meshNodeName": "RootNode.pPlane1", - "inverseMassesStreamName": "colorSet1", + "inverseMassesStreamName": "Col0", "motionConstraintsStreamName": "Default: 1.0", "backstopStreamName": "None" } diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.fbx.assetinfo index 559e22f8da..1636e063a7 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.fbx.assetinfo +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_blinds_broken.fbx.assetinfo @@ -7,8 +7,8 @@ "selectedNodes": [ "RootNode", "RootNode.pPlane1", + "RootNode.pPlane1.Col0", "RootNode.pPlane1.transform", - "RootNode.pPlane1.colorSet1", "RootNode.pPlane1.map1", "RootNode.pPlane1.lambert1" ] @@ -25,7 +25,7 @@ { "$type": "ClothRule", "meshNodeName": "RootNode.pPlane1", - "inverseMassesStreamName": "colorSet1", + "inverseMassesStreamName": "Col0", "motionConstraintsStreamName": "Default: 1.0", "backstopStreamName": "None" } diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.fbx.assetinfo index 7c4f295d20..aea3110a42 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.fbx.assetinfo +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_four.fbx.assetinfo @@ -7,7 +7,8 @@ "selectedNodes": [ "RootNode", "RootNode.pPlane1", - "RootNode.pPlane1.colorSet1", + "RootNode.pPlane1.Col0", + "RootNode.pPlane1.transform", "RootNode.pPlane1.map1", "RootNode.pPlane1.lambert1" ] @@ -24,7 +25,7 @@ { "$type": "ClothRule", "meshNodeName": "RootNode.pPlane1", - "inverseMassesStreamName": "colorSet1", + "inverseMassesStreamName": "Col0", "motionConstraintsStreamName": "Default: 1.0", "backstopStreamName": "None" } diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.fbx.assetinfo index 532813e5a1..d23b92be9f 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.fbx.assetinfo +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_corners_two.fbx.assetinfo @@ -7,7 +7,8 @@ "selectedNodes": [ "RootNode", "RootNode.pPlane1", - "RootNode.pPlane1.colorSet1", + "RootNode.pPlane1.Col0", + "RootNode.pPlane1.transform", "RootNode.pPlane1.map1", "RootNode.pPlane1.lambert1" ] @@ -24,7 +25,7 @@ { "$type": "ClothRule", "meshNodeName": "RootNode.pPlane1", - "inverseMassesStreamName": "colorSet1", + "inverseMassesStreamName": "Col0", "motionConstraintsStreamName": "Default: 1.0", "backstopStreamName": "None" } diff --git a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.fbx.assetinfo b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.fbx.assetinfo index 28dd9d6f50..6a56ea23cf 100644 --- a/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.fbx.assetinfo +++ b/Gems/NvCloth/Assets/Objects/cloth/Environment/cloth_locked_edge.fbx.assetinfo @@ -7,7 +7,8 @@ "selectedNodes": [ "RootNode", "RootNode.pPlane1", - "RootNode.pPlane1.colorSet1", + "RootNode.pPlane1.Col0", + "RootNode.pPlane1.transform", "RootNode.pPlane1.map1", "RootNode.pPlane1.lambert1" ] @@ -24,7 +25,7 @@ { "$type": "ClothRule", "meshNodeName": "RootNode.pPlane1", - "inverseMassesStreamName": "colorSet1", + "inverseMassesStreamName": "Col0", "motionConstraintsStreamName": "Default: 1.0", "backstopStreamName": "None" } diff --git a/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshOptimizerComponent.cpp b/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshOptimizerComponent.cpp index 464ac1e334..8be67fe89b 100644 --- a/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshOptimizerComponent.cpp +++ b/Gems/SceneProcessing/Code/Source/Generation/Components/MeshOptimizer/MeshOptimizerComponent.cpp @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include @@ -280,8 +281,7 @@ namespace AZ::SceneGenerationComponents } const AZStd::string name = - AZStd::string(graph.GetNodeName(nodeIndex).GetName(), graph.GetNodeName(nodeIndex).GetNameLength()) - + "_optimized"; + AZStd::string(graph.GetNodeName(nodeIndex).GetName(), graph.GetNodeName(nodeIndex).GetNameLength()).append(SceneAPI::Utilities::OptimizedMeshSuffix); if (graph.Find(name).IsValid()) { AZ_TracePrintf(AZ::SceneAPI::Utilities::LogWindow, "Optimized mesh already exists at '%s', there must be multiple mesh groups that have selected this mesh. Skipping the additional ones.", name.c_str());