Skip to content

Conversation

Sanakan8472
Copy link
Contributor

@Sanakan8472 Sanakan8472 commented Jun 3, 2021

  • GameEngineTest now fail on transform failures.
  • Removed asset references inside Content that lead outside of it and thus could not be resolved if Content data dir was added to other projects. These have been replaced with material overrides in projects that relied on this.
  • Scene thumbnails again contain the sky. Each asset type can configure this by setting the view exclusion tags on the RemoteCreateThumbnail call.
  • Added asset browser context menu entries to find all direct and indirect uses of an asset. This is done by a custom syntax in the search field.
    image

@Sanakan8472 Sanakan8472 requested a review from jankrassnigg June 3, 2021 21:31
@Sanakan8472 Sanakan8472 force-pushed the user/cm/assetTransformTest branch from 31d2e74 to 87d552d Compare June 3, 2021 21:35
m_uses.Clear();

const char* szUsesGuid = ezStringUtils::FindSubString_NoCase(szText, "uses:");
const char* szUses2Guid = ezStringUtils::FindSubString_NoCase(szText, "uses2:");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "use:" and "ref:" instead of "uses" and "uses2" ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was struggling with a good naming pattern here. The ezAssetCurator::FindAllUses finds all assets that have this asset as a transform dependency or reference it in addition to allowing to find indirect uses by creating the transitive hull.
I thought 'use' nicely generalized both refs and deps to the asset but couldn't think of a short form for the indirect case. I think ref would be misleading and wouldn't convey the indirect nuture. Granted, neither does uses2 but at least it isn't missleading.
Only in very rare cases will an asset be a transform dependency of another asset so we could get away with just calling the direct case ref: and the indirect case use: ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion "use" is the more direct thing. As in "this asset directly uses that asset", whereas "ref" is the more indirect thing, because asset A doesn't itself USE asset B, but still references it through another asset C.

Frankly I don't understand "Only in very rare cases will an asset be a transform dependency of another asset "

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ezAssetCurator understands and tracks dependencies as links between assets that are required to transform an asset. E.g. if A has a dependency on B, B needs to be successfully transformed for A to be able to be transformed.
References in the ezAssetCurator on the other hand are links between assets that are only relevant at runtime for the assest to function. E.g. if A has a reference to B, both A and B need to be successfully transformed in order for A to work at runtime.
Thus, I didn't want to reuse the same word for a different meaning which would be confusing.

@@ -205,8 +200,8 @@ void ezReflectionFilterPass::UpdateFilteredSpecularConstantBuffer(ezUInt32 uiMip
};

auto constants = ezRenderContext::GetConstantBufferData<ezReflectionFilteredSpecularConstants>(m_hFilteredSpecularConstantBuffer);
constants->Forward = GetV4(vForward[outputIndex % 6]);
constants->Up2 = GetV4(vUp[outputIndex % 6]);
constants->Forward = vForward[outputIndex % 6].GetAsVec4(0.0f);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's even "GetAsDirectionVec4" IIRC.

Comment on lines 25 to 30
DataDir
{
string %Path{">sdk/Data/Content"}
string %RootName{""}
bool %Writable{false}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These projects don't use the Content data dir, do they? By adding the data directory, the asset transform for these projects may take longer (I guess all assets will only be transformed once, but the redundant projects will still scan the additional assets for changes).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They all do use the >sdk/Data/UnitTests/GameEngineTest/SharedAssets data dir which takes all its textures for its materials from the >sdk/Data/Content directory. Removing that dependency looks a bit more difficult without splitting the data dir in two.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine then, wasn't aware of that.

Copy link
Member

@jankrassnigg jankrassnigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments.

p
{
s %BLEND_MODE{"BLEND_MODE::BLEND_MODE_OPAQUE"}
s %BaseTexture{"Grey.color"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This material was copied over 1:1 and then adjusted to not use a texture. Now you get the original asset and that's why the tree appears textured again in the test and therefore fails now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah that explains the guid collision, thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I've restored it with a new guid and changed the material references fo the tree to the new asset.

- GameEngineTest now fail on transform failures.
- Removed asset references inside Content that lead outside of it and thus could not be resolved if Content data dir was added to other projects.
- Scene thumbnails again contain the sky. Each asset type can configure this by setting the view exclusion tags on the RemoteCreateThumbnail call.
- Added asset browser context menu entries to find all direct and indirect uses of an asset. This is done by the following syntax in the search field.
@Sanakan8472 Sanakan8472 force-pushed the user/cm/assetTransformTest branch from 87d552d to 0ecba1a Compare June 4, 2021 10:30
Renamed uses: to ref: and uses2: to ref-all:
@Sanakan8472 Sanakan8472 force-pushed the user/cm/assetTransformTest branch from af59abe to 599b513 Compare June 4, 2021 12:44
@Sanakan8472 Sanakan8472 merged commit 4072c8d into dev Jun 4, 2021
@Sanakan8472 Sanakan8472 deleted the user/cm/assetTransformTest branch June 4, 2021 15:59
@jankrassnigg jankrassnigg added this to the Next Release milestone Jun 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants