In the past few weeks the Blender Studio team spent some time redesigning their Asset Pipeline. This article is a comprehensive summary of the outcome of the process.
The core design for the Asset Pipeline is the following: take advantage of how Blender stores data and thus enable artists to work in parallel, without having to wait for the output of another task. This is done by merging the different tasks outputs in a publish file. On top of that, use Subversion to provide a safety net and a way to granularly log changes.
The foundations of the Asset Pipeline were established during the Settlers project, and were further iterated on during the production of Sprite Fright.
In this picture you get an overview of what is going to change after the last round of iterations.
The original system was quite simple. We would have one Asset Publish file, that gets constantly updated and linked in a shot. When Artists perform a publish they would actually be editing the publish file and use the Character Pipeline Assistant to pull the changes from the task files.
In the new system we introduce asset versions, requiring a shot to link to a specific version of an asset. That link can be updated to point to another version. When artists perform a publish, they are now in the task file and push their changes to the asset versions.
Note: A publish can actually push to multiple versions at the same time.
On top of Asset Versions, we rely on SVN revision to track changes more granularly.
Backwards Compatibility: Because we had only one asset publish file that would get linked in all the shots, an animation that was done months ago could break if the rig received changes in the meantime. This would make it difficult to render or re-render a shot.
Open Heart Surgery: Changing the one asset version always means a risk of breaking things in other files that link to it.
Poor logging: When things break it can be hard to find out when and why, as artists sometimes neglect good logging.
Naming Conventions: A lot of tools were based on very specific and rigid naming conventions, which is something we want to move away from.
Scattered Tools: Finally, we use this project as a chance to reorganize our tools and create a document that explains how everything comes together in a bigger picture.
To address these challenges and make the pipeline more scalable in the future we will introduce some new concepts.
Asset Versions: Partial asset versioning system, backwards compatibility
Asset States: Determines if an asset can be used in production
Asset Builder Pipeline 2.0: More customizable and new features
Asset Collections: Asset IDs, properties for studio sssets
Kitsu Integration: Centralized entity definition for easy access, share IDs
Automated Test Pipeline: Adds safety layer before commit
Tracking & Logging: Metadata files, which asset version is used where
Asset Updater: Track changes to assets linked in a shot
Task Layers are a new concept introduced in this update.
When setting up a new production, we need to create a configuration file we define how an asset is assembled, through Task Layers. Each Task Layer owns a domain of data and all of them together describe the entire data of an asset.
Task Layer can depend on each other and overlap. In this case the shading Task Layer needs the data of the rigging Task Layer, because without objects there can be no material assignments.
Task Layers can be pulled in from different sources by following a set of merge instructions that describe exactly how all layers are puzzled together.
And last but not least, Task Layers can be locked or live. A locked Task Layer cannot be changed anymore, meaning the data it owns stays the same. A live Task Layer, on the other hand, can be changed.
With the Task Layer theory out of the way, an asset directory might look something like what is picture in this illustration.
We have a couple of Asset Task files and some Asset Publish files. Tasks can publish the selected Task Layers to the Asset Publish files. Notice that a change will be published to all versions in which the selected Task Layer is in the live state.
This enables the following scenario: if the rigging department does a change that would break animation in a number of shots, they would create a new Asset Publish, which locks all rigging Task Layers of the previous asset publishes. That way the animation of those shots would not be affected, as it references the "legacy" rig. The shading Task Layer is still live in the previous versions, which means they will still receive regular updates on every shading publish. Even tough the rig is considered outdated, we can still reliably render that shot because the asset still has the latest shading state.
This partial versioning feature gives us great flexibility and fixes the backwards compatibility problem we had earlier. In the previous pipeline, such a breaking rigging change could have broken the animation.
A task file can also push multiple Task Layers at the same time. However, it makes sense to create one task file for each Task Layer so artists can work in parallel as much as possible.
One important aspect in this scenario is that artists need to keep the other Task Layers up to date. The rex.shading.blend task for instance is responsible for material assignments, shaders, uvs and other things. Whenever rex.rigging.blend publishes new rigging changes, the rex.shading.blend should make sure to get these changes as well. Otherwise, it might miss an object or shade an object that does not even exist anymore. For this reason it's important to perform a pull before an update push.
When artists pull the other Task Layers –on which they are not working on–, they always pull it from the latest asset publish.
This is all automated by the pipeline and makes sure that the task files are always as close as possible to latest asset publish.
The goal is to create as few asset versions as possible and only create a new version when a department does a breaking change. A change is considered breaking if it breaks shot tasks or if it breaks other Task Layers of the same asset.
A new version of an asset will always be in the 'Review' state and needs to be first approved by the team before its available in the production.
The Asset Builder is responsible for pushing a Task Layer from an Asset Task to an Asset Publish or pulling a Task Layer from the latest Asset Publish to the current Asset Task.
The goal of the Asset Builder is to transfer a set of selected Task Layers from a source collection to a target collection. The Asset Builder runs through different phases.
If you want to learn more about this, check out the Developer Guide for the asset-pipeline.
Two new concepts in the Asset Pipeline will be Asset States and Tests.
While Asset States are pretty self-explanatory, let's have a quick look at Tests. We often push changes to multiple asset versions at the same time. For example, all asset versions receive the same shading updates (because the shading Task Layer is live) but the underlying rig and objects might be different (as the rigging Task Layer is locked in an older asset version). It's really important to test if everything went well in the transfer.
The plan is to build an automated test pipeline that can run an Asset Version throug a set of technical tests and possibly also display a rendered picture to visually confirm that everything went well.
To simplify the SVN commit user experience, the plan is to create an SVN client as a Blender add-on. In order to reduce errors (misnamed, missing files, poor logging) the goal is to provide as much help as possible to the artist, for example by detecting all external files of the current .blend file and commit them if they were modified.
The Asset Pipeline relies on metadata to establish states, versioning and other concepts. The metadata will be saved in XML format next to the file that the metadata belongs to. That way, we define a clear and self-contained syste which does not rely on an external (online) database to track and sync changes. An XML file is also human readable and easily editable.
We still have a connection to Kitsu, and use it for initializing the Assets by fetching project information and IDs.
With that, we end up with an asset directory that looks like this:
The Asset Versions that are produced by the Asset Builder are used in shots or set files. Once there is a new version of an Asset, an artist working on a shot should have an easy way to update them. That's the purpose of the Asset Updater. It is very light weight compared to the Asset Builder and is mostly a notification system.
The Asset Update generates notifications by:
As a little bonus, here is our Glossary.
This project is actively in development. It is part of the Blender Studio Tools and you can clone it from here to get the latest changes.
There is also a zip file of the project uploaded to the Pipeline and Tools section.
Is there an updated version of this that doesn't force the studio to use Kitsu? Thanks!
I've got Kitsu working now on my server, and I'm testing the Heist configuration files, however I'm not sure about the project folder structure I should follow.
Ayways, it partially worked, but I'm wondering, what would be the final publishing asset file, and where should it be located? I mean the one that will belinked in layout for animators to use. So for example I have my modeling file, my rigging file, my shading file, but I'm not sure where do all they belong nor where they will be published into a final asset file.
Another thing is that when I do a publish of the character for example it automatically publishes to a file called "Characters.v001.blend", but I have not defined that blend file or name, so I'm not sure what's happening there. Also in that same window I get four circles, that I imagine represents something related to the tasks, because they are RI, MO, GR, SH, so that's clear, but no matter what I do those circles are always the same, grey empty circles, not sure what they mean right now.
This path seems indeed more flexible, but right now I'm not sure how to properly use it, I'm still learning EVERYTHING, Kitsu, the Addons and everything :)
Final question, I'm not sure if Shot Builder Addon is deprecated or not, but how would you approach the task of layout to add every set/asset/prop/character required for a defined shot, is it done with the asset pipeline?
Also the tab "Asset Updater", it's always empty, and I can't seem to have it populated, not sure if I have to define something in Kitsu for the shot or something similar.
It's very interesting and very useful, honestly this should be a "feature" in Blender itself, for any small/medium studio to leverage it, even without Kitsu, but at first it's ok if it requires it, it's easy to use it with Docker TBHm
@Bone-Studio Currently the task files of an asset all have to be in the same directory because they publish to the same sub-directory publish
.
And a shot file should only link in an asset from a published version in the publish
folder.
The name of the publishing file is currently generated from the asset entity name that is given via kitsu.
The way that is done is indeed quite rigid right now. This will probably change once we get around to implement this separated from the kitsu interface.
The circles show the locked/live state of each task layer in a published version, as is described in the blog post. So a circle means that the given task layer will push to that version. When you lock the state of a task in a publish version, that circle will turn into a lock and the task layer won't push to that version anymore.
The asset updater is heavily WIP. Its main function is to inform animators over new versions of the assets that they are using in a shot file. But is not fully done and nobody can currently work on finishing this part of the addon.
@Simon Thommes awesome, thanks for all the information, I'll check the entity name in Kitsu, theoretically I have a name defined.
Also, do I have to make something custom in Kitsu? Because when I try to auto configure the in/out of the animation file it asks for the 3d_in / 3d_out property, I have the shot configured in Kitsu, but it does not seem to have those properties, any ideas?
Regarding the Asset Updater, cool, could be great to have an option in the Addon settings to hide things that are under heavy development, like the asset updater, is a suggestion that I think can even be useful for you at the studio :)
Do you have any info about the Shot Builder Addon?
Thanks!
@Bone-Studio You need to add 3d_in
and 3d_out
metadata columns to the shot list. See the Kitsu docs for more info.
@Francesco Siddi @Simon Thommes can you share the render presets file for BlenderKitsu addon? I can't find any place where to pick a template for that file. Thanks!
@Francesco Siddi Thanks for the link, I missed that :)
@Bone-Studio I haven't been involved with those aspects of our pipeline, sorry. I'll ask someone else to get back to you about that.
@Simon Thommes Thanks!
I'm sure it may be something related to the kitsu configuration.
BTW I managed to get the publish file with the correct name, now I have some problem with the geometry not being updated some times, but I will investigate it to see what's the error
@Bone-Studio For the specific task layer configuration we don't have proper documentation yet.
The modeling task layer will only push to objects that are in a collection ending in .geometry
, you can simply link them in such a collection. That declares the ownership to the modeling task, as other task layers can also own geometry data in certain cases.
Information over the task layers like this is (for now only) available in the form of comments in the task_layer.py
configuration file.
@Simon Thommes I have nearly everything working, with some small exceptions, but those are not worrying for the time being.
However I'm totally unable to make the modeling task to update in the published asset, the first geo is there and it does not change, no matter what I do, I tried creating the collection ending in .geometry in different ways, no update for my geo.
I recorded a video to show what I'm doing and to see if you can tell me what am I doing wrong, other than that shading and rigging are being updated and I have not tested grooming, but it does not worry me yet.
Here is the video to see if you can help me solve this problem: https://youtu.be/guxXmkk8h2k
what puzzled me is that the first modeling file worked great, but the updates are not working, I thought the .geometry collection was being renamed internally by the addon, but good to know it's not, is there such a situation also with other tasks? The process is very cool, I've been showing it to part of my team today and they are very excited and liked a lot what I showed them :D
I've been trying to test this, but so far, while the idea is ok, the concept has a big problem, that may not be a big trouble for you, but it is a big problem if you want to use this asset pipeline in another studio.
@Bone-Studio I can't edit my message, so I'll continue here, I pressed enter and it published :S
... The first problem I see is that it requires Kitsu yes or yes, it's impossible to use this without a Kitsu instance, while the Blender part should not require Kitsu at all, the old Character Pipeline worked inside Blender as an Addon and that's it, this new one could work in the same way if prepared, but right now it asks you to pick a kitsu asset, so if you don't have a production set up in kitsu, it's not possible to use this.
Why I think this is important?
Well the character pipeline "fixed" a problem that EVERY sutudio has with Blender, the ability to work in parallel in a non destructive way with characters and /or complex rigged or not rigged assets, this is a must have in Blender since Links / Overrides cannot fix this, and won't fix this any time soon, so the old Character Pipeline Addon fixed this very well.
I'm glad to read about this new Asset Pipeline, the idea is still very good, but the problem is that not every studio has or will have kitsu, or need kitsu, while I understand the BS has it (Blender Studio, not Bone-Studio XD ) since this tool is so so important and capital for Blender users in general, I see this as a big limitation of something that could solve many many problems in many many studios with Blender, being this exact thing the most problematic one for any animation studio.
@Bone-Studio with that said, for studios that can implement or use kitsu, could be great to have a task_layers.py example file :)
@Bone-Studio Thanks for the feedback, I'm glad to hear that our pipeline tooling is in general something that can solve an integral issue for your production as well.
The fact that kitsu is currently required to initialize an asset entity is indeed something that we want to change. This can be leveraged by any other system that can provide a database of assets and ideally that whole aspect could be optional, to allow the workflow like it was in the previous implementation of the addon. We discussed it and this is something we want to address soon.
About the task_layer.py
:
You can find an example configuration here: https://developer.blender.org/diffusion/BSTS/browse/master/asset-pipeline/docs/
I will also add the cofiguration we are actively using for the heist project there. I already made changes to include an additional modeling task layer for that one. I'll make sure to have it included it there the coming days.
@Simon Thommes Thanks a lot for this!
I would like to follow the lead of your development since you are doing a very good job on this, and no one is better than the Blender Studio itself to deliver a proper pipeline that takes into account the Blender internal technicalities :)
It's awesome to know that Kitsu and even a database will be totally optional, in our case we will be installing Kitsu, but I know other smaller studios that won't be using something like Kitsu because they do fast paced short productions and sometimes they are still on the Excel sheet age hahaha
And in the end TBH if they feel comfortable with that, there is nothing wrong with it, but the functionality of the Asset Pipeline is something absolutely needed but any studio of any size, so this is awesome :)
I'll keep an eye, in fact today/tomorrow I'll be fighting with Kitsu hahaha and I'll be back at taking a look at the Asset Pipeline as soon as I have Kitsu properly working on our server :)
Thanks!
Join to leave a comment.