Sunday, December 28, 2014

Naming Convention 3. - Files and Folders 1.

Let's pretend we have a project. A good starting point is to count how many things we have to deal with during a project. Obviously it could be tons of files and data. There are a lot of ways to deal with them but eternal question is "what is what?". So we have something and we have to give a name for that. Considering this we have to define what this something is. What is the reason for this something? For what we are going to use it? Etc.
To answer these questions we have to have a look at our project. That something can be an image file of a concept art or a 3d model or it can be a feedback that our client sent us.
Of course every project is different so we can only talk about it in general. This blog is about VFX-CG so I try to collect ideas about that kind of projects.

First of all we know there are inputs and outputs.
Inputs can be any kind of material which is not created during the project in-house.
Outputs can be any kind of material which is sent to the client, co-workers, off-site studios, etc.

If we are talking about folder structure it starts like this:

IN
OUT

One step back. There should be a solution to identify projects (or shows).
Date is a simple organizer with a project ID.

Definition:
[yyyy][counter][separator][ProjectID]
[yyyy] - year like 2014
[counter] - two digit like 01
[separator] - underscore
[ProjectID] - abbreviated name of the project - exactly 3 capital letters like OBP

For eg.:
201401_OBP (Obviously Basic Project)

So we have:

201401_OBP/
   IN/
   OUT/

Of course we shoud have something called production. We can extend that concept with pre-production and/or post-production.

That is the (first) point where we have to consider importance or priority because we have options to organize the folder hierarchy and there is no ultimate solution as I wrote before. One really important thing is to try to avoid redundancy. For example we can arrange folders like this:

201401_OBP/
    IN/
    PRODUCTION/
        PREPROD/
        PROD/
        POSTPROD/
    OUT/

As you can see PRODUCTION or PROD basically the same but there are two folders with almost the same name. So we can avoid that like this:

201401_OBP/
    IN/
    PREPROD/
    POSTPROD/
    PROD/
    OUT/

Usually this is also called flat vs deep directory stucture.

A typical file system arranges folders like above therefore we should use numbers to add a precise order of the folders like this:

201401_OBP/
    010_IN/
    020_PREPROD/
    030_PROD/
    040_POSTPROD/
    050_OUT/

About using numbers you can read this: Naming Convention 4. - Numbers

To be continued...

Tuesday, November 25, 2014

Digital Pyrotechnics at Industrial Light & Magic with Plume

I always think about how big studios deal with pyrotechnic (explosion, fire and smoke, usually). Do they use Maya fluid or FumeFx, Phoenix FDHoudini Pyro FX, or Flowline, or something else (Blender)? And the answer is something else. Of course they probably use a lot of off-the-shelf stuff as it needed but since 2010 ILM has a proprietary solution called Plume. So there is an awesome presentation on youtube.


Thursday, November 20, 2014

Autodesk acquired Shotgun

Okay, it is not recenty news but for me it is because I do an extensive research on asset and project managment topic.
I found this a couple of month ago: Redcurrant. It is in connection with the Goosbery Project as I wrote before. As the open source community push forward the industry (not just CGI and VFX) it could be a viable idea to create an open source asset and project management solution. But as we know it is a tough-tough topic.
So what I expect from that acquisition? Is it all about the big fish eats the small one? Maybe. Because Autodesk provides lots of tools for VFX an CGI (but certainly not all of them) I think there is a need to establish a clear terminology for the industry. There is a global need of generalization I think. Example for that is OpenExr and Alembic.
What do I mean generalization?
There are lot of things which are the same for eg. in Maya, Houdini, etc. and whole the industry use these  concepts. Polygon, shader, render, etc. for example.
But lot of concepts are conceived at different vfx companies, universities and software developers, etc. which I think should be the same. Asset is a typical example for that. Is it a file? Or is it a set of file versions? Or it is a lot of small components which build a 3d character?
Another example is a status of a task. Task is a complex thing itself. About it statuses: there are ready to start, WIP, hold, pending, approved, completed, on feedback, daily, commented, reviewed, has revision, omitted, etc. In this list reviewed, has revision, commented basically the same. Certainly should be an exact definition for for statuses and certainly should be a clear picture how many status necessary for the project management.

There should be a standard definition for a lot of concept in connection with VFX-CGI.
I think a major player on the asset and project management field or an open source movement can affect the generalization of the industry. It might be Shotgun.

About Shotgun you can read here.
About the acquisition you can read here and here.




Thursday, November 6, 2014

Open Source

