• moved all thumbnail classes and registration back to the common feature editor component
• added lighting preset thumbnail as a quick test
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
* Expose OnModelReady to behavior context for hydra automation
Signed-off-by: amzn-tommy <waltont@amazon.com>
* Adding assets used by the hydra test to Atom/TestData
Signed-off-by: amzn-tommy <waltont@amazon.com>
* Attempt to fix line ending
Signed-off-by: amzn-tommy <waltont@amazon.com>
* Moving behavior context for mesh notification bus to the component controller
Signed-off-by: amzn-tommy <waltont@amazon.com>
* Changed the AssetManager DispatchEvents function to continously pump the
AssetBus of queued functions until empty.
This replicates the old behavior of the EBusQueuePolicy::Execute
function that would continue to execute functions if new ones were added
during the execution of the current queue.
Split the TestFixture class from the AssetHandler and EBus handler for the DynamicSliceInstanceSpawnerTests and
PrefabInstanceSpawnerTest.
This avoids the AssetMananager destructor from deleting the test fixture
if the call to UnregisterHandler is ever removed. This also allows the
memory allocators to get online earlier.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing an incorrect [[maybe_unused]]
Signed-off-by: amzn-tommy <waltont@amazon.com>
* Moving incorrectly placed [[maybe_unused]]
Signed-off-by: amzn-tommy <waltont@amazon.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
I had to update the ModelLod class to take in both the ModelLodAsset and ModelAsset for initialization so it can fetch the slots for each mesh.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
Here we inttroduce a new struct ModelMaterialSlot which formalizes the concept of material slot, with an ID, display name, and default material assignment. The ID still comes from the MaterialUid like before. The display name is built-in, rather than being parsed out from the asset file name. And the default material assignment can be any material asset, it doesn't have to come from the FBX (or other scene file).
This commit is just the preliminary set of changes. Cursory testing shows that it works pretty well but more testing is needed (and likely some fixes) before merging.
Here is what's left to do...
Add serialization version converters to preserve prior prefab data.
See if we can get rid of GetLabelByAssetId function only rely on the display name inside ModelMaterialSlot.
I'm not sure if the condition for enabling the "Edit Material Instance..." context menu item is correct.
Test actors
Lots more testing in general
Signed-off-by: santorac <55155825+santorac@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>
-Re-purposed an unused boolean in RPI::Cullable for previous frame's visiblity to instead represent objects that are hidden in the simulation.
-Updated MeshFeatureProcessor::SetVisible to set this value on the cullable.
-Updated the MeshComponent to handle visiblity changes by not rendering the mesh instead of deactivating and/or reactivating the component.
-Updated the AtomActorInstance to handle changes to the visibility from the ActorComponent.
Tested by creating two entities with static mesh components, on entity hidden and the other visible. Plus three entities with actor components, one where the actor is visible, one where the entity is visible but the 'render character' setting on the actor component is disabled, and one where the 'render character' setting is enabled, but the entity is not visible.
For each of these 5 entities, I added them as 5 loose entities, 5 entities that were children to a parent entity, and a slice with all 5 as children to a parent entity, and tested toggling visibility of the parent entities.
For each of these 3 sets of 5 entities, I added them directly to the level, added them all to a layer where the layer was visible, and added them all to a layer where the layer was not visible, and tested toggling the visibility of the layers.
* Move SetUseForwardPassIblSpecular to happen when acquiring a mesh, instead of immediately after so that we don't build the drawpacket twice for every mesh
* Update the MeshFeatureProcessor to use the booleans from the descriptor directly instead of having loose booleans in the MeshDataInstance
* m_excludeFromReflectionCubeMaps is not (and does not need to be) part of the descriptor, since setting is cheap and doesn't duplicate work that is done when acquiring the mesh
* Extend MeshFeatureProcessor to allow changing the mesh bbox, which requires re-compute the culling data for that mesh
* Update actor mesh bbox when EMFX actor instance bbox changes.
Also use the actor instance global bbox to compute the local bbox for the skinned render mesh, instead of the using the static bounds based bbox, as not every actor instance is going to be using the static bounds bbox.
* Store per-instance mesh AABB in the right place.
In the MeshInstanceData, which is unique per instance, instead of in the Model, which is shared between all instances.
For greater clarity, also remove Model::m_aabb and the corresponding getter and setter, as it isn't immediately obvious whether this gets the model asset bbox or the mesh instance bbox. Callers should instead be explicit about which bbox they want.
* Bug fix: model asset is not necessarily ready in AcquireMesh
* Remove now-unused forward declaration
* Update MockMeshFeatureProcessor with SetLocalAabb/GetLocalAabb