Commit Graph

10 Commits (7dabe8b6e966273940e7d98284966104064b783e)

Author SHA1 Message Date
Qing Tao dcdd63966e
ATOM-15658 Better option of CreateCommonBuffer requires unique buffer name (#1133)
* ATOM-15658 Better option of CreateCommonBuffer requires unique buffer name
- Change the CreateCommonBuffer function to not require an unique  name by default.
- Remove the code for generating unique buffer names.
- Add buffer name to BufferAsset so it can be used for device object name instead of using asset file name.
- Change RPI::Buffer to use BufferName_AssetUuid as attachment id.
5 years ago
Chris Burel 5d4226df16
Get a mesh's morph targets based on the scene graph hierarchy, instead of mesh name (#1128)
When building a mesh's morph targets, the exporter has to identify the base
mesh in addition to each morph target mesh. Previously this was done by
searching the entire scene graph for nodes
* of type IBlendShapeData
* whose parent's name matches the name of the Atom model

This is problematic for a few reasons. The first is that the Atom model's
name may have been based on the optimized mesh node. When this happens,
the `OptimizedMeshSuffix` that is used in the Scene Graph node's name is
stripped off of the Atom model's name. The result is that the *unoptimized*
mesh is used as the base mesh for the blend shapes, instead of the
optimized blend shape. This of course results in disaster, since the
optimizer reorders the vertices, and the base mesh will not match the
optimized one. The second is that it is not really necessary to do the
search based on the node name at all. All of a mesh's blend shapes are
child nodes of the base IMeshData node. With this change, the base mesh
is located based on the node data pointer, and all of its child
IBlendShapeData nodes are added to the set of blend shapes to process. This
way, the Atom model's name isn't involved in the lookup.
5 years ago
Tommy Walton ded39be57e
Merging WrinkleMask support from 1.0 to main (#680)
Added a loop to the skin shader that will sample from wrinkle masks, multiply them by a weight, combine them, and use them instead of vertex colors for wrinkle map blending

Added an array of masks, an array of weights, and a wrinkle mask count to the DefaultObjectSrg. -Will create a follow up task to handle this a better way.

Removed motion vector (for now) from skin.materialtype since we're not using them, and removed depthtransparent since skin doesn't support transparency

Added an interface to the MeshFeatureProcessor to get the object srg

Wrapped srg->Compile in if(srg->IsQueuedForCompile()) to prevent compiling twice --This doesn't stop a race condition if both happen at the same time, but that is at least far less likely. It will need a better solution later.

Added a function to the MorphTargetExporter that will check to see if a texture that matches the blend shape name exists in a particular folder, and adds a reference to that image to the MorphTargetMetaAsset --Only supports .tif, and doesn't automatically re-process the .fbx if the folder is updated. These can be improved in later iterations

Added a null check in MaterialTypeSourceData.cpp to fix a crash I ran into

Added a for loop in two places to look for the first submesh that has a morph target, instead of just using the first to check if a lod has morph targets or not. --I have a better fix for this, but it involves more areas of the code, so I'm saving that for another change.

Modified AtomActorInstance to look for any morph targets that have a wrinkle mask reference

Then each frame, for any morph targets with non-zero weights that also have wrinkle masks, it updates the mask array, weights, and count on the object srg.
5 years ago
Aaron Ruiz Mora 45fbc86d2d
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.
5 years ago
alexpete 8469c9ca0a Integrating github/staging through commit 5f214be 5 years ago
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 5 years ago
alexpete c2cbd430fe Integrating up through commit 90f050496 5 years ago
alexpete 36c4e827bd Integrating latest from github/staging
Integrating up through commit 5e1bdae
5 years ago
alexpete 75dc720198 Integrating latest 47acbe8 5 years ago
alexpete a10351f38d Initial commit 5 years ago