I wrote about open source a bit during the past few month but that was the first time when I looked up in wikipedia. There is that nice little stop motion movie I like to share here. I think it is great :)


Tuesday, October 7, 2014

Visions of Autodesk - Maya

Okay, you can say it is a commercial again. I'm not paid by autodesk :) Truly. This is my commitment to the profession (I hope google translator worked on this right).

Maya Lighting & Rendering


Maya Animation
Maya Visual FX



Wednesday, September 17, 2014

Naming Convention 2. - Pipeline (CG / VFX)

When we are thinking about naming convention more or less thinking about pipeline. So couple of words about pipeline.

We can separate workflow and pipeline. I could write a novel about this. Just look these words up in wikipedia. Of course we are talking about VFX or CG here so the simple conclusion is the following:

Workflow
A process like modeling, riggin, texturing, etc.

Pipeline
There is now exact wikipedia article about VFX pipeline. In general it means "chain of data processing stages". In VFX it could be workflows and their connections. We can imagine some kind of flowchart like this:



The arrows can be simple data input/out put connections or data processing as well. The boxes are the workflows as you can see above. Pipeline can refer to the arrows. Personally I prefer the concept that pipeline is the whole stuff (workflows and the arrows) as you can see above.


With computers we create, modify and store data. As simple as that. So the question is how we do that?

Workflow means (most of the time) we use softwares like Maya, Nuke, Houdini, Blender, Photoshop, etc.. They have input and output data: usually files. We have to store them in a consistent manner. Naming convention refers to that consistency.

We have to separate files from each other based on the content and store information within the filename. To organize files we use folders.
So the goal to establish an organized folder and file structure ruled by the naming convention.


Files and folders are ruled by the operating system (OS) therefore we have to accommodate these rules to the naming convention.

As I wrote before there are couple of problems with of folder and file structures in general. For example:
1. Limitation of the length of the file path.
2. One file can be only in one folder.
But this would be another topic. I'm going to write about it.


Friday, August 1, 2014

Maya Functions - Removing Plug-in Nodes

To disable or unload a plug-in in maya could be tricky. I had situations when a plug-in could not be unload even if I pushed the 'Force' button on the poping window in Plug-In Manager because nodes of a certain plug-in was in use.


It seems maya can't always (or never) delete nodes that are in use. I had situations when maya crashed when I was loading a scene file which contained unknown nodes (unknown plug-in nodes). Actually I had to find out that the reason of the crashing is that a certain plug-in was not installed on my computer. Scene with Arnold nodes can produce crash when you want to load into a maya without installed Arnold plug-in.
So there is a need to delete plug-in nodes manually...or with a python script.

The main command is:

 cmds.pluginInfo("Mayatomr", q = 1, dependNode = 1)  

With argument "Mayatomr" it will list all the Mental Ray plug-in nodes. Or "mtoa" would list all Arnold specific nodes. Of course even if the plug-in is loaded this command returns something only if there is at least one node of that plug-in in the current maya scene.

Here is a function for removing plug-in specific nodes:

 def RemovePluginNodes(PlugIn = "mtoa", Verbose = 1):  
     '''  
     DESCRIPTION  
     Remove nodes of the given plug-in.  
     INPUT ARGUMENTS  
     - string - PlugIn - Name of the plug-in. You can check the exact (maya) name of the plug-in in the Maya Plug-in Manager. 
                         For eg.: Mental Ray plugin file: Mayatomr.mll -> "Mayatomr"  
     - int - Verbose - provide extra information about the process  
     RETURN  
     None  
     '''  
     plugInNodeTypeList = cmds.pluginInfo(PlugIn, q = 1, dependNode = 1)  
     for plugInNodeType in plugInNodeTypeList :  
         existingPlugInNodeList = cmds.ls(type = plugInNodeType)  
         if existingPlugInNodeList:  
             cmds.delete(existingPlugInNodeList)  
             if Verbose:  
                 print "Deleted nodes:\t%s" % existingPlugInNodeList  

I haven't tested extensively so give it a try and let me know your experience.

Monday, July 21, 2014

Customizing Maya - Help Line

It turned out Help Line is quite useful. You should not spend a decade using maya to realize that as I did. I really don't know how people learn maya, but I guess few of the users know everything about the software.

Day after day I have the situation when I say: "Whaoo!" And I realize something very very useful feature. I'm going to write about the small discoveries soon.

The Help Line really can help to learn small features in maya. But the standard placement (at the bottom) of that UI part is not best. I realize that when I saw one of my colleague had a different UI setup. Actually he does quite strange things like placing the ChannelBox to the left...but placing the Help Line at the top part before the Shelf is a brilliant idea.



