Asset Deduplication with "Append & Reuse" #115660

Open
opened 2023-12-01 12:19:35 +01:00 by Dalai Felinto · 2 comments

Asset Deduplication with "Append & Reuse"

This topic was discussed as part of the Geomerty Nodes workshop in November 2023. Although it popped up in the context of nodes, at the core of it are assets.

The introduction of "Append (Reuse Data)" for assets, made production files clutter with duplicated versions of the same assets (e.g., essential node groups). That happens due to linking different files which have appended/reused the same assets. That leads to the following problems:

  • Namespace pollution.
  • Changes not being propagated on them.

On the flip side, it made local changes easy.


To address these problems we want Blender to deduplicate identical data-blocks:

  • It is up to the implementation to decide how to determine whether a data-block is identical. If non-relevant changes (e.g., node position) can't be told apart from relevant changes (values) we err on the side of considering them different.
  • This should be handle automatically by Blender, which internally will need to find a way to tell different versions of the same asset apart (internal versionioning, hash, ...).

The proposal is to change the existing "Append (Reuse Data)" so it brings a data-block into the file in a new way:

  • It should work similarly to linking, where users have to make the data-block local before changing its properties.
  • It preserves a reference to the original data-block (and its version/hash/...) so it give users the option to update an asset.
  • If the relation with the original data-block is severed (e.g., when using an asset from outside the essential in a renderfarm) the file is still fully valid (it contains a full copy of the original data-block).

Pain points:

  • The logic to determine whether the datablocks are identical may be expensive. In fact it may not be worth pursuiting this due to potential problems this may bring. It can be done as a separate project too, while a simpler .blend timestamp check could be used meanwhile.
  • This is too close to the concept of variants and versions for IDs, at least for the backend implementation. It makes sense to tackle them together.
  • This should be budgeted as a project within the Blender planning.
  • How it is called, and how this relates with linking needs to be clear and well communicated.
  • To differentiate this even more from regular Append, we could rename it to "Append & Reuse" on the user interface.
# Asset Deduplication with "Append & Reuse" _This topic was discussed as part of the [Geomerty Nodes workshop](https://code.blender.org/2023/11/geometry-nodes-workshop-november-2023/) in November 2023. Although it popped up in the context of nodes, at the core of it are assets._ The introduction of "Append (Reuse Data)" for assets, made production files clutter with duplicated versions of the same assets (e.g., essential node groups). That happens due to linking different files which have appended/reused the same assets. That leads to the following problems: * Namespace pollution. * Changes not being propagated on them. On the flip side, it made local changes easy. ---- To address these problems we want Blender to **deduplicate identical data-blocks**: * It is up to the implementation to decide how to determine whether a data-block is identical. If non-relevant changes (e.g., node position) can't be told apart from relevant changes (values) we err on the side of considering them different. * This should be handle automatically by Blender, which internally will need to find a way to tell different versions of the same asset apart (internal versionioning, hash, ...). The proposal is to change the existing "Append (Reuse Data)" so it brings a data-block into the file in a new way: * It should work similarly to linking, where users have to make the data-block local before changing its properties. * It preserves a reference to the original data-block (and its version/hash/...) so it give users the option to update an asset. * If the relation with the original data-block is severed (e.g., when using an asset from outside the essential in a renderfarm) the file is still fully valid (it contains a full copy of the original data-block). ## Pain points: * The logic to determine whether the datablocks are identical may be expensive. In fact it may not be worth pursuiting this due to potential problems this may bring. It can be done as a separate project too, while a simpler .blend timestamp check could be used meanwhile. * This is too close to the concept of variants and versions for IDs, at least for the backend implementation. It makes sense to tackle them together. * This should be budgeted as a project within the Blender planning. * How it is called, and how this relates with linking needs to be clear and well communicated. * To differentiate this even more from regular Append, we could rename it to "Append & Reuse" on the user interface.
Dalai Felinto added the
Type
Design
label 2023-12-01 12:19:35 +01:00
Dalai Felinto added this to the Pipeline, Assets & IO project 2023-12-01 12:19:37 +01:00
Dalai Felinto changed title from Asset Deduplication and Append & Re-use to Asset Deduplication with "Append & Reuse" 2023-12-01 12:21:50 +01:00

Hi Dalai, thank you for addressing this issue! I can't seem to find much information on this online.
My projects are constantly getting cluttered with essentially duplicate materials and node groups when I copy over models and materials from other blender files.

I would love the ability to reuse materials and node data blocks when appending files. Maybe if an appended material has the same name the user could be asked if they want to reuse the data block. Maybe there is an optional flag that could be on each material and node? I understand that it is too expensive of a calculation to evaluate and compare every material that is imported.

Hi Dalai, thank you for addressing this issue! I can't seem to find much information on this online. My projects are constantly getting cluttered with essentially duplicate materials and node groups when I copy over models and materials from other blender files. I would love the ability to reuse materials and node data blocks when appending files. Maybe if an appended material has the same name the user could be asked if they want to reuse the data block. Maybe there is an optional flag that could be on each material and node? I understand that it is too expensive of a calculation to evaluate and compare every material that is imported.
Author
Owner

Hi @Jonathan-Edis although this is not the use case we are focusing on here, it may benefit from it.

At first the idea is to tackle data-blocks which are appended using the asset system. This option could/should be exposed for regular append as well though, which would contemplate your case.

Hi @Jonathan-Edis although this is not the use case we are focusing on here, it may benefit from it. At first the idea is to tackle data-blocks which are appended using the asset system. This option could/should be exposed for regular append as well though, which would contemplate your case.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#115660
No description provided.