Commit Graph

74 Commits

Author SHA1 Message Date
Guthrie Adams 56b7ee2bd4 Merge branch 'development' into Atom/guthadam/thumbnail_and_preview_refactor 2021-10-08 16:03:56 -05:00
Terry Michaels 00b938b6a7 Merge pull request #4212 from ppinfel/component-doc-links
Fixes various component's help URL links to correct o3de.org page
2021-10-08 10:30:13 -05:00
Guthrie Adams ab5547fdf7 • Created interface for preview rendering content
• 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>
2021-10-08 02:46:00 -05:00
Tommy Walton aef1f01de2 Expose OnModelReady to behavior context for hydra automation (#4331)
* 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>
2021-10-05 09:58:54 -07:00
amzn-tommy 96d833fc4e Removing a function that was originally added to convert model asset ids in levels that were created prior to December 2020, which pre-dates anything created for the public O3DE release.
Signed-off-by: amzn-tommy <waltont@amazon.com>
2021-09-29 12:07:01 -07:00
Artur K f44169f7fa Cleanup SerializeContext.h pt.1 (#4264)
* Remove AssetSerializer inclusion from SerializeContext header

Moved a few Reflect methods to new cpp files.

In addition, some preparations for further header dependency reductions.

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

* Fix smoke test lua failures.

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

* Windows build fixes.

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

* Missing license headers

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

* Fix white-space issues.

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

* Code review fix for AzToolsFramework/AssetEditor/AssetEditorBus.h

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix inheritance list wrapping broken by older clang-format

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

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-09-29 11:31:01 -05:00
Pinfel 00b5b7ba2d Fixed in-editor "Atom" category components reference links to o3de.org docs
Signed-off-by: Pinfel <ppinfel@gmail.com>
2021-09-19 13:15:05 -04:00
Esteban Papp a7780b6dbe Gems/Atom*
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-09-10 20:16:11 -07:00
moraaar 564925c285 Fix assert: Avoid doing operations over invalid Aabb (#3757)
Signed-off-by: moraaar <moraaar@amazon.com>
2021-09-01 09:43:47 +01:00
Kyle B dfc5baae34 fixed casting errors
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-23 12:46:00 -07:00
Kyle B 8ab9a88683 added cast to version change system lodoverride
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-21 00:21:00 -07:00
Kyle Birnbaum 2b1f4c2fc0 Merge branch 'development' into ExposeLodControls 2021-08-20 12:45:00 -07:00
Kyle B b53a085700 Merge branch 'development' into ExposeLodControls 2021-08-20 12:14:59 -07:00
Kyle B e2a9c58cae fixed unnessisary qualifier error
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-16 23:01:18 -07:00
pappeste b3e895d10c fixed AtomLyIntegration
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-08-16 16:03:38 -07:00
Kyle B 6acbea722e minor syntax changes and adding a refresh tree attributeto the editor component
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-12 18:15:17 -07:00
Kyle B cea334dbc4 Fixed enum value problems
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-11 22:23:06 -07:00
Kyle B 0c05c9f204 [not working] Made lod selection more generic for further work
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-11 15:49:50 -07:00
Kyle B 51271fa15b Created group for Lod component data
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-06 16:57:00 -07:00
Kyle B 3db93a564d Made formatting changes per pull comments, incuding adding comments, changing spacing, and changing the ui type of component fields
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-03 18:28:55 -07:00
Esteban Papp b33a4db332 Merge branch 'development' into cmake/SPEC-2513_w4267 2021-08-02 18:03:04 -07:00
Kyle B 1a48118ece Added comments and formatted as close to the original
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-02 14:01:38 -07:00
Kyle B 5b88d96eec Exposed fields to the mesh component giving greater Lod control from the editor
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
2021-08-02 13:36:10 -07:00
santorac b407e501e3 Merge branch 'development' into Atom/santorac/OptionalSceneApiMaterialConversion 2021-07-30 14:54:14 -07:00
Chris Santora fec79a7d53 Moved the material slot list from ModelLodAsset to ModelAsset, so all the slots live in one main list. This removes data duplication between LODs and cleans up the code a bit.
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>
2021-07-30 11:41:02 -07:00
Chris Santora 14d2e38b90 Refactored how model material slots work in preparation to support more flexible material conversion options for the scene asset pipeline. The material slot IDs are based on the MaterialUid that come from SceneAPI. Since these IDs are also used as the AssetId sub-ID for the converted material assets, the system was just checking the material asset sub-ID to determine the material slot ID. But in order to support certain FBX material conversion options, we needed to break this tie, so the slot ID is separate from the AssetId of the material in that slot. This will allow some other material to be used in the slot, instead of being forced to use one that was generated from the FBX.
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>
2021-07-30 11:40:51 -07:00
Guthrie Adams ffbeb903c1 Material Component: Add functions to lookup material ids by name
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-07-29 18:09:40 -05:00
pappeste eb2da69e6e AtomLyIntegration
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-07-27 19:29:25 -07:00
sphrose 9639003a7d LYN-4774 Fix missing box icons inside the main Viewport (#2297)
* LYN-4774 Fix missing box icons inside the main Viewport

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* V2 icons

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>

* Bug fixes

Signed-off-by: sphrose <82213493+sphrose@users.noreply.github.com>
2021-07-21 16:33:04 -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
Chris Galvan 40f9761f86 Fixed more copyright header issues caused by script replacement
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-07-02 16:21:26 -05:00
Chris Galvan b9e06e70d9 Fixed copyright header issues per new validator
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-07-02 15:34:04 -05:00
Chris Galvan d7574777a8 Resolved merge conflicts
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-07-02 12:42:44 -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
Gene Walters f905b71844 Adding missing o3de copyright headers
Signed-off-by: Gene Walters <genewalt@amazon.com>
2021-06-29 13:48:45 -07:00
Gene Walters 4e14c0069b Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628 2021-06-28 19:09:20 -07:00
Tommy Walton 5656736db4 Fix for LYN-3726 : Actor Draw Character Doesn't Work (#1336)
-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.
2021-06-28 09:26:03 -07:00
Terry Michaels 21ebff5709 Updated help search and all docs.o3de.org links to o3de.org (#1594) 2021-06-25 15:23:57 -05:00
Terry Michaels 1e457928f5 Update help URLs and remove unneeded links (#1520) 2021-06-23 14:42:33 -05:00
Steve Pham 70042fcdcd O3DE Copyright Updates for Linux Foundation (#1504) 2021-06-23 10:55:22 -07:00
Tommy Walton be0fbaaddc LYN-2227 : Improve mesh initialization performance by not creating draw packet more than once (#1476)
* 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
2021-06-22 12:59:27 -07:00
yuriy0 a9c55c1070 Update actor render bounding box (#991)
* 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
2021-06-15 13:09:30 -05:00
mnaumov 68c0989aa1 MeshStats collapsed by default 2021-06-10 17:38:13 -07:00
mnaumov d53b5a0bed PR feedback 2021-06-10 14:37:02 -07:00
mnaumov e1d2115cab ElementName override 2021-06-10 12:05:30 -07:00
mnaumov 95465b18a4 Custom serializer for mesh stats to exclude from serializetion 2021-06-09 21:15:10 -07:00
mnaumov 1f2572fe8a PR feedback 2021-06-09 13:26:42 -07:00
mnaumov e07cf79bab removed duplicate decription 2021-06-08 19:37:43 -07:00
mnaumov 2923d8b962 some cleanup 2021-06-08 19:35:40 -07:00
mnaumov 672b9fd956 [ATOM-5389] MeshComponent stats 2021-06-08 19:21:40 -07:00