It is really help your eyes to catch the info about the tool, menu item, icon, etc. you are about to use.

Thursday, May 29, 2014

Gamma Correction - Nuke - Open Color IO

Hot topic. I cloud write a lot about this but the information available on the net already. I started to examine this topic because I wanted to have a solid understanding Nuke's color management.

So I found two very useful articles about it.
The first one is especially about gamma correction:
Gamma Correction

For me the most important thing to understand is the following:

Human eyes see as linear - perceptually linear
Computers / cameras see as linear - value linear


The second one is a brief overview about Nuke's color management and there is an explonation how Nuke uses gamma correction:
Color Management In Nuke (By Steve Wright)

Okay, you went through and now you understand gamma correction. So here it is the next lesson:
Since VFX industry utilize different softwares with different color management there is a need to make a standard for VFX studios. Read more about this here:
Cinematic Color

Okay, you went through the first couple of pages and you really understood the topic is quite complex. Don't panic I felt the same.
But the solution is here as the PDF says: Open Color IO


Friday, May 16, 2014

Blender For Feature Animation Film

Recently I have been thinking about Blender. Because I never used it I considering things as a professional who might want to learn and / or switch to Blender.
I think to get a job as a professional Blender user is not an option currently especially in my home country Hungary.
I have a lot of personal projects which involves CGI and VFX as well and I definitely don't want to spend money to buying softwares for those. So this motivation is pushing me toward open source softwares like Blender.
To compare 3D softwares and discuss about differences between them is a never ending story. I think it is a very complex thing to claim which software is better then the others (if it is possible).
I started to collect information about Blender and watched films like Big Buck Bunny and Tears Of Steel. For me these shorts prove that Blender can produce decent quality full CGI and VFX. I can't say those are cutting edge like VFX that ILM or other major facilities can do. But it is not just about the softwares they use.
Because I'm involved preproduction of a feature animation I raised the question (for myself): Can Blender be a choice for full CGI feature animation? I know there are current project around the world. At the Blender Conference 2013 "father of Blender" Ton Roosendaal mentioned few of them.
Worth to mention Blender community is now working on an open (online) feature animation project: Project Gooseberry

Tuesday, April 8, 2014

Maya 2015

Finally Autodesk released Maya 2015. Oh why, oh why? I don't get the idea why they release every year a new version. Maya 2015 has a lot of very cool new stuff and I can't wait to use it in the studio (as a matter of fact it will take a while). And as I'm writing these lines I realize there are really exciting features what seem very useful in everyday work. Actually I changed my mind. First I wanted to criticize but I have to say Maya 2015 is a big release. Mainly I'm disappointed about Bifröst. As we can read here current implementation is rather an eye candy (or a toy).

Another thing that bothers me is SOuP. There is no sign that Autodesk would like to start some kind of co-operation with the SOuP guys despite at the Ideas of Maya Forum this topic is the hotest. And Bifröst seems not going to be a full procedural framework (quotation from the Jedi of SOuP). Furthermore having a texture deformer in Maya 2015 proves that they really don't think that proceduralism or SOuP should be the direction.

Maya 2015 User Guide - What's news

So what do you think?

Friday, February 28, 2014

Maya Tools - Locator size by scale - Write a function

So, we saw there was a simple 4 lines script to adjust locator size by scale.
How to make a so called tool?
I have no idea whether there is a scientific approach of that. I know about writing a specification. As a matter of fact I found a good article about that: Painless Functional Specification
I simply skipped the first chapter because I knew that is important so I didn't need a tale about that :)

But before I even knew about specification I usually thought as a user because I stared my "career" as an artist not a TD.
In this case this tool  should be only one click solution: Set Locator Scale By Size. To make it clear it is not for locator type object but cameras and lights. There shouldn't have been any other things just one button to click so we can move on to technical specification.

First of all we should write a function:

 def LocatorSizeByScale(Selection):  
     for item in Selection:  
         scaleVal = cmds.getAttr(item + ".s")[0][0]   
         cmds.setAttr(item + ".s", 1, 1, 1)   
         cmds.setAttr(cmds.listRelatives(item, shapes = 1)[0] + ".locatorScale", scaleVal)  

The argument should be a Selection. In maya ls command results a list no matter whether it is one or more object so the Selection has to be a list (array). With for cycle it works more than just one object. So we can run the function like this:

 LocatorSizeByScale(cmds.ls(sl = 1))

