Tuesday, December 3, 2013

Naming Convention 1.

Simply it is the most important weather you are an artist or technician (so called TD) in the VFX industry. Furthermore it is the most important thing for mankind (or the universe). Naming convention is essential for everything.
Unique projects has unique naming convention. But let's pretend you won't do anything that nobody did before meaning of the process. So there are guidelines.
Naming convention is extremely important but there is another principle. As Richard Williams wrote in his book: "Keep it stupid simple." aka KISS.
Working with computer means you use operation systems like Windows and you create files which could be organized in directories. But you will find out sooner or later there are at least 2 big problem here.

Big problem 1.
One file can only belong to one directory.

Big problem 2.
More data we have that we can simply put into names, filenames for eg.

But these problems raise a lot of other issues. And this blog is more or less about to discuss those issues. Right now I simply use the KISS principle which also means (for me) do it as you can.

So we need a general solution of file naming. Before I tell you the truth I gather some ideas.

1. Importance of the order

Usually files are arranged by their names (alphabetical order).  So by giving names we can describe the order of the files.

2. Parts (tags)

We can of course combine different information usually called tags. So the question is how many tags should be there to collect the most important information?

3. Compressing information

We can say abbreviation but is more than that. Question is how can we compress more and more information into alphanumeric character. So for eg. we can use abbreviations but in that case we should establish a dictionary for those, because BG does not necessarily mean background for everybody.

4. Documentation

If you are a one person studio you might think documentation is not important. But it is. I think it is for every scale of facilities. So the naming convention should be documented. It can change over time from project to project and that means the naming convention document can have versions or can be attached to projects. It could be a simple text file.

4.1 Documentation template

Usual form to template naming convention is:
[tag1][separator][tag2][tag3][separator][tag4]

It can describe a file rules as well.

We can use explicit characters and variable names to be more clear.
[name]_[versionLetter][versionNumber]_[comment]

It could be necessary to explain the rule of the variables. We can call it file rules.
[name] Starts with capital alphabetical character and contains any alphanumeric character
[versionLetter] - Any non-capital alphabetical character

This example above use the "_" (underscore) as a constant character or tag. That means you can't change it. Usually when we describe a file path there are constant directories so they are constants as well:
e:/ Projects / [ProjectID] / 2D / ConceptArt / [AssetID] / 
[AssetID]_[versionLetter][versionNumber]_[comment]

In this example above the "Projects", "2D" and the "ConceptArt" are constant tags.

More complex when we use expressions like "AssetID", because this is not a simple variable but a concept plus and abbreviation (ID = identification). We should describe things like Asset and/or AssetID before we use it. But it is not the part of the naming convention documentation rather a documentation of the pipeline or system we utilize.

5. Character table
It is always recommended not to use special characters. That means file names contain only alphanumeric character, underscore and hyphen. We can express with regular expressions: [A-Za-z0-9_-] (see below)

So this would be my general template for file naming:
[name]_[vatriationLetter]_[versionLetter][versionNumber]_[comment]

And the rule for this pattern:
[name] - Starts with capital alphabetical character and contains any alphanumeric character
[variantLetter] - Only one capital alphabetical character
[versionLetter] - Only one non-capital alphabetical character
[versionNumber] - Two digit starts with 01
[comment] - Any alphanumeric character


Below we can see a series of examples how it looks in practice. So it is more like the explanation of the concept behind this naming convention.
Let's say I'm working on a landscape concept art. So the name part would be "Landscape". I separate the process stages like sketch, details, colors. So the version letters represent these stages (a, b, c). I can also comment where the stage starts to be more clarify.
Usually when we work on something we don't consider at the beginning there might be another variant for the subject. So if we use "A" as a base variant we won't ruin the naming convention later with adding an extra tag.

Landscape_A_a01_Sketch
Landscape_A_a02
Landscape_A_a03_Background
Landscape_A_a04
Landscape_A_a05_FGTrees
Landscape_A_b01_Details
Landscape_A_b02
Landscape_A_b03_BGMountains
Landscape_A_b04
Landscape_A_b05
Landscape_A_c01_Colors
Landscape_A_c01_SkyAndClouds

You might find the "a", "b", "c" a little bit confusion to use for versions. You are not the only one. Most people use a "v" letter like  "v01", "v02", etc. But using only one constant version letter we can't embed more information with that.


Footnotes

Regular Expressions aka Regex

Regex is a tool to analyze names. Usually it used to verify and search. If you have a basic idea how regex works you might want to establish naming convention that can be easily handled with regex.
For eg. the naming convention above can be described as regex pattern like this:
[A-Z] [A-Za-z0-9]+_[A-Z]_[a-z][0-9]{2}_[A-Za-z0-9]+

So the regular expression tells to the engine the name:
Starts with one capital alphabetical character [A-Z], followed by alphanumerical character [A-Za-z0-9], it could be one or more +, followed by an underscore _ (constant letter), followed by a capital alphabetical character [A-Z], followed by an underscore, followed by a non-capital alphabetical character [a-z], followed by any number [0-9], it has to be exactly two digit {2}, followed by underscore, followed by any alphanumerical character [A-Za-z0-9] and it could be one or more +.

The real benefit to use regex comes when you or your studio use programming languages or other tools to verify or match paths, file names, or any kind of text, etc.


1 comment: