Commit Graph

5404 Commits

Author SHA1 Message Date
AMZN-Olex 72aed355ce Cleanup
Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
2021-08-03 12:54:32 -04:00
AMZN-Olex 2118ef7a21 Preparing for PR
Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
2021-08-03 12:48:36 -04:00
AMZN-Olex 854e540950 Cleanup
Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
2021-08-03 12:42:48 -04:00
AMZN-Olex 73b9daad25 Merged development
Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
2021-08-02 20:54:46 -04:00
AMZN-Olex 0620f6dff3 Minor refactoring
Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
2021-08-02 19:06:02 -04:00
santorac fa52124f9c Formalized the concept of an model's material slots
Formalized the concept of an model's material slots

Before, the ModelAsset and MaterialComponent code was conflating the idea of a material slot ID and a default material assignment. The default material asset's sub-ID was being used to uniquely identify the material slot as well. This blocks our ability to use other materials as the default assignment for individual meshes; we are forced to use whatever material that was generated from the source model file (like FBX). 

With these changes, we separate the concept of a material AssetId and a material slot ID, and store them separately. There is a new ModelMaterialSlot struct to describe each slot, including a unique "StableId". The ModelAsset stores a map of the slots, and each mesh refers to a slot by its StableId.

This is a precursor to another task that will optionally disable the auto-conversion of materials from source model files.

Also:
- These changes also enable material property overrides without having to make an editable material first, which I don't think was supported before.
- Removed unused Default.materialtype from the RPI Assets folder.
- Encapsulated members in EditorMaterialComponentExporter::ExportItem for better maintainability.

See also https://github.com/o3de/o3de-atom-sampleviewer/pull/175 

