Page MenuHome

Asset Manager: Support preview thumbnails for more data-block types
Needs Triage, NormalPublicDESIGN

Description

Motivation

For the asset manager, good previews are important. They are needed to tell assets apart visually, names are more like the secondary way to select them. We need to think about how to capture different data-blocks in a good way, to get the best possible previews.
We need that for multiple data-block types.

Design

We should try to come up with simple solutions, that work in the majority of cases. Just because there are some cases where a simple solution doesn't work, doesn't mean we can't use it in the majority of cases where it would. So we could have a simple, one-click way to create an asset and one that allows setting further options for when it's needed.

Materials, textures, images, screen-layouts, worlds and lights already support previews. We could of course improve them.

Objects

Idea: Try to place the camera in front of the object. Use the local transformation for that.


Possible issues:

  • The object's orientation has to match the Blender definition of "front". That is, the local negative Y-Axis pointing outwards.
  • A pose may rotate the geometry into a different direction (e.g. so that front and back are inverted). So we have to respect the pose transform.
  • For some object users may want to use a different perspective than the front for the preview.

Collections

Design needed. [TODO]

Brushes

From T56744, we'll probably use the same previews here.

Simulations

Design needed.

Rigs

Design needed.

Poses

I.e. pose library previews.
Design needed.

Movie Clips

Idea: Display some frame, but allow "scrubbing" through frames with horizontal mouse movements over the preview.

Event Timeline

Julian Eisel (Severin) changed the subtype of this task from "Report" to "Design".

To solve the 3 possible issues you mentioned, what do you think about adding a pop-up dialogue when creating the asset? For example, when making an asset for an object, show a "Perspective" drop-down menu with a bunch of options, like "Current", "Front", "3/4", etc.

Such pop-up dialogue would also be useful for making assets out of rigs and actions. To get a useful preview out of an Action, you would probably have to specify a rig that the action is meant to be used with. To get a useful preview out of an armature object, you might want other objects to be visible on the preview, even though they aren't actually part of the asset.
Materials would probably also like a customizable object to display on.

But maybe the pop-up would just be annoying and slow down the workflow? I'm biased as I actually quite like when operators use a pop-up to ask me exactly what I want.

Questions:

  • Will asset previews automatically update in any way, eg. I guess on file save?
  • Can assets store extra info that they only use for generating the preview? Eg. a list of objects that aren't necessarily part of the asset, but should be visible when the preview is being generated. I think this would be super nice, but then, does that mean if an object is deleted, it won't be fully deleted because an asset might be referencing it, just to use in a preview? That sounds bad, so I wonder how this would be handled.
  • Are animated previews planned? It would be useful for Actions, but other things too. Think animated materials, simulations, probably more.

To solve the 3 possible issues you mentioned, what do you think about adding a pop-up dialogue when creating the asset? For example, when making an asset for an object, show a "Perspective" drop-down menu with a bunch of options, like "Current", "Front", "3/4", etc.

Yes and no :) This is just the solution I had in mind too. But I also want simple things to stay simple, so the default behavior should just use the front and not ask for further settings. For the cases where that isn't sufficient, there can be a separate "Create Asset" operator showing the popup (or you could right click an asset in the browser and recreate the preview with different settings).

Such pop-up dialogue would also be useful for making assets out of rigs and actions. To get a useful preview out of an Action, you would probably have to specify a rig that the action is meant to be used with. To get a useful preview out of an armature object, you might want other objects to be visible on the preview, even though they aren't actually part of the asset.

Yeah rigs are a bit tricky. Just drawing the rig itself isn't too useful. Am happy to hear ideas of how this could work in practice.
I'm not sure if such rig previews are part of the first milestone though. Trying to get all these things working nice in the first major iteration can make the project drag or get stuck even.

Materials would probably also like a customizable object to display on.

Right. But just like for objects, I'd suggest having the advanced setup as opt-in behavior.

Questions:

  • Will asset previews automatically update in any way, e.g. I guess on file save?

There are two use-cases to clearly differentiate here:

  1. User just sculpted a rock and goes: "Oh, this is a beautiful rock. I want to add this to the asset library so I can re-use it in other projects"
  2. User works within the asset library of a project, creating and editing rocks for the set dressing department.

For 1) you would not want the asset library to depend on the .blend file the rock was created in. So the asset library would contain a deep copy of the data-block. There could still be a reference between the project file and the asset, so changes to the rock can be flushed to the asset library. But point is the user would explicitly create or update an asset, at which point the preview is (re-)created.

For 2) it's a bit complicated indeed. Brecht said other asset managers usually just have a button to explicitly update previews. Creating a preview may take a second or more per data-block (8K textures everywhere! What could go wrong?!1), so always doing it on file save is troublesome. In typical pipelines there's also the "Publish" step, which is a good point to trigger preview updates too.

  • Can assets store extra info that they only use for generating the preview? Eg. a list of objects that aren't necessarily part of the asset, but should be visible when the preview is being generated. I think this would be super nice, but then, does that mean if an object is deleted, it won't be fully deleted because an asset might be referencing it, just to use in a preview? That sounds bad, so I wonder how this would be handled.

This does sound useful but is a more advanced use-case. If needed, we can allow entirely custom preview images.
Another idea is, we could allow rendering previews from a specific view layer. An asset .blend could then contain a bunch of view-layers for advanced, custom previews. Such extra objects can then be disabled in the main view-layer, and their lifetime is managed like for any other object in Blender.

  • Are animated previews planned? It would be useful for Actions, but other things too. Think animated materials, simulations, probably more.

It is technically possible of course and I'm quite sure we will want that sooner or later. Not sure if we need it for the first milestone though.

Thanks for the detailed answer! With those in mind, I think it's okay to generate previews for rigs only showing the rig object and nothing else. No parameters required then, but I would enforce these settings for the preview image "render":

  • Pose mode
  • show_axes = False
  • show_names = False

Because the information displayed by those settings is so small it would only clutter the preview image.

I think there won't be many use cases for turning rigs on their own into an asset, so it's fair to keep things simple here.

As for Actions: I guess if we want to avoid popups, we can just assume that the actions should use the currently active armature object for the preview image, if there is one. That's the obvious solution, but not sure about discoverability. Users will just turn actions into assets at different times and sometimes get a good preview, sometimes not, and they'll wonder why. If you shove a popup in their face asking them to select a rig, they'll get it right 100%! :)

Could possibly use 3D Cursor Orientation for camera alignment / rendering as well? For the additional options, if front view doesn't work out. Or Perspective View matrix / current orientation to the object.

More so thinking about if a user has a mesh rotated in some specific way and wants to save it like that, and the local Axis is rotated / align to that as well.
So there maybe is no "front view" technically, unless you are looking at Local X or Y Axis, but that could be opposite of what the user wants too. Or maybe those are flipped from what they would consider "front view".

I made an asset viewer/creation tool for 3DS Max, and I had automated the capture at first, but it was finicky/un-reliable. Unless I told the user to setup their object pivots/etc very specifically.
So I decided to just put them into a thumbnail creation preview mode, where they just rotate the model however they want / etc and click "Render" and then get exactly what they setup. So not back and forth/repeating the thumbnail generation X amount of times to get what they want.

Julian Eisel (Severin) added a project: Restricted Project.Oct 20 2020, 5:14 PM

Removing this from the UI workboard, it's on the Asset Browser one now. This is sort of an implicit sub-project of User Interface and Pipeline, Assets & I/O, but more focused and avoids cluttering other workboards with tasks that are handled as part of a project anyway.