But as I wrote before there could be a lot of error situation. I'm a visual thinker. I don't make every time flowcharts but for the sake of this demonstration I'm going through the whole process of visual design. I'm a self-taught programmer and this is my practice not a scientific approach.

First I made a sketch of a flowchart.



It took around 5 minutes and another 5 minutes to verify and add notes. After that I could start coding. I had a clear picture how it would work. Okay but I don't expect reading that from anybody. I made a better picture for this article.





This flowchart shows everything what we need. If we can draw a flowchart like this we have a clear picture how the function is going to work. So the coding is just an execution of the plan.

The result code:

 def LocatorSizeByScale(Selection):  
     '''  
     DESCRIPTION  
     Scaling camera for eg. can cause problems (Z-Depth pass can be wrong for eg.). So scale value should be transfered to the locatorScale attribute.  
     If the object (the selected node's first shape node) has locatorScale attr it will be adjusted by the transform node scale.  
     INPUT ARGUMENTS  
     list - Selection - Selected nodes  
     RETURN  
     None  
     DEPENDENCIES  
     maya.cmds  
     maya.mel  
     '''  
     if Selection:  
         for item in Selection:  
             if cmds.nodeType(item) == "transform":  
                 # Only checks scaleX attribute. That means non-uniform scale not handled.  
                 scaleXVal = cmds.getAttr(item + ".scale")[0][0]  
                 if scaleXVal != 1:  
                     # Only the first shape node considered  
                     shapeNode = cmds.listRelatives(item, shapes = 1)[0]  
                     if shapeNode:  
                         if mel.eval("attributeExists \"locatorScale\" " + shapeNode):  
                             locatorScaleVal = cmds.getAttr(shapeNode + ".locatorScale")  
                             cmds.setAttr(item + ".scale", 1, 1, 1)   
                             cmds.setAttr(shapeNode + ".locatorScale", locatorScaleVal * scaleXVal)  
                         else:  
                             raise StandardError("There is no locatorScale attribute to adjust.")  
                     else:  
                         raise StandardError("There is no shape node.")  
                 else:  
                     print "Default scale value. Skipped."  
             else:  
                 raise StandardError("Only works for transform selection.")  
     else:  
         raise StandardError("There is no selection.")  
 
Further development
Better error handling in connection with selection and selection types
Non-uniform scaled object
Option to warn non-uniform scaled object
Option to warn already set locatorScale value

We will continue...

Recent News - Kenau

I didn't have time to write during the last couple of mouths. It was quite tricky to manage my time. After all our project in the studio where I work was finished.
Kenau is historical film take place at the time of Dutch War of Independence. So at Digital Apes we handled around 300 VFX shots. There were different type effects we did. Mainly set extensions, cg cityscapes, matte paints, clean ups. There were shots we had to add arrows (usually storm of arrows), blood on swords and on amours, fire, smoke, etc. And there were more complex shots where we add a lot of elements like crowd, explosions, demolitions. And last but not least there was the opening full cg shot which was around 1000 frame long and we had to create a cg Great Black-backed Gull and a complete cg aerial view of the city of Haarlem at the time 16th century.
Personally I was glad to work on a movie what makes sense for me. We didn't have to make giant robots or dragons or demolish whole cities. As I wrote before I like movies where the VFX don't lead the story but support it. Kenau is like that. I can't wait to see it in theater.
I was involved just a couple of VFX heavy shots directly. But I supported the whole 3D crew with technical and pipeline stuff as well.
First of all I made the animatic for the opening shot. After we had to clarify our asset pipeline. Basically it meant we had to establish a naming convention for textures, shaders and Arnold StandIns. I wrote dozens of python functions to make it simple but it turned out the issue is more complex so I didn't have time to make a tool what every 3D guy could use. The next pipeline issue was the camera. The idea was that we should use Alembic camera so all the nuke and maya users would use the same asset for their shots.
My biggest challenge was to create the rig and the animation of the seagull. It took around two month. I can't say it could not be better but I like the result very much. I'm biased :) If I have time I will write a whole post about the seagull rig. To summarize I can write only common places: to have good animation, and anatomy references was crucial. Of course we could download a lot of pictures from the net but it was almost impossible to get a good quality footage about a Great Black-backed Gull flying as the camera followed it. The other problematic thing was the skeleton. I found a lot pictures about a bird skeleton but not seagull. We talked about in the studio we should catch a real seagull and did the research for ourselves (if you know what I mean).
Other major challenges were the demolition, explosion scenes. There were 4 large scale explosion in the movie I had to create. I create maya fluid effects and particle and nCloth simulations. I have lot of things to write about this topic so I'm going to continue it (soon)...