Testing:
- Took screenshots of several AtomTest levels with material overrides before making any changes. Compared these after the changes. Test levels included ActorTest_SingleActor, ActorTest_MultipleActors, and two custom levels that used shaderball and multi-mat_mesh-groups_1m_cubes.
- Lots of manual fiddling with material component.
- Created a white box component and saw that it rendered correctly.
- Cherry-picked these changes into Apocalypse's code base and verified with one of their levels.
- Ran AtomSampleViewer automated test suite. Some tests failed, but these were failing before my changes.
2021-08-02 15:56:28 -07:00
Jeremy Ong 2491620826 Merge pull request #2681 from aws-lumberyard-dev/rgba16f/UnInlineAzCoreJob
Move most AZ::Job function bodies out of the header
2021-08-02 16:22:09 -06:00
Esteban Papp d03c2c9977 Copy jinja/py files to the install folder (#2643)
* Copy jinja/py files to the install folder

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

* code review comment

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

* moving AzAutoGen to cmake folder and removing the header-only project

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-08-02 13:53:13 -07:00
Chris Galvan 32542fd84b Merge pull request #1927 from aws-lumberyard-dev/GroupToggleSwitch
Created a toggle switch to enable and disable groups through the Edit Context
2021-08-02 15:46:45 -05:00
Chris Galvan d50f367c43 Merge pull request #2726 from aws-lumberyard-dev/cgalvan/IgnoreTempLevelSavesInGit
Updated new project template .gitignore files so that temporary level saves in _savebackup files will be ignored as untracked files.
2021-08-02 15:37:50 -05:00
Chris Galvan 40deefe54b Merge pull request #2721 from aws-lumberyard-dev/cgalvan/GitIgnoreScriptCanvasLogFiles
Added .gitignore so that Script Canvas debug logs don't get picked up as untracked files.
2021-08-02 15:14:58 -05:00
Guthrie Adams 9e74ae007e Merge pull request #2665 from aws-lumberyard-dev/pruiksma/SPEC-7794
[SPEC-7794] Removing references to alembic in cmake & asset processor.
2021-08-02 15:10:46 -05:00
AMZN-Olex 93a3d3efa0 Bandwith overlay works without imgui
Signed-off-by: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com>
2021-08-02 15:57:29 -04:00
Chris Galvan ed8227f47a Updated new project template .gitignore files so that temporary level saves in _savebackup files will be ignored as untracked files.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-08-02 14:32:11 -05:00
Chris Galvan 6b7f8e3878 Merge pull request #2716 from aws-lumberyard-dev/cgalvan/FixVegetationLayerSpawnerDocLink
Fixed Vegetation Layer Spawner documentation link.
2021-08-02 14:26:27 -05:00
santorac 8542de8c32 Fixed a link error on android (clang) 2021-08-02 12:02:58 -07:00
Chris Galvan 24607df8f3 Added .gitignore so that Script Canvas debug logs don't get picked up as untracked files.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-08-02 14:02:39 -05:00
Chris Galvan 8f6fd3a327 Merge pull request #2713 from aws-lumberyard-dev/cgalvan/RemovedLegacyEditorIcons
Removed legacy ObjectIcons and shelve icons from Editor.
2021-08-02 13:38:56 -05:00
Chris Galvan cc57ee7d20 Fixed Vegetation Layer Spawner documentation link.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-08-02 13:19:15 -05:00
santorac afe5398f0f Fixed model unit tests 2021-08-02 11:19:03 -07:00
AMZN-stankowi 9ee9730294 Automated test for scene files with and without python scripts running python incorrectly (#2373)
* Cleared m_scriptFilename between scene files.
This fixes a bug where a Python script file would be run on a scene file
that didn't have a script file set.
Added a general case version to SceneBuilderWorker.cpp, to make it easy
to mark all scene files as dirty.
Automated tests for this will come in a separate pull request.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Work in progress automated tests

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Python test done

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Sorted jobs work now. This may sort too aggressively, I'll remove the additional sorting after some testing.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Cleaned up test

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Fixed stray '

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Removed temp code from test

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Command line help options for AP
Removed job sorting that wasn't actually sorting jobs

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Changed constant variable names to match coding standards

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
2021-08-02 10:57:57 -07:00
santorac 7d84a005c0 Updated unit tests and fixed build failures. 2021-08-02 10:49:13 -07:00
puvvadar e22820e08b Merge pull request #2146 from aws-lumberyard-dev/mp_lerp_jitter
Fix inconsistent client lerp and account for blend factor on server
2021-08-02 10:32:27 -07:00
Chris Galvan 37c3f01771 Removed legacy ObjectIcons and shelve icons from Editor.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
2021-08-02 12:27:03 -05:00
Jeremy Ong 4407c28b03 Merge pull request #2680 from aws-lumberyard-dev/Atom/RenderDoc
Add runtime RenderDoc support for Windows dx12/vulkan via --enableRenderDoc option
2021-08-02 10:31:53 -06:00
lumberyard-employee-dm 8014475abf Adding newline to the end of the new Job.cpp file
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-08-02 11:28:04 -05:00
rgba16f 8088e6662a modify new jobs.cpp file to match AzCore standard of opening namespace AZ rather than prepend AZ:: to every function
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
2021-08-02 11:15:49 -05:00
santorac 9e6eadd9a9 Merge branch 'development' into Atom/santorac/OptionalSceneApiMaterialConversion 2021-08-02 09:07:42 -07:00
Jeremy Ong af0d757556 Remove CMake status message when not compiling with RenderDoc
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-08-02 09:50:24 -06:00
Jeremy Ong 9b0db508c9 Merge pull request #2554 from aws-lumberyard-dev/Atom/IndexedDataVector
Promote IndexedDataVector to public Feature/Utils header
2021-08-02 07:52:34 -06:00
Jeremy Ong 06cef942a9 PALify RenderDoc module name
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-07-31 18:30:49 -06:00
rgba16f b5895bc09b Move most AZ::Job function bodies out of the header
Signed-off-by: rgba16f <82187279+rgba16f@users.noreply.github.com>
2021-07-31 19:18:58 -05:00
Jeremy Ong f9303a2eaa Add runtime RenderDoc support for Windows dx12/vulkan via --enableRenderDoc option
- RenderDoc is disabled when building the monolithic build
- The installation path is inferred on Windows, but may be overridden on
  Windows/Linux via the ATOM_RENDERDOC_PATH environment variable
- Linux support may work, but I have no means to test it
- Android support shouldn't be difficult to add, but requires a
  renderdoc_android.cmake file that understands how the RenderDoc
  package is distributed as part of the Android toolchain

Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-07-31 17:53:38 -06:00
Steve Pham b46a80be2c Fix for Linux/Vulkan/Editor crash on startup
* Temporary fix for Linux/Vulkan/XCB where the swap chain is not ready to present until the resize is complete
* Fix invalid GUID from LinuxXcbConnectionManager

Signed-off-by: spham-amzn <spham@amazon.com>
2021-07-31 08:42:02 -07:00
Jeremy Ong 68a7a21e62 Reintroduce .h and .inl split
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-07-31 00:26:28 -06:00
Jeremy Ong 78760245c5 Remove one level of indentation
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-07-31 00:26:26 -06:00
Jeremy Ong e1ce742f14 Generalize comments pertaining to light data and consolidate inline
header

Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-07-31 00:26:25 -06:00
Jeremy Ong bb782e83b4 Promote IndexedDataVector to public Feature/Utils header
Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-07-31 00:26:23 -06:00
santorac 5d3d3b907e Changed a couple function parameters to const&
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 16:52:43 -07:00
lumberyard-employee-dm bb372f05cd Fixed the emplace function implementations for stack and queue (#2657)
* Fixed the emplace function implementations for stack and queue

Cleaned up several functions in the stack, queue and priority_queue
classes that were non-standard or weren't needed.

Updated the "style" of the code to use more modern concepts: "typedef" ->
"using", empty constructor body -> default keyword.

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

* Replaced the custom implementations of AZStd stack, (proirity)queue

Theses classes now have a template alias to the standard library version
of the classes

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-07-30 18:20:21 -05:00
Guthrie Adams e2eba69d33 updating FindMaterialAssignmentIdInLod to use ModelMaterialSlot
}

Signed-off-by: Guthrie Adams <guthadam@amazon.com>
2021-07-30 18:19:35 -05:00
santorac b407e501e3 Merge branch 'development' into Atom/santorac/OptionalSceneApiMaterialConversion 2021-07-30 14:54:14 -07:00
AMZN-koppersr 0318419932 Merge pull request #2656 from nemerle/versioned_property_redundant_ref
AZStd::ref prevented compiler from using RVO
2021-07-30 14:27:20 -07:00
SergeyAMZN 461743ef2d Enabled PhysX system component in asset builders since it's required … (#2652)
* Enabled PhysX system component in asset builders since it's required for cooking collision meshes

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

* Added AssetCatalogService to the list of dependent

Signed-off-by: pereslav <pereslav@amazon.com>
2021-07-30 16:14:49 -05:00
Guthrie Adams acdad52032 Merge pull request #2638 from aws-lumberyard-dev/Atom/guthadam/material_component_find_assignmentid
Material Component: Add functions to lookup material ids by name
2021-07-30 15:39:27 -05:00
Ken Pruiksma da24323508 [SPEC-7794] Removing references to alembic in cmake & asset processor.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
2021-07-30 15:24:32 -05:00
carlitosan 6a35782773 Merge pull request #2660 from aws-lumberyard-dev/carlitosan/development
Carlitosan/development  Fix variable name display in the property window
2021-07-30 13:20:57 -07:00
Chris Santora 13679a7cc3 Reverted partial support for property overrides on default material assignments. This needs more UI design discussion first.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:41:15 -07:00
Chris Santora 66f7fa2f42 Fixed a bug where a new entity using a mesh that was already loaded would not be able to correctly initialize a material component.
Repro steps:
- Create two entities.
- Entity 1
  - Add a mesh component and assign a model with multiple sub-meshes
  - Add a material component. The material component looks correct.
- Entity 2
  - Add a mesh component and assign the same model as the other entity
  - Add a material component. The material component shows "<unknown>" for all material slot names

The problem was that ReflectedPropertyEditor creates a new Asset<> reference with the correct ID but does not load it. This asset is passed to EditorMaterialComponent, MaterialComponentController, and MeshFeatureProcessor and none of these tell the Asset to load. The MeshFeatureProcessor was not loading the Asset or connecting to the AssetBus because the instance already existed in the InstanceDatabse so from the FP's perspecive there was no need. But for the FP's GetModelAsset() API to function correctly it needs to have the asset initialized to the available AssetData pointer. So we updated the MeshFeatureProcessor to always connect to the AssetBus so it will find the available AssetData via the OnAssetReady callback.

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:41:14 -07:00
Chris Santora 1a478608a7 Restored the previous behavior of preventing material property overrides when there is no explicit material override assignment.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
2021-07-30 11:41:12 -07:00