UsdAssetCache Management and Workflow

(This is a translation of a [Japanese [Content removed] by AXEL PROTO.)

I have a couple of questions regarding UsdAssetCache, including clarification of the intended behavior and any best practices.

(1) Is there a shared mechanism?

Am I correct in understanding that UsdAssetCache is not part of the Shared DDC system, and that there is currently no standard feature for sharing the cache across an entire project? If so, is the typical workflow for each user to generate the cache locally in their own environment?

(2) Are there risks in using a single cache directory?

For ease of management, I am considering storing the cache in a single directory within the project (e.g., Saved/UsdCache/) and excluding it via .p4ignore. In this case, are there any known concerns such as conflicts or corruption caused by concurrent writes from multiple assets, or potential file system I/O bottlenecks?

Also, if there are any recommended workflows for managing USD caches in a large team, I would greatly appreciate your advice.

Thank you.

[Attachment Removed]

Hi Massahiro,

  1. You can share the USD asset cache for all imports in a given user’s computer by setting the Default Asset Cache property on the project settings. New UsdStageActors will use that as the default value, but you can also control which cache each UsdStageActor uses by just picking it on the actor’s details panel. There is no way of sharing the UsdAssetCache over the network like the DDC, if that is what you mean. If you want to share the UsdAssetCache between multiple users working on a project, you can put the cache and the assets generated by it on your source control as normal. The UsdAssetCache is a very simple asset: Basically all it has is a mapping between asset hashes and a particular asset. If everything is on e.g. perforce then every user of the project will be using the same local copy of the cache.
  2. There should hopefully not be any concurrency issues, as the UsdAssetCache is used for the USD imports which do many steps inside async tasks concurrently already. Putting the cache on a .p4ignore folder like that is fine, although each user will have their copy of the cache and cached assets that way, and could eventually silently end up with different assets cached for the same prims, depending on edge case imports. It shouldn’t happen if you’re importing the same files though.

I don’t think there is any existing recommended workflow for using the USD caches in a large team, but I don’t believe it should require that level of attention: It’s a relatively simple asset, as described above. If you save the assets that are produced, they will remain on disk, but otherwise will be discarded when the session ends. The cache can “rediscover” assets imported from USD if you put them on its folder, and you can double-click the cache to check and tweak the mapping between hashes and assets manually if needed. Given the “rediscover” mechanism you can clear this map freely as well, and it will regenerate the assets it needs, or rediscover existing assets on disk/session if needed.

Hope that helps,

Antony

[Attachment Removed]