Commit Graph

10932 Commits

Author SHA1 Message Date
santorac a896ff11bc Changed .material serialization to avoid loading the .materialtype file, since the .material builder doesn't declare a source dependency on the .materialtype. Otherwise there can be ambiguous edge cases where changes to the .materialtype might or might not impact the baked MaterialAsset. Note that another option would have been to add a the appropriate source dependency, but that would hurt iteration time as any change to the .materialtype file would cause every .material file and .fbx to rebuild.
These changes have the added benefit of simplifying some of the serialization code. MaterialSourceDataSerializer is no longer needed, as its main purpose was to pass the MaterialTypeSourceData down to the MaterialPropertyValueSerializer.

Before, the JSON serialization system gave a lot of data flexibility because it did best-effort conversions, like allowing a float to be loaded as an int for example. But now the material serialization code doesn't know target data type, so it has to assume the data type based on what's in the .material file, and then the MaterialAsset will convert the data to the appropriate type later when Finalize() is called.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 19:00:50 -08:00
santorac 3bbb8d78cd Merge pull request #6982 from aws-lumberyard-dev/Atom/santorac/MaterialAssetDeferredBaking_Recovery2
Formalized Material System Deferred Bake vs Pre Bake Asset Processing
2022-01-18 18:53:18 -08:00
santorac 5b19de2876 Merge remote-tracking branch 'origin/development' into Atom/santorac/MaterialAssetDeferredBaking_Recovery2 2022-01-18 17:44:23 -08:00
santorac 45429872d6 Switched back to making MaterialAsset::GetPropertyValues automatically finalize the material asset. I realized that it's too burdensome to expect client code to call Finalize on the MaterialAsset; every code that calls GetPropertyValues would have to call Finalize(). Instead of using const_cast in GetPropertyValues like I was doing before, I just changed GetPropertyValues to be a non-const function. There were a few places in Decal code I had to update to pass non-const MaterialAsset pointers. This isn't ideal, but I think it's better than the alternatives.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 17:39:44 -08:00
Luis Sempé 08d4ddeb8a Merge pull request #6562 from pollend/chore/rename-Graph-EditorGraph-Match
chore: Rename Graph to EditorGraph
2022-01-18 14:57:34 -08:00
Guthrie Adams b84ae37fcb Merge pull request #6977 from aws-lumberyard-dev/Atom/scottmur/ME_test_remove_unexpected
Material Editor tests for window pane function
2022-01-18 15:42:58 -06:00
Guthrie Adams c16cc96eba Merge pull request #6980 from aws-lumberyard-dev/Atom/guthadam/atom_tools_fix_ap_connection_and_thumbnails
Atom Tools: move asset processor connection to fix thumbnails
2022-01-18 15:23:34 -06:00
Guthrie Adams eea9532c4b Merge pull request #6942 from aws-lumberyard-dev/Atom/guthadam/atom_tools_application_pyexit
Atom Tools: Bind exit function for python tests
2022-01-18 15:23:14 -06:00
Guthrie Adams 75e294d94c Merge pull request #6921 from aws-lumberyard-dev/Atom/guthadam/atom_tools_document_count_function
Atom Tools: added function to get the number of active documents
2022-01-18 15:22:42 -06:00
Chris Galvan 3bc0e9f124 Merge pull request #6647 from tjmgd/bug-tube-75
Fix: Tube spline
2022-01-18 15:17:00 -06:00
Mike Balfour 4b9e53e623 Another batch of GetValues() overrides. (#6915)
* Another batch of GetValues() overrides.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added missing headers.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Addressed PR feedback.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
2022-01-18 15:05:17 -06:00
Scott Romero 3a3aa20545 [development] added required runtime dependency Gem::PhysX.Editor to WhiteBox.Editor.Physics.Tests (#6871)
Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
2022-01-18 12:38:08 -08:00
Luis Sempé 891a13631e Merge branch 'development' into chore/rename-Graph-EditorGraph-Match 2022-01-18 12:35:58 -08:00
Chris Galvan f2b1970e8f Merge pull request #6818 from windbagjacket/development
Adding ray tracing toggle to mesh component UI
2022-01-18 14:33:01 -06:00
Chris Galvan 13d3399783 Merge pull request #6970 from aws-lumberyard-dev/cgalvan/RemovedMoreUnusedEditorCode
Removed some more unused Editor code and images
2022-01-18 14:32:40 -06:00
AMZN-byrcolin d9e636f77e fix edge case with deprecated pal functions (#6976)
* fix edge case with deprecated pal functions

Signed-off-by: byrcolin <byrcolin@amazon.com>
2022-01-18 12:12:55 -08:00
santorac 2627b507d3 Fixed unused variable warning
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 12:01:19 -08:00
jckand-amzn 4af918a4a8 Skipping ShapeIntersectionFilter test (#6975)
Signed-off-by: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com>
2022-01-18 11:50:14 -08:00
Guthrie Adams 5c2e69d6d0 Atom Tools: move asset processor connection to fix thumbnails
Thumbnails for the AtomLyIntegration common feature gem were no longer being rendered. The setup code was modified to initialize the thumbnail system after receiving a new event that critical assets finished compiling. This event was being sent and handled correctly in the main editor. This process was failing in other tools because the event was sent before systems were registered to listen for it.

To resolve the problem, atom tools application now explicitly connects to the asset processor and processes critical assets after the base application StartCommon function is called. This ensures that the connection is established and the event gets sent after all of the system components have been activated.

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2022-01-18 12:36:49 -06:00
santorac c24546a85d Fixed unused variable warning.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 10:30:01 -08:00
santorac 2d6d14abf7 Changed MaterialAsset::GetPropertyValues to not auto-finalize. Client code must call Finalize manually. It's better to avoid unexpected side-effects from a const getter function.
In some cases it may be acceptable to do non-const things in a const function as long as it is only manipulating internal data, and the public facing API returns the same values as before. But in this case, the IsFinalized function is a public facing API that would have a different result after GetPropertyValues was called.

I also updated a couple other minor things from code review feedback.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 10:29:56 -08:00
santorac 8084775d7a Updating code comments.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 10:29:55 -08:00
santorac aafd34679a Merged MaterialAssetCreatorCommon class into MaterialTypeAssetCreator because it is no longer needed for MaterialAssetCreator.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 10:29:53 -08:00
santorac 4ade6bc88a Fixed compile errors in Material Editor.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 10:29:51 -08:00
santorac 1fa1eaad15 Added unit tests for the new functionality.
I found a mistake where MaterialAssetCreator needs to clear the raw data when configured to finalize the material asset.
Since MaterialSourceData no longer relies on the material type source file at all, I was able to change MaterialSourceDataTest to avoid saving the source data to disk.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 10:29:49 -08:00
santorac a627cda5ae Got the unit tests working again.
I made MaterialAsset::Finalize private so I could add some parameters specifically for MaterialAssetCreator to use. Now MaterialAssetCreator::Begin has an option to finalize the material or not.
Moved MaterialAssetCreatorCommon::ValidateDataType to MaterialPropertyDescriptor as "ValidateMaterialPropertyDataType" so that MaterialAsset::Finalize could use it too

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 10:29:48 -08:00
santorac c5b128bec4 First pass at reworking and formalizing the way deferred material asset baking works. The feature basically works but needs more testing.
Before, the material builder was loading the MaterialTypeAsset and doing some processing with it, but was avoiding declaring job dependencies that would cause reprocessing lots of assets when a shader or .materialtype file changes. Reading the asset data isn't safe when not declaring a job dependency (or when declaring a weak job dependency like OrderOnce which is the case here). This caused to several known bugs.

The main change here is it no longer loads the MaterialTypeAsset at all; all other changes flow from there.

The biggest changes (when deferred material processing is enabled) are ...
1) MaterialSourceData no longer loads MaterialTypeAsset. All it really needs is to determine whether a string is an image file reference or an enum value, which is easy to do by just looking for the "." for the extension.
2) MaterialAssetCreator no longer produces a finalized material asset. It no longer uses MaterialAssetCreatorCommon because that only produces a non-finalized MaterialAsset, which has very different needs for the SetPropertyValue function. (We could consider merging MaterialAssetCreatorCommon into MaterialTypeAssetCreator since that's the only subclass at this point). And it doesn't do any validation against the properties layout since that can be done at runtime.
3) Moved processing of enum property values from MaterialSourceData to MaterialAsset::Finalize (this was the only thing being done in the builder that actually needed to read the material type asset data).

Also...
- Updated the MaterialAsset class mostly to clarify and formalize the two different modes it can be in: whether it is finalized or not.
- Merged the separate "IncludeMaterialPropertyNames" registry settings from MaterialConverterSystemComponent and MaterialBuilder into one "FinalizeMaterialAssets" setting used for both.
- Removed MaterialSourceData::ApplyVersionUpdates. Now the flow of data is the same regardless of whether the materials are finalized by the AP or at runtime. Version updates are always applied on the MaterialAsset.
- Added a validation check to MaterialTypeAssetCreator ensuring that once a property is renamed, the old name can never be used again for a new property. This assumption was already made previously, but not formalized, in that Material::FindPropertyIndex does not expect every caller to provide a version number for the material property name, also the material asset's list of raw property names was never versioned. The only way for this to be a safe assumption is to prevent reuse of old names.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2022-01-18 10:29:36 -08:00
Scott Murray 7694a29fa1 Material Editor tests for window pane function
Signed-off-by: Scott Murray <scottmur@amazon.com>
2022-01-18 10:16:33 -08:00
carlitosan 56475f529c Merge pull request #6911 from aws-lumberyard-dev/carlitosan-sc-bug-bash-4
Make SC User data slots proper, immutable variable references
2022-01-18 08:41:08 -08:00
amzn-phist 2a9990ead3 Fix engine template issue (#6927)
* fix get_enabled_gem_cmake_file to work with "Dem" or "Code" or "Gem/Code" folder in a project
fix o3de_restricted_path to make the past paramter optional

Signed-off-by: byrcolin <byrcolin@amazon.com>

* Fix resolution of variables in `cmake_path(COMPARE)` calls in PAL.cmake

The documentation for `cmake_path(COMPARE)` states that parameters marked as [<input>](https://cmake.org/cmake/help/latest/command/cmake_path.html#conventions) are string literals.

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

Co-authored-by: byrcolin <byrcolin@amazon.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2022-01-18 08:27:06 -08:00
Chris Galvan 74623bb1d7 Removed some more unused Editor code and images
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2022-01-18 10:21:54 -06:00
Nicholas Lawson 27d256679a Update the package of Pybind11 that o3de points at to be the latest version (#6898)
Signed-off-by: lawsonamzn <70027408+lawsonamzn@users.noreply.github.com>
2022-01-18 08:16:25 -08:00
moraaar 338eecd9e6 Blast memory allocator must allocate with 16 byte aligment (#6968)
From Blast allocator documentation "Allocates size bytes of memory, which must be 16-byte aligned." https://gameworksdocs.nvidia.com/Blast/1.1/api_docs/files/class_nv_1_1_blast_1_1_allocator_callback.html

Fixes #5162

Signed-off-by: moraaar moraaar@amazon.com
2022-01-18 16:00:28 +00:00
Ignacio Martinez e166479bb7 Fixed Camera angle on switch levels (#6954)
Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>
2022-01-18 15:47:27 +00:00
Ignacio Martinez c1bbe3806d Asset Browser Search Entries Highlight (#6133)
* Adding hilight to search entries

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Delegate Cleanup

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* delegate cleanup

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* General cleanup

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* reformatting file

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Updated Comments

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Abstracted richText functions

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Extracting highlighting behavior

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Added highlighter to the entity outliner

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Addressed Code Review Comments

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Switched to static functions

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* changed variable name

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Removed unused variable

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Apply changes to the Entity Outliner Model

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>

* Removed duplicated line

Signed-off-by: AMZN-Igarri <82394219+AMZN-Igarri@users.noreply.github.com>
2022-01-18 12:29:06 +00:00
dmcdiarmid-ly 4cd3568d7b Merge pull request #6905 from aws-lumberyard-dev/Atom/dmcdiar/ATOM-15813
Allow InstanceDatabase<Shader> to support multiple instances with different supervariants
2022-01-17 13:45:09 -07:00
John Jones-Steele 0b9dc78d67 Fixed problem with inputting numbers in sliders (#6859)
* Fixed problem with inputting numbers in sliders

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Changes from PR

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>

* Missed removing pragma optimize

Signed-off-by: John Jones-Steele <82226755+jjjoness@users.noreply.github.com>
2022-01-17 17:58:19 +00:00
windbagjacket 1cfa4a9bd5 Removed tab usage.
Signed-off-by: windbagjacket <nibor@ntlworld.com>
2022-01-17 10:00:07 +00:00
Guthrie Adams ced7d1ef54 Atom Tools: Bind exit function for python tests
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2022-01-17 01:29:23 -06:00
amzn-sj 76ff7aec29 Fix type (#6919)
Signed-off-by: amzn-sj <srikkant@amazon.com>
2022-01-14 19:41:18 -06:00
Alex Peterson b87e6896e6 ScreenToWorld and WorldToScreen Camera functionality (#6903)
Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
2022-01-14 16:43:01 -08:00
dmcdiarmid-ly 1ef868437a Added supervariantIndex check in Shader::OnShaderVariantAssetReady
Signed-off-by: dmcdiarmid-ly <63674186+dmcdiarmid-ly@users.noreply.github.com>
2022-01-14 17:28:14 -07:00
Guthrie Adams 75a582972c Atom Tools: added function to get the number of active documents
Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2022-01-14 18:27:11 -06:00
carlitosan c15d3f35bf fix release build errors
Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
2022-01-14 14:57:35 -08:00
Vincent Liu 5885270640 [iOS] Update to use AWSNativeSDK 1.9.50 (#6890)
Signed-off-by: onecent1101 <liug@amazon.com>
2022-01-14 14:36:15 -08:00
Qing Tao c9ee1f7871 ATOM-17132 Image builder failed to build some images after preset was fixed (#6900)
The issue was because the preset reload was only happened in CreateJobs but not ProcessJobs. But these two functions might be called from different AssetBuilder. The fix is to add preset reload for Processjobs too.
There was another change to add debug device name for streaming image.

Signed-off-by: Qing Tao <55564570+VickyAtAZ@users.noreply.github.com>
2022-01-14 13:31:13 -08:00
carlitosan 295c836ed8 clean up comments, add set type action in disabled form
Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
2022-01-14 12:46:08 -08:00
Adi Bar-Lev aa18deef5d AtomTressFX - fixing crash bug for prefab (#6892)
- The crash happens due to attempt to get an instance of the hair dynamic data before it was initialized.

Signed-off-by: Adi Bar-Lev <82479970+Adi-Amazon@users.noreply.github.com>
2022-01-14 12:26:41 -08:00
moudgils d95e157f48 Different Pso cache per vendor/driver (#6893)
* Support to add a different PSO cache per vendor/driver version. Also added support to have a differnt cache for Warp

Signed-off-by: moudgils <47460854+moudgils@users.noreply.github.com>

* Added a way to reset PSO cache for everyone

Signed-off-by: moudgils <47460854+moudgils@users.noreply.github.com>

* Fix tabbing for one line which is failing validation

Signed-off-by: moudgils <47460854+moudgils@users.noreply.github.com>
2022-01-14 12:24:58 -08:00
Mike Balfour c403fa3db6 More GetValues() overrides (#6896)
* Benchmarks and tests for Image and Constant GetValues

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Verify GetValues for Perlin and Random Gradients

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Standardized the assert format for GetValues().

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* More GetValues unit tests and test cleanup

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed typos

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* GetValues() unit tests for surface gradients.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Benchmarks for ShapeAreaFalloff Gradient

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added benchmarks for all remaining gradients and cleaned up the helper methods.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Renamed class for better report formatting.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added missing Mocks dependencies for the Editor tests.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* First batch of specific GetValues() overrides.
Each one is measurably faster than the generic version.  Also, in ShapeAreaFalloffGradient, I optimized and simplified the logic a bit, so GetValue() is marginally faster too.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Change GetValues() to use span and add more overrides.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Convert GetValues() to use AZStd::span and added more overrides.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Add missing include.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* PR feedback - switch to fill

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed the logic and added unit tests and comments.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
2022-01-14 13:30:45 -06:00