Also, I'm going back on what I said in my last commit, and removing the converter for version 3 in EditorMaterialComponent::ConvertVersion. The code that I had put in before wouldn't work because it was relying on the new m_defaultMaterialAsset which will be empty for old data. The only way we could support version conversion is if we preserve legacy versions of multiple types like EditorMaterialComponentSlot and MaterialAssignmentId. Since this serialization version is old and pre-dates the public release of O3DE, it's unlikely that we need to continue supporting this version so isn't worth maintaining.
Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
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>
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>
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>
* Expose shadow bias to component & feature processors. Shadow bias now works more consistently with various near / far shadow planes and caster positions. Bias now also affects esm shadows which helps eliminate acne in certain situations.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Adding jira comment to light configuration serialization version. Improved comment on final adjustment to bias before its sent to the shader.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Hooking up bias to behavior context.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updating some labels in the directional light and light components to make them more readable and consistent with standards. Removed hard caps on directional light intensity.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* ATOM-15939 Add support to capture attachment for ParentPass
- Moved the attachment read back support to Pass class so it supports both ParentPass and RenderPass.
- Added support to output input or output state of an InputOutput attachment.
- Enabled showing ParentPass attachments in PassTree tool.
Signed-off-by: Tao <qingtao@amazon.com>
When converting to a light type that doesn't support the currently used photometric unit, the editor component will convert the photometric unit to the universally supported lumen.
Signed-off-by: Ken Pruiksma <pruiksma@amazon.com>
* Updated gem.json for all top-level Gems. All the top level gems now have identical gem.json formats based on the DefautlGem template gem.json. Two additional fields have been added, a type: field and a requirements: field. These fields are for display in Project Mananger. All gem.json files have a default requirements: value of None. Devs are responsible for providing requirements. Gem descriptions and tags have been signed off by developers.
Signed-off-by: Cronin <mikecro@amazon.com>
* Fixed minor formatting issues with RADTelemetry gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to QtForPython gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the Twitch gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to AWSCore gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the AtomTressFX gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the AudioEngineWwise gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the CertificateManager gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing extra whitespace in summary of CrashReporting gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the CustomAssetExample gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing extra whitespace in editorPythonBindings gem summary
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the ScriptedEntityTweener gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the Gestures gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing extra whitetspace in the summary of the GameStateSamples gem
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the ExpressionEvaluation gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the ProjectManager PythonBindings.cpp code to reference the
newer fields in the gem.json files
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updating the Gem and Project templates gem.json files to include the
"type" and the "requirements" field.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the default "requirments" field value to be empty string instead
of "None"
This works better with the ProjectManager GemInfoFromPath function.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Correcting "summary" field name
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added the requirements text to the AudioEngineWwise Gem
This gem requires downloading the Wwise 3rdParty library from AudioKinetic's website
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Co-authored-by: Mike Cronin <58789750+micronAMZN@users.noreply.github.com>
* Updated gem.json for all top-level Gems. All the top level gems now have identical gem.json formats based on the DefautlGem template gem.json. Two additional fields have been added, a type: field and a requirements: field. These fields are for display in Project Mananger. All gem.json files have a default requirements: value of None. Devs are responsible for providing requirements. Gem descriptions and tags have been signed off by developers.
Signed-off-by: Cronin <mikecro@amazon.com>
* Fixed minor formatting issues with RADTelemetry gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to QtForPython gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the Twitch gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to AWSCore gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the AtomTressFX gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the AudioEngineWwise gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the CertificateManager gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing extra whitespace in summary of CrashReporting gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the CustomAssetExample gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing extra whitespace in editorPythonBindings gem summary
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the ScriptedEntityTweener gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the Gestures gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Removing extra whitetspace in the summary of the GameStateSamples gem
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Adding newline to the end of the ExpressionEvaluation gem.json
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the ProjectManager PythonBindings.cpp code to reference the
newer fields in the gem.json files
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updating the Gem and Project templates gem.json files to include the
"type" and the "requirements" field.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Updated the default "requirments" field value to be empty string instead
of "None"
This works better with the ProjectManager GemInfoFromPath function.
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Correcting "summary" field name
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* Added the requirements text to the AudioEngineWwise Gem
This gem requires downloading the Wwise 3rdParty library from AudioKinetic's website
Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
* 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>
The clear material override properties button was not sending the notification to update the entity or undo state.
Signed-off-by: guthadam <guthadam@amazon.com>
-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.
* [LYN-3099] Fix vegetation raycasts to use bounded ray queries instead of FLT_MAX.
Raycasts with a distance of FLT_MAX sometimes overflowed deep in IntersectSegmentTriangleCCW, so it's better to have strict start/end positional queries. We have specific starts and ends anyways, so it's a safer approach anyways.
This also adds support for Non-Uniform Scale for meshes, since it was clearly not working correctly in vegetation when testing various scaled meshes.
* Addressed PR feedback
* 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
Setting hard max values to float max. Also allowing EV100 values hard minimum to be lowest float. Soft min and max will remain the same for a consistent ux, but we will no longer keep people from manually entering really high or low values that are technically fine.
* Fixed organization of the AssetProcessor SourceAssetBrowser
Assets within the Engine Root were grouped under a '/' entry.
That has been fixed to use the relative path within the engine root for
those assets
Assets outside of the Engine Root, but on the same drive were using
absolute paths before. Now there are child entries that navigate up the
directory hierarchy to those asset locations
* Added ly_enable_gems call to Atom gems targets that are required
The DefaultLevel.prefab contains several Atom components, that require
the Atom RHI, RPI, Common_Feature, ShaderBuilder and AtomLyIntegration CommonFeatures
gems to be enabled in order to successfully process in the
AssetProcessor.
* Added ly_enable_gems call to make the Camera gem required in Tools,
Builders and Clients.
This is needed as the DefaultLevel.prefab contains an Editor Camera
Component
* Adding the ly_enable_gem call to make the Maestro gem required
CrySystem currently requires Maestro to be enabled in order to
initialize
* Added ly_enable_gems call to the SceneProcessing gem to make it required
The SceneCore and SceneData libraries that are part of the core engine
Code folder requires the SceneProcessing gem to be enabled in order to
invoke the InitializeDynamicModule hooks in DllMain.cpp in order to
initialize those libraries.
* Fixed bad argument in comment for Prefab CMakeLists.txt
* Fixed Assert in Asset Builders due to the Atom RPI Builder
The Atom RPI Builder was enabling the Asset Catalog for the ScriptAsset a second time
The Atom Feature Common EditorSystemCommonComponent.cpp which also loads
in the AssetBuilder is enabling the Asset Catalog for the ScriptAsset
Added BehaviorContext reflection to the OutputDeviceTransformType enum
to fix the BehaviorContext errors about reflecting a method that returns
such an enum
* Added TypeId output to the JsonDeserializer report message about missing
ClassData
Previously the report callback would indicate that the target type was
missing Serialization class data, but didn't indicate the TypeId of the
target type
* Added support to the ly_enable_gems function to be able to support
0 gems being enabled.
Updated the Install step for CMake to propagate any ly_enable_gems
within a CMakeLists.txt for a target into the generated CMakeLists.txt
that is made for each installed IMPORTED target
* Adding newline to the end of the Camera Gem CMakeLists.txt
* Fixing target TYPE parameter for actual Gem Modules to use the GEM_MODULE tag instead of MODULE
* Reverting change to the DESTINATION directory for the installed CMakeLists.txt to use the relative path to the installed directory
* Adding the Atom_Bootstrap gem as a required gem
The Client and GameLaunchers required the Atom_Bootstrap gem in order to create the NativeWindow
Added Atom_Feature_Common client module as a runtime dependency of the AtomLyIntegration CommonsFeature client module
* Fixed register.py --all-projects-path and --all-gems-path arguments to
NOT register projects or gems that are within a template folder
Fixed reading of old pre-1.0 o3de_manifest.json files where the
"engines" key was a json array
* Changed how the relative target source directory is calculated when that source directroy resides outside of the engine root.
The final dirname component is used with a unique SHA256 has to form a <dirname>-<8 char SHA256> folder for installing files into
* Adding newline to the end of Atom_Bootstrap CMakeLists.txt
* Moving ly_enable_gems variants for Tools and Builders inside of PAL_TRAIT_BUILD_HOST_TOOLS block
* Adding a comment to AWSCore.ResourceMappingTool target to indicate that it is not a GEM_MODULE.
Furthermore it cannot be loaded with the Gem system because the library is in a different directory the executable
* 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
Checked for a valid quality level in DiffuseGlobalIlluminationFeatureProcessor::SetQualityLevel.
Initialized the quality level to Low in DiffuseGlobalIlluminationComponentConfig.