Commit Graph

25 Commits (d9cbc97ec07909e6ddb6687e0c22da07cc6bbdb6)

Author SHA1 Message Date
Mike Balfour 0505f200e5
Remove extra/bad profile markers (#4031)
Many of these are just extra noise in the profile, but the one in Archive.cpp could also cause PIX to crash.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
Jeremy Ong 07a14bdce1 Add AZ_BUDGET_DEFINE/AZ_BUDGET_DECLARE and remove driller
NOTE: The memory driller is still intact for now to avoid needing to
modify allocators, but the frame/cpu portions of driller and the
standalone executable are now gone.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong df9b4d4a2f Deprecate profiler categories based on global enum
(to be supplanted by registered budgets in the future)

Signed-off-by: Jeremy Ong <jcong@amazon.com>
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
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 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 4e14c0069b Merge branch 'upstream/stabilization/2106' into genewalt/gitflow_210628 5 years ago
Mike Balfour 567156b85a
[ATOM-4343] Temporary fix for vegetation raycasts until full solution is implemented. (#1572)
Currently, the first time a raycast is attempted for a model, the raycast will fail and the model's kdtree will asynchronously get built.  This breaks the vegetation system, which expects the queries to always work.  This adds in a brute-force fallback for use while the kdtree is building.  However, other use cases like the Editor mouse cursor selection raycast still should get the current "silent failure" behavior, because otherwise the Editor will lock up for several seconds the first time the mouse moves over an extremely complex model.
5 years ago
moudgils 65f8182520
Fix mac image preview pass. ImagePreviewPass correctly uses the swapchain texture to render into. (#1566)
* Fix ImagePreviewPass on Mac + minor cleanup
5 years ago
moudgils 0e3127240f
Enable 16 byte alignment for root constants and a minor cleanup (#1522)
* Enable 16 byte alignment for root constants 
* Switching to R8G8B8A8_UINT for dummy stream buffers
* Clamping min values for scissor/viewport for fullscreen pass
5 years ago
Steve Pham 70042fcdcd
O3DE Copyright Updates for Linux Foundation (#1504) 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
Tom Hulton-Harrop dd95d2b02e
ensure brute force ray intersection works (#1170)
* ensure brute force ray intersection works in the same space as kd-tree intersection

* add additional tests for ray casts against meshes using brute force approach

* update api and add some additional test cases

* comment tidy-up and other small updates/fixes for ray intersection code

* fix issue with values at the end of a ray
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
jiaweig f64bd999e0 Move UvStreamTangentBitmask to new files. 5 years ago
jiaweig c3794ca96c Addressed review comments. 5 years ago
jiaweig 775b7d048b Add support for tangent stream pairing with the first UV from the model. 5 years ago
greerdv 496891b4c0 feedback from PR 5 years ago
greerdv d8169e08fb merging from main 5 years ago
greerdv 2fb2813b48 updating atom mesh component to support non-uniform scale component 5 years ago
alexpete 1044dc3da1 Integrating github/staging through commit ab87ed9 5 years ago
alexpete 75dc720198 Integrating latest 47acbe8 5 years ago
alexpete a10351f38d Initial commit 5 years ago