2024-07-24 Out of the Box: Online Assets

Out of the Box: Online Assets Libraries - day 3

Attendees:

  • Dalai Felinto
  • Francesco Siddi
  • Pablo Vazquez

We continued our discussion about the design aspects of supporting remote asset libraries and the overall “out of the box” content creation experience. This is a potential project for Q4-2024.

The focus today was to explore a simpler design where each remote asset library is independent (i.e., each having its own repository). The session concluded with a proposal for deliverables (milestones).

Asset Library = Repository

To simplify the design, each asset library is its own repository. By default Blender comes with one asset library pre-installed (not pre-downloaded, just pre-configured similar to the Blender Extensions repository in Blender 4.2 LTS). The name of the asset library is still pending, for now we are calling it Online Essentials Assets.

Name: Online Essential Assets
URL: https://extensions.blender.org/api/v1/assets/essentials/
Tagline: Assets for your everyday needs.

Remote Asset Library properties:

  • Estimated preview size (index)
  • Estimated total download size
  • Advanced:
    • Cache path
    • Cache limit

The moment a new remote asset library is enabled (and online access is available), Blender could start fetching the asset library index (including the thumbnails).

Download and cache

By default asset libraries are stored in the user settings. Additionally users can choose where a remote asset library should store the downloaded data. The data stored is the index as well the individually downloaded assets:

  • Asset Library Index
    • /essentials/index.json (meta-data)
    • /essentials/cache/preview_images/
  • Downloaded Assets
    • /essentials/assets/

It needs an easy way to see how much space it is using currently, and to clear cache per library.

Variants, representation, versions

A common topic for asset systems is variants, representations and versions for each individual assets. Some examples of the different terms:

Variants:

  • New, old, damaged
  • Dry, wet
  • Red, blue

Representation (per variant):

  • 1K, 2K, 4K, 8K, etc.
  • LOD 0, LOD 1, etc.

Version:

  • The state of variants and representation. (v1.0.0, v1.0.1, etc)

API Example

{
"version": "v1",
"asset_size" : 100000000000000,
"index_size" : 5000000,
"data" : [
  {
    "id" : "sintel",
    "version" : 1,
    "available_versions" : 6,
    "type": "Collection",
    "blender_version_min": "4.0.0",
    "metadata" : {
        "catalog" : "3D Model",
        "tags" : ["character", "medieval"],
        "description" : "",
        "license" : "SPDX-CC0-1.0",
        "copyright" : "Blender Studio",
    }
    "variants" : [
    {
      "name" : "Damaged",
      "previews" : "/sintel/1/damaged/1k_preview.jpg",
      "dimensions" : [ 1.00, 0.60, 1.60],
      "representations" : [
      {
        "type" : "LOD:LOD-0",
        "polygon_count": 30000,
        "archive_url" : "/sintel/1/damaged/LOD-0.blend",
        "archive_size" : 100000,
        "archive_hash" : "feb18ebd19309663dda",
      },
      {"type": "LOD:LOD-1", ...},
      ]
    },
    {"name" : "Wet", ...}
]}]}

We could introduce a LOD 10 variant for 3D models to be used as native proxy objects (and as a visualization option within Blender).

Technical challenges

  • To be able to retrieve thumbnails in an efficient way, they will need to be external to the asset .blend.

Milestones

There are two approaches to this project. On one hand, the focus can be on the remote asset library right away. On the other hand, there are many improvements to the usability of asset usage and management that are necessary for the current system, and that also apply to remote asset libraries. If a local library is slow to load and browse, or cumbersome to search, it gets even worse for online libraries. We are going with the latter approach.

The proposed milestones are such that when the moment comes that we add online functionality, the overall experience is already complete. In particular in regards to organizing and re-using assets.

Improving Asset experience milestones:

  • Asset de-duplication: improve append & re-use.
  • Bookmarks
  • Tags
    • Make it easy to add existing tags (similar to geometry nodes attributes).
    • Allow users to add additional tags to assets from all asset library types.
    • Allow users to remote tags from assets from all asset library types.
    • Save tags “overrides” as part of user config.
  • Advanced search syntax
    • Expand the existing advanced search syntax (wildcard at the moment) to support smart filtering (e.g., name="Rex*" AND tag="Character,Low Poly")
    • Smart catalog (save search query as a “smart” catalog)
  • Publishing
    • Allow publishing of any asset types (similar to brush assets).
    • “Duplicate as Asset” should support Current File as target.
    • Unify asset and non-asset .blend (re: brush asset).
      • Users can change meta-data of asset regardless of asset library.
      • Support changing catalogs.
      • It can be implemented either by atomic opening/saving .blend assets meta-datas OR like the tags overrides system (see miletones 2)/
    • Needs mockup: Clarify the differences between “Mark as Asset” and publishing a new asset.

