Commit Graph

5315 Commits

Author SHA1 Message Date
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 a71ee7eb3a Fixed the MaterialAssignmentId version converter to properly handle the default material assignment slot.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:41:01 -07:00
Chris Santora 3daf3f7d7a Fixed an issue with Actors where the material slot IDs were incorrect, and caused the displayed slot labels to be all "<unknown>" (and likely other issues).
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:59 -07:00
Chris Santora 28671c8546 Addressed suggestions from gadams3 to make EditorMaterialComponent get the default material assets from its own data rather than fetching them from the asset. Presumably this should give more reliable behavior.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:57 -07:00
Chris Santora e145ce1d01 Updated EditorMaterialComponentSlot to support editing property overrides and UV overrides for the material, regardless of whether there is a material override or not.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:56 -07:00
Chris Santora 670dd6c5bc Removed the GetLabelByAssetId function since now we can use the display name that comes with the ModelMaterialSlot.
Updated OpenMaterialExporter() to account for the fact that multiple material slots can have the same default material asset.
Updated the material inspector to sort material slots by name to match the order in the Material Component.
Updated ExportItem to protect its data members, which makes it more clear that assetId and materialSlotName are readonly inputs.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:54 -07:00
Chris Santora e3ceaa477e Added a version converter for MaterialAssignmentId. This allowed me to successfully load the Sponza level in AtomTest.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:53 -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
Chris Santora 0cf6ecf3f7 Deleted unused "default" materials from RPI. Long ago these were used as defaults for FBX material conversion process, but that's no longer the case. And I'm about to add a new approach for default material conversion in SceneAPI.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:40:49 -07:00
carlitosan edfac0f7f0 Merge pull request #2655 from aws-lumberyard-dev/carlitosan/development
display unused variables in the editor; bump builder version for rece…
2021-07-30 11:35:54 -07:00
chcurran 3633bf2ed0 remove accidental submission of commented out event handling
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
2021-07-30 10:07:23 -07:00
chcurran 0313b16a85 display unused variables in the editor; bump builder version for recent change to EntityId nodes
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
2021-07-30 09:50:54 -07:00
Guthrie Adams 28096d1620 Merge pull request #2636 from aws-lumberyard-dev/jhlliar/addMoreInstrumentation
[ATOM-15976] Add more instrumentation
2021-07-30 11:25:17 -05:00
Guthrie Adams dae45f0fac Merge pull request #2403 from aws-lumberyard-dev/jhlliar/implementFunctionStatisticsWindow
[ATOM-15689] Add function statistics view to CPU Profiler
2021-07-30 11:23:20 -05:00
Benjamin Jillich 48d1e20169 Removed the MCore::Quaternion class #2600
Merge pull request #2600 from aws-lumberyard-dev/jillich/RemovedMCoreQuaternion
2021-07-30 00:07:40 -07:00
Jacob Hilliard 4d618ea619 Profiling: Add more instrumentation
Adds new instrumentation macros throughout the codebase, using the
visualizer to find where current instrumentation is lacking using the
shadowed sponza sample + editor. Some notes from exploring:

- We spend ~5ms in CullingScene: BeginCulling
- PipelineStateCache: Compact usually 1ms
- CompileImageBarriers takes most of the time in CompileResourceBarriers

Signed-off-by: Jacob Hilliard <jhlliar@amazon.com>
2021-07-29 16:04:54 -07:00
Guthrie Adams b19b0a0e0d Merge pull request #2627 from aws-lumberyard-dev/Atom/guthadam/fixing_material_property_override_lua_test_script
fixing material property override lua test script
2021-07-29 17:11:06 -05:00
Nicholas Van Sickle 70b3840288 Fix the home key popping up ImGui when it shouldn't. (#2620)
This disables WM_INPUT forwarding to the input system while in game mode and makes ImGui listen to the synthetic keyboard events from the viewport instead - these synthetic events go through Qt's event system, so will only show up when the viewport "sees" a home key press.

