Commit Graph

66 Commits (d9cbc97ec07909e6ddb6687e0c22da07cc6bbdb6)

Author SHA1 Message Date
moraaar 564925c285
Fix assert: Avoid doing operations over invalid Aabb (#3757)
Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
Kyle B dfc5baae34 fixed casting errors
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 8ab9a88683 added cast to version change system lodoverride
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle Birnbaum 2b1f4c2fc0
Merge branch 'development' into ExposeLodControls 4 years ago
Kyle B b53a085700 Merge branch 'development' into ExposeLodControls 4 years ago
Kyle B e2a9c58cae fixed unnessisary qualifier error
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
pappeste b3e895d10c fixed AtomLyIntegration
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Kyle B 6acbea722e minor syntax changes and adding a refresh tree attributeto the editor component
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B cea334dbc4 Fixed enum value problems
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 0c05c9f204 [not working] Made lod selection more generic for further work
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 51271fa15b Created group for Lod component data
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
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>
4 years ago
Esteban Papp b33a4db332 Merge branch 'development' into cmake/SPEC-2513_w4267 4 years ago
Kyle B 1a48118ece Added comments and formatted as close to the original
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
Kyle B 5b88d96eec Exposed fields to the mesh component giving greater Lod control from the editor
Signed-off-by: Kyle B <kylebirnbaum@gmail.com>
4 years ago
santorac b407e501e3 Merge branch 'development' into Atom/santorac/OptionalSceneApiMaterialConversion 4 years ago
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>
4 years ago
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>
4 years ago
Guthrie Adams ffbeb903c1 Material Component: Add functions to lookup material ids by name
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
4 years ago
pappeste eb2da69e6e AtomLyIntegration
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
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>
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
Chris Galvan 40f9761f86 Fixed more copyright header issues caused by script replacement
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
5 years ago
Chris Galvan b9e06e70d9 Fixed copyright header issues per new validator
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
5 years ago
Chris Galvan d7574777a8 Resolved merge conflicts
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
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
Gene Walters f905b71844 Adding missing o3de copyright headers
Signed-off-by: Gene Walters <genewalt@amazon.com>
5 years ago
Gene Walters 4e14c0069b Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628 5 years ago
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.
5 years ago
Terry Michaels 21ebff5709
Updated help search and all docs.o3de.org links to o3de.org (#1594) 5 years ago
Terry Michaels 1e457928f5
Update help URLs and remove unneeded links (#1520) 5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 5 years ago
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
5 years ago
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
5 years ago
mnaumov 68c0989aa1 MeshStats collapsed by default 5 years ago
mnaumov d53b5a0bed PR feedback 5 years ago
mnaumov e1d2115cab ElementName override 5 years ago
mnaumov 95465b18a4 Custom serializer for mesh stats to exclude from serializetion 5 years ago
mnaumov 1f2572fe8a PR feedback 5 years ago
mnaumov e07cf79bab removed duplicate decription 5 years ago
mnaumov 2923d8b962 some cleanup 5 years ago
mnaumov 672b9fd956 [ATOM-5389] MeshComponent stats 5 years ago
Tom Hulton-Harrop 4a5b7edbfe
Updates to kd-tree ray intersection - ATOM-15673 (#1026)
* updates to kd-tree ray intersection

* update tests for kd-tree

* add one more test for kd-tree intersection

* updates to ModelKdTree following review feedback

* improve api doc comment for RayIntersection in ModelKdTree

* updates following review feedback

* update .clang-format to stack parameters if they do not all fit on one line
5 years ago
Tom Hulton-Harrop 36ceff84c9
Support mesh intersection for camera orbit (#982)
* wip support for mesh intersection with intersector bus

* WIP camera mesh intersection orbit logic

* remove unneeded template argument

* add bus connect/disconnect

* fix intersection logic

* small updates, additional comments, some tidy-up

* update formatting options slightly

* use aznumeric_cast

* temp workaround for negative distances with RayIntersection
5 years ago
karlberg c21b4a577d Merge remote-tracking branch 'origin' into MultiplayerComponents 5 years ago
greerdv 26ab8c8a25 merging from main 5 years ago
karlberg d0a561fa01 merging latest origin 5 years ago
karlberg 822368ef01 Changes to get visibility system working again in-game 5 years ago
AMZN-koppersr 5e4094b258
Revamped AzFramework::Scene (#332)
Updated AzFramework::Scene to allow it to serve as the one-stop location for localized singletons. Localized singletons in this case are instance that can only occur once in an environment but multiple times within an application. As an example, this allows settings up a single camera per viewport for instance.

Highlights of changes:

Replaced the original ebuses with interfaces and events for easy of use and performance.
Removed the Entity Context specific code and moved that to new locations within the Entity Context itself.
Allowed basic inheritance. If a subsystem isn't found in a scene the parent can optionally be searched.
Scenes can enter a zombie state and avoid immediately being deleted. This is needed for situations where subsystems can't be destroyed until async calls have been completed.
5 years ago
greerdv f5acd7ad70 Merge branch 'main' into non-uniform-scale-decal 5 years ago