Online asset libraries milestones:

  • Remote Asset Library (simple)
    • Add option to add remote asset library (URL).
    • A single-variant of the Human Base Mesh.
    • At first, download the entire remote asset library once it is added.
    • No thumbnails (show asset type icons).
    • API implementation
      • Make JSON by hand.
      • We implement the entire API, but we only support 1 variant and 1 representation.
  • Thumbnails
    • Download all the thumbnails from the entire remote asset library once it is added.
  • Remote Asset Library (advanced)
    • Support downloading single assets.
    • No longer having to download the entire repository (or even supporting this).
    • New operators such as:
      • Download Asset
      • Save Asset to Local Library (requires Publishing)
    • Cache and storage management
    • Authorized access (for commercial/private remote asset libraries)
    • Load the lowest LOD (requires Asset Representation)
  • Online essentials asset library (temporary name)
    • Extend the “Online Essentials” asset library with more content.

Undefined milestones:

  • Asset representations
  • Asset variations
  • Non-datablocks assets
    • Investigate support non-datablocks such as HDRI
    • Support for Image textures
  • Python hooks

Follow up

  • Need mockups for:
    • Clarify Mark as Asset vs Publish as new Assets
    • Asset representation
    • Bonus: Faceted tags advanced search
17 Likes

So, is it plural (“Essentials”) or singular (“Essential”)?

What is this “preview”? And what do you mean with “(index)”?
What are the units? Pixels? (could be, for previews) Bytes? MB? MiB? And why is it estimated, and not the actual data?

What are those? What would that limit be?

Here’s some random feedback on the proposed JSON:

"asset_size" : 100000000000000,

For such fields I’d recommend including units in the field names. So asset_size_bytes for example. Also if this is not an exact size (as suggested above), maybe include something like _estimate in the name?

"version": "v1",
"version" : 1,

These use the same key, but seem to have rather different semantics. I would recommend not reusing that key, and using something like schema_version for the first. Also not sure why it needs a "v" prefix on the version number. It would also seem that the second version is just numerical, and not the “v1.0.1” that was discussed earlier. "available_versions" : 6, also doesn’t convey which versions are available, so not sure what its use would be.

"data": []

Literally everything in this file is “data”, so not sure what the meaning of this key is. Wouldn’t "assets" be a better key?

"dimensions" : [ 1.00, 0.60, 1.60],

Given that it’s not even explicit in the schema that this is a 3D model (I wouldn’t use the catalog name to determine this), here again there is the issue of units & meaning. If this were an image, would it also get 3 dimensions, or 2? And would it be in pixels or in world units (like these seem to be)? If these dimensions are not always in world units, how would this information be presented to the user?

1 Like

I would strongly recommend to add multi-asset tagging in there as well. Preferrably in a way that makes it possible to keep the tags non-uniform. I’ll give an example to clarify:

  • Asset A: tagged with [tag1, tag2, tag3]
  • Asset B: tagged with [tag3, tag4]

Now it should be possible to remove tag3 from both assets in one operation (like clicking on a little x after they’ve been both selected). Or to add tag5 to both. Afterward their tags should not have been completely unified: asset A should have [tag1, tag2, tag5], and asset B should have [tag4, tag5[.

No longer having to download the entire repository (or even supporting this).

What’s the reason to build the “download everything” feature, only to remove it later? The asynchronous nature of downloading on demand is hard to work with. If that’s not part of the initial design, I’m afraid that there will be a lot of code that will have to be rewritten to take this into account.

(bit of context: I write this based on prior experience working on a parking garage system. The project would first assume an “always online” situation, and only after months of development we’d switch over to “when some components cannot be reached, the parking garage should still be usable” approach. This required such a huge refactor of so much code, that the project slowed down to a halt and basically failed to deliver.)

1 Like

I’m a little confused about one repo = one library approach. I understand simplicity is important here, but it does feel like something that has to be refactored later and will just be double work.

But taken that it stays, my question is would I be able to only show certain bundles in asset browser? Lets say I want Human Base Meshes, but I don’t want Cube Diorama I don’t work with that style, and I don’t want my asset browser cluttered, things appearing in search that I don’t need, etc. Will there be a way to hide certain bundles?

If that something has to be implemented, again feels like one more difficult task that in the end will make one repo = multiple libraries system not as complex in comparison, and latter is obviously advantageous, especially for custom repositories.

2 Likes

“Human Base Meshes” is its own library/repo, “Cube Diorama” is another library/repo.

In the same way you don’t add the entire GitHub as repository, but individual git repositories. You’d go to extensions.blender.org, find a library that you like and copy its URL (or drag-drop into Blender). This will add a Remote Asset Library to your list of asset libraries, something like:
image

That’s just a screenshot of the current system with a fake URL. Imagine that list with a checkbox so you can even disable them if you’d like to keep them around but not be shown in the asset browser.

5 Likes

Oh that’s not what I thought. That is indeed better. In that case only thing I would miss from “One repo = multiple libraries” direction would be ability to list all libraries as children of repo, but maybe there can be something implemented that allows filtering by source website

For the records: the tasks mentioned on this workshop are now here.

They will still be flashed out and have the design officially approved while also assessing how much work each task may take.

2 Likes