Signed-off-by: nvsickle <nvsickle@amazon.com>
2021-07-29 16:30:45 -05:00
Guthrie Adams b357cd0000 Merge pull request #2605 from aws-lumberyard-dev/Atom/guthadam/updating_atomtoolsappication_comments_and_formatting
AtomToolsApplication minor comments/formatting
2021-07-29 15:23:53 -05:00
Guthrie Adams 1c9e2fd74c Merge pull request #2604 from aws-lumberyard-dev/Atom/guthadam/add_missing_bindings_for_display_mapper_operation_type
Add missing display mapper operation type bindings
2021-07-29 15:23:14 -05:00
Guthrie Adams ca2889a0ef fixing material property override lua test script
O3DE vector usage in lua has changed since script was written

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-07-29 15:17:58 -05:00
amzn-phist 99f7085c05 Fixes resource selectors not showing (#2621)
These statics were getting dead-stripped by the compiler, so removed
some of the macro magic and just do direct registration instead.

Signed-off-by: amzn-phist <52085794+amzn-phist@users.noreply.github.com>
2021-07-29 14:56:13 -05:00
SergeyAMZN 42a99d3d43 Merge pull request #2618 from aws-lumberyard-dev/MPAsteroids
Fixed autogen namespace always going upper case
2021-07-29 20:30:31 +01:00
srikappa-amzn c9301a8c94 Fix a bug in patching templates and improve error messaging (#2394)
* Fix a bug in patching templates and improve error messaging
* Fixed incorrect order of function arguments
* Fix build errors regarding c style strings and casting entity ids

Signed-off-by: srikappa-amzn <srikappa@amazon.com>
2021-07-29 12:04:04 -07:00
Guthrie Adams 3c3c1a26d2 Merge pull request #2606 from aws-lumberyard-dev/Atom/guthadam/reducing_material_editor_preset_errors_to_warnings
Material Editor: changing preset errors to warnings
2021-07-29 13:53:47 -05:00
Olex Lozitskiy fc2053fad9 SIG/Network - Minor corrections in code gen for usability of jinja network codegen templates
Minor corrections in Multiplayer Gem code generator
2021-07-29 14:34:23 -04:00
carlitosan 41421d82fc Merge pull request #2589 from aws-lumberyard-dev/carlitosan/development
fix dangling component variables on cleared script, fix EntityIDNode …
2021-07-29 10:46:52 -07:00
Jacob Hilliard 5a18b24651 Visualizer: use template functor over hardcoded lambdas
Signed-off-by: Jacob Hilliard <jhlliar@amazon.com>
2021-07-29 10:08:19 -07:00
pereslav ce99e3f2ec Fixed autogen namespace always going upper case
Signed-off-by: pereslav <pereslav@amazon.com>
2021-07-29 18:00:53 +01:00
carlitosan a18d91e786 Merge pull request #2582 from aws-lumberyard-dev/carlitosan_fix_for
fix for double asset registration and multiple outs from loop nodes
2021-07-29 09:11:58 -07:00
Benjamin Jillich cd25dbf71f Removed MCore::Quaternion AZ::Quaternion comparison tests
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
2021-07-29 17:09:57 +02:00
Guthrie Adams 2237439a0e Material Editor: changing preset errors to warnings
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-07-29 09:29:00 -05:00
Guthrie Adams 4465b52de5 AtomToolsApplication minor comments/formatting
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-07-29 09:13:49 -05:00
Guthrie Adams d12d7de139 Add missing display mapper operation type bindings
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-07-29 08:58:10 -05:00
AMZN-Olex c13d3ec086 Minor corrections in code gen for usability
Signed-off-by: Olex Lozitskiy <mr.olexander@gmail.com>
Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
2021-07-29 09:39:55 -04:00
Benjamin Jillich aa98be18b7 Removed leftover MCore::Quaternion usages and fixes some include issues
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
2021-07-29 14:34:56 +02:00
Benjamin Jillich 5bb8a17d79 Removed MCore::Quaternion.h/.inl/.cpp files
Signed-off-by: Benjamin Jillich <jillich@amazon.com>
2021-07-29 14:17:29 +02:00
moraaar 38b64466ec Merge pull request #2528 from aws-lumberyard-dev/ibtehajn/rigid_body_axis_locking
Implement axis locking options for rigid bodies

Signed-off-by: moraaar <moraaar@amazon.com>
2021-07-29 12:07:50 +01:00
chcurran 43dfffa3fd fix dangling component variables on cleared script, fix EntityIDNode reflection
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
2021-07-28 20:58:49 -07:00
carlitosan 9475d1612b Merge branch 'development' into carlitosan_fix_for 2021-07-28 19:10:59 -07:00
carlitosan 2ba1e65c3a Merge pull request #2151 from aws-lumberyard-dev/carlitosan/development
fix dependency key bug in SC builder, remove dead code, fix reflection of polygon prism
2021-07-28 18:36:33 -07:00
chcurran eefc448dce remove stack tracer change and attempt to restore SC tests
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
2021-07-28 17:48:11 -07:00
chcurran 6dc750815b Merge branch 'development' of https://github.com/o3de/o3de into carlitosan/development 2021-07-28 17:09:08 -07:00
chcurran d7a4b0d930 fix for double asset registration and multiple outs from loop nodes
Signed-off-by: chcurran <82187351+carlitosan@users.noreply.github.com>
2021-07-28 16:51:25 -07:00
Esteban Papp f0cafd0e9d Create RUN target as helpers for the project-centric workflow (#2520)
* Create RUN target as helpers for the project-centric workflow

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* typo fix

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* rename target as "<target>.Imported" and create "<target>" as the metatarget that is used for debugging and building in o3de

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-07-28 15:53:14 -07:00
Guthrie Adams 2f10f33bf6 Merge pull request #2351 from aws-lumberyard-dev/atomToolsApplication
AtomToolsApplication, making a base class for atom tools ATOM-415
2021-07-28 16:54:21 -05:00
Esteban Papp 0040c7fd9b Tweak test projects so the console window remains open (#2380)
* tweak test projects so the console window remains open

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* doing it for all test projects

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* newline at the end of the file to make devs happy

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-07-28 14:48:06 -07:00
kberg-amzn d95687d78c Merge pull request #2557 from aws-lumberyard-dev/MultiplayerBlendFix
Corrects math computing blend factors to interpolate state between received network updates
2021-07-28 14:41:46 -07:00
lumberyard-employee-dm 055df37482 Register show command fix (#2408)
* Updated print_registration functions to fix "register-show" command

Added unit test to validate the argparse options to the register show
command.

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

* Updated the register.py script to once again register an engine list

Previosly each engine were registered into a dictionary with multiple
keys, but once the engine.json started to self describe the registered
content that came with it, it was reduced to a single 'path' key.
Therefore it has been changed to a list to be consistent with other o3de
object paths

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

* Updated the SettingsRegistryMergeUtitls Code which parses the attempts to locate the engine path associated associated with the project.json engine key to check the 'engines_path' object within the o3de_manifest.json

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

* Updated print registration unit test to patch the get_project_path

This is to make sure that the existence of the placeholder project path
isn't validated when running the test

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

* Typo and formatting fixes for the print_registration script

Also corrected indentation in unit_test_print_registration script

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-07-28 16:21:37 -05:00
kberg-amzn 6839497d99 Corrects math computing blend factors to interpolate state between received network updates
Signed-off-by: kberg-amzn <karlberg@amazon.com>
2021-07-28 12:31:19 -07:00