An asset is generally a building block within a shot or scene structure. An asset can contain many components or parts, or be entirely self-contained. With openPipeline, you can also sort your assets into categories, or Asset Types. For this tutorial and any others containing assets, we’ll assume we have three asset types: characters, props, and sets.
- In the openPipeline window (above), select the project name that you wish to work on and click on the Asset Browser tab (below).
- In this window, you’ll need to first set up an asset type by adding it to the list on the left. As stated above, we’ll create characters, props, and sets. Click the green “New” button to proceed. You will be prompted to type the name of your asset type, as seen below.
- Once this is completed, you may go about adding the assets. For this example we will make a simple asset with no Components in our props Asset Type (below).
Components allow you to have a single Asset with multiple parts referenced into it. This is particularly useful if you have a character and wish to have the rig worked on separately from the model at this stage in the process. This process is detailed in depth in a later tutorial.
When creating a new Asset, you’re given the options of:
- Start with empty Asset: This will create the Asset but nothing will be present within it. You may add to this Asset later on.
- Export current selection into Asset: Whatever is selected in the view window will become the Asset.
- Export current scene into Asset: The entire current scene in Maya will become the Asset.
- To start , we’ll create a table within our “props” Asset Type and start with an empty Asset. Since we’ve selected Start with empty Asset nothing exists in the asset file yet. I’ve made a table (below).
- To add this model to the “table” Asset, double click on “table” in the Assets window. The Edit Asset box will appear (below).
The table that I made in my current Maya window will be added to the table Asset if I select Current Scene. If you wish to start with a blank scene file for your asset, you may select New Scene here. It can also be noted here that you can see asterisk (*) symbols around the asset in the Assets window when it is currently open.
- Now that we’ve finished our basic table asset and we currently have it open, we can click on the Currently Open tab in openPipeline. This will bring up a window (below).
- This view has changed significantly now that we have an asset open. You may at this point wish to take a quick picture of the open asset in its current form for the Preview window. Simply click the Take Snapshot button under the Preview display to capture your currently open Maya window. Click Save Workshop, and you’ve got your asset for the time being.
In the next section, you will find more information about Workshop and Master files, in addition to the Currently Open window for Assets.
In this tutorial, we’ll discuss Workshop and Master files. Both are defined in the Creating a New Project Tutorial.
- Saving a Workshop
To begin, I’ll create a new asset. I think a lamp would look good next to the table (below).
As before, this will add “lamp” to the Assets window. Note that because it is open, it has the asterisk icons on either side as seen below.
Switching back out to the Currently Open tab, we can see that this file has not been saved (below).
Let’s save a Workshop of it now by clicking Save Workshop… This will allow us to add a comment, and will change the display to one as seen below.
Note that the comment is listed in the file’s History window, and that it now shows as “workshop version 1.”
- Reviving an old Workshop As this is the first version, we cannot yet use the Revive… button to call fourth an earlier file. Saving the workshop file one more time, as seen below, will allow us to use this option.
The Revive option is now active, and selecting it gives us a window as seen below.
If you ever need to call an earlier version of your Asset, this is the way to do so. Now, back to the Asset Browser tab as seen below.
Now that the lamp has a saved Workshop, you can see that openPipeline has added a minus (-) symbol to the right of the asset name. This denotes a saved Workshop.
- Saving a Master As was discussed earlier, a Master File is what you will eventually call into your scene files. A Master file has the option of flattening its references, and should not be directly edited. Be aware that when you save a Master file that it will also create a new Workshop file. If you continue to work on this file, you will be doing so on the Workshop and not the Master. To update the Master, simply save another Master file. To create a Master File, go to the Currently Open tab and click Save Master… (below).
This will open the Master File Switchboard. Here you have the option of Importing the References you’ve made for your Asset (rigs, etc) and deleting any Display Layers you’ve made. You’re also given the option of opening the Master File directly, but this generally isn’t necessary. You may also add a custom script command here, but details on this will be covered in a subsequent tutorial. I’ve added a comment here denoting that this is where I created a Master File of the lamp. This will be viewable in all subsequent Workshop History. Click the Master button to finish and create the Master File. This will bring us back to the Currently Open tab in openPipeline, as seen below.
As we can see, another workshop has been created as part of the mastering process. The History window also shows the comment we made as the Master File was created.
If we go back to the Asset Browser tab, we can see that the “lamp” asset is now labeled as “lamp+” with the plus icon indicating a Mastered file (above)
Custom Master Scripts
At many times you will want to run a script at the moment of mastering a file. The reasons are numerous and could be to do a clean-up of a file, or to run special functions on the file that are critical to its mastered version. Custom master scripts are just MEL scripts that are run when the master button is pressed, after the workshop is saved and right before the master is saved. The add a powerful step to the openPipeline workflow and allow users to customize the mastering step for their needs.
- Custom Master Command
The “Custom Master Command” field on the Master File Switchboard (below) is a place where you could place the name of a MEL command to be run. This command must be sourced already and ready to be run by Maya.
- Sample Custom Master Script
As a simple example of a Custom Master Script, say you would like to make sure that your models have their transforms frozen and/or their history deleted before they are mastered in the pipeline. The following script could take care of that at the mastering stage. This leaves the transforms and history in the workshop file so that the modeler still has access to them when they make edits.
global proc preMasterFreezeModel(int $freeze, int $history)
string $allPolygons = `ls -tr -type "mesh"`
for($eachMesh in $allPolygons)
// freeze transformation
makeIdentity -apply true -t 1 -r 1 -s 1 $eachMesh;
// delete history
delete -ch $eachMesh;
In the “Custom Master Command” field you would enter:
preMasterFreezeModel(1,1)to freeze transformations and delete history.
preMasterFreezeModel(1,0)to freeze transformations but not delete history.
preMasterFreezeModel(0,1)to delete history but not freeze transformations.
- A master step provides a non-destructive point to run this script as it does not impact the workshop file which is the only file edits should be made on. Said another way, you should never hand edit the master file.
If you have a custom master script that you would like to share please send them over or send us a link to your website or post on Highend3D.