Thursday, November 24, 2016

Maya Tips & Tricks - Using directories outside of the maya project stucture (relative path)

One of the main purpose to use Maya project structure to have the ability to reference directories locally. That means the project can be relocated. Let's say we have the Maya project root folder:

r:/Projects/201401_OBP/shotProd/010/maya

So the Maya default project structure look like this:



Beside the folders there is the workspace.mel file which describes the file rules within that Maya projects. In practice that means if you have Maya running and set this project (File menu / Set Project...) and you hit the Open Scene... from the File menu the file browser pops up pointing to directory below:

r:/Projects/201401_OBP/shotProd/010/maya/scenes

The workspace.mel file contains a mel command to address the file rule for Maya scene files:

workspace -fr "scene" "scenes";

More precisely there are two more file rule because of the maya scene file extensions. One for the .mb and one for the .ma extension:

workspace -fr "mayaAscii" "scenes";
workspace -fr "mayaBinary" "scenes";

The absolute scenes path is generated like this based on the current file rule:

project root  + /scenes

So Maya referencing the scenes directory below the Maya project root folder. Since than it does not matter where the Maya project is in the directory structure because inside the project it will be always valid.
But in studio scenario we can pretend that for eg. the Maya renders should be elsewhere than below the maya project as the default file rule describe it:

workspace -fr "images" "images";

Without any adjustment if we want to render an image it will look like this on Maya render settings panel:


As before the absolute scenes path generated like this based on the current file rule:

project root  + /images (the file name is the scene name by default.)


So as mentioned before usually we want to use an external directory to output the renders so the compositors don't have to look up it inside a Maya project but a directory with more general purpose. So the render (images) directory should be something like this:

r:/Projects/201401_OBP/shotProd/010/elements

We can avoid to use that absolute path. Maya can use relative path as a file rule. Just have to use the "../" syntax. It tells to Maya to go one directory up relative to the root folder. My super cool explanation picture:




To reference the elements directory the file rule will look like this:

 workspace -fr "images" "../elements";

My experience is that if I directly edit the workspacel.mel file maya only recognize that change after a restart. To edit the file rule via Project Window from the File menu it works fine.

Using relative paths means your project relocatable but the maya project itself depends on the outside directory structure.

Further reading.

Friday, October 21, 2016

State of VFX - Life after Pi

It happened just a few years ago but still with us. Digital Domain and Rhythm & Hues Studios two of the biggest VFX studios in the world bankrupted. They still exist thanks to new investments. But the bankruptcies were the symptoms of an unsustainable business model and that is still with us. Even at Digital Apes a tiny little company in Hungary we can experience the same pressure day by day that the clients want faster and would pay less money for that work with a fix bid.

For me the ultimate question is that: can everybody have similar salary around the world for the same work? Because the global competition of the VFX industry inevitable favors the cheapest labor prices. In the age of open-source movements technology and other factors will equalize in the long term.
Subsidies the other factor of course but it is a very very bad blind practice of governments to galvanize industries. What it means basically they help to make profit for investors by the local taxpayers' money. Okay but it is another topic for another blog...

So here it is the film what I would like to share:







Wednesday, September 28, 2016

Naming Convention 3. - Files and Folders 2.

To continue the previous chapter the starting point is the following stucture (I removed postprod folder explained later):

201401_OBP/
    010_IN/
    020_PREPROD/
    030_PROD/

    040_OUT/

When we start to create directory structure we are about to define the pipeline as well. By doing that we define concepts and create rules. Let's think about folders as a sets. We have a lot of things in the VFX production and we analyze those to define what is what. Does the particular item fit into that set or not? For example: is the current 3D model an asset or a shot. The answer is quite clear. Is that model a preprod(uction) or prod(uction) model? Not sure. To make it clear we have to create a rule like the following: there is no preprod model because preproducion is only a step its creation process ( for eg.: version 003 is more like preprod asset but version 008 is hires production model).

So right now we have to define a couple of concepts, pre-production (preprod), production, asset and shot produciton.

Pre-production
Less managed workflows like concept art, previz, animatics, storyboard. In VFX production it is usually before the shooting so it means there are no shots. Actually if we make previz or animatics we create shots but they can't be the production shots (except for full CG shots - see below).

Production
It is important to note that in VFX Point Of View there is no post-production. The whole film making process of course has post-production process. But if we use prod and post-prod folder one of them is kind of a meaningless. I hope it is not confusing.
So in my definition production for VFX is the process on the shots created by principal photography.

Asset production
Asset is a general concept in VFX. There is the concept asset production. Basically it means we create things which can be used in multiple shots, or we produce things shot independently.
Usually we are talking about sets like: characters, sets, enviroments, props.
 

Shot production
Shot is a general noun in the film industry. In a context of VFX shot production means obviously the creation of the VFX shots for the film. It can be divided to VFX shots, full CG shots and so called post FX shots (usually simple 2D effects like translate or rotate the image).

For shot production
Pre-producion can be defined like this: if we working on shots before we get shots created by principal photography it has to be the pre-production.

So asset and shot production basically a production and should below the 030_PROD folder.

201401_OBP/
    010_IN/
    020_PREPROD/
    030_PROD/
        ASSETPROD
        SHOTPROD
    040_OUT/

But can be simpler like this (to avoid deeper folder structure):

201401_OBP/
    010_IN/
    020_PREPROD/
    030_ASSETPROD
    040_SHOTPROD
    050_OUT/

You may ask: what is the logic behind using capital letters. And the answer is: fashion. There is no reason for that. So it should look like this using camelCase:

201401_OBP/
    010_in/
    020_preProd/
    030_assetProd
    040_shotProd
    050_out/


To be continued...


Monday, August 8, 2016

Physically Based Shading in Theory and Practice

As we all now (CG and VFX guys) Siggraph has an youtube channel called Siggraph University. A month ago they released a very very handsome presentation by Naty Hoffman called Physically Based Shading in Theory and Practice from 2015. So here it is:


Important is that it covers "only" the BRDF model (Bidirectional Reflectance Distribution Function). To see the other models jump to wikipedia.
They also released a coverage of the 2016 event with the same name. It contains 7 presentation and the first hold by Naty Hoffman again who summarize the current state of the topic.


Unfortunately some of the other presentations are not available right now because of some kind of legal issues.


Saturday, July 30, 2016

Maya 2017 (finally)

Maya 2017 here (I borrowed this picture from Autodesk).



As I'm looking at the new features since the Extension 2 (I wrote about it here) it seems the big hit is that Autodesk switched to Arnold as a main production renderer inside Maya. It is really BIG like this: BIG.



Other feature is the Time Editor which has no feature video yet. We can find out what is it in the maya 2017 docs.

Tuesday, July 26, 2016

Technical Papers 1. (Try to avoid overdose of information) - Sketch Animation Poses

Recently I've checked a lot of technical papers (in connection with CGI of course). We can simply overdose ourself with information via surfing on the net. So I try to avoid that and just feature technical papers and videos one by one what I liked most.



In connection with that I found an interesting development project using Blender:



Wednesday, June 8, 2016

Pixar's Universal Scene Description (USD) - Generalization of Pipelines

It is time to write about it because it seems we can have it soon. Pixar Animation Studio announced its intent to release its Universal Scene Description software (USD) as an open-source project by summer 2016.



So what is USD and what we can except if it will be used by VFX/CG studios all over the world. My opinion is that there is shift in the industry which leads to the generalization of pipelines and open-source technologies have key role in it.

Commonplace is that: every pipeline is different. It might be true but the end of the day studios, managers, supervisors, artists are facing the same or very similar issues day by day. There is the need to be more efficient and the CG/VFX pipeline is more and more in focus. But there are no off-the-shelf products so every studio has to develop in-house technologies and tools to manage their work. Usually the main driving forces of the development are the projects which are generates a lot of practices (how to name things for eg.). Ideally these practises are evaluated after and before the projects and could be implemented into the pipeline. So the pipeline evolves but this evolutions is rather some thing like agile software development which is works fine for a short term. In long term the pipeline development is based on the legacy of previous works and that is why every pipeline can be different.

But we can get to the point where the pipeline won't let us to be more efficient because of the legacy. For example it won't let us (or it would be too expensive) to implement new technologies, solve bottlenecks. And that is the time when the pipeline should be re-evaluated as a whole. The process is the generalization of the problems we face day by day. On a long term (might be decades) it has to result that studio pipelines are getting more and more similar. Of course there are new technologies, hardwares and the softwares which can distract the generalization process. That is why I think open-source technologies have key role in that, because the CG/VFX community can work together on the so called "best practise".

Universal Scene Description is a promise to generalize the way we build up 3D scenes and share between different (most likely 3D) softwares like Maya, Houdini, Katana, etc. They are on their way: as the FAQ says linux version can be downloaded and windows implementation is coming soon. Extended documentation and tutorials are also there.

Friday, May 27, 2016

Nuke - Print out AppendClip Inputs

AppendClip node is useful for anything like viewing a bunch of shots after each other. I used it to check out different versions of FumeFX simulations. Only one thing I had to find out: how to print the current version (version of the file sequence) of the effect out to the screen. Using a Text node we could utilize python commands within the message field. So the node graph is something like this:


And the python command (it called from TCL):


[python {nuke.thisNode().metadata()['input/filename'].split('/')[-1]}]

I don't know much about TCL but I could figure it out how it would look like in TCL syntax:

[lindex [split [metadata input/filename] {/}] end] 


It reads the node's metadata which is passed through by the current read node. The metadata holds the input/filename key and that is what we are looking for. nuke.thisNode is the node where the comman is called (the Text node in this case). Further information is here. In TCL it seems there is a basic metadata command.

Thursday, April 21, 2016

Waiting for Maya 2017 - Maya 2016 Extension 2

It seems Autodesk is late to announcing the annual version of Maya. I have the idea what kind of improvements will be in the new release. They have already featured as Maya Extension 2 (Extension 1 was published around the last summer). Or it means there won't be Maya 2017? Or they are just waiting to 2017 to announce Maya 2017?


Motion Graphics Toolset



Deep Adaptive Fluid Simulation



Enhanced Animation Performance

Shape Authoring Workflow and Character Rigging


Enhanced Symmetry Modelling

Render Setup



Monday, April 4, 2016

Maya Bug - Viewport 2.0 - Gimbal Axis

Another viewport 2.0 bug. If we rotating an item in hierarchy, a joint for example, we will see that the axes are rotating in a strange way. Since we rotated in one direction we can't rotate by grabbing the manipulator's circles (representing the x, y, z axes) any more because they actually have a different orientation. If we switch back to legacy viewport we will see the correct orientations.

In viewport 2.0 looks like this:


And the correct legacy viewport shows this:


 I tend to call legacy viewport as legal viewport recently because it seems viewport 2.0 is corrupted (sometimes).


Thursday, March 3, 2016

Nuke - Reformat to Bounding Box Size

Sometimes we have weird formats to work with in Nuke like this:

Occasionally we want to reformat an image to the size of another image. In that situation we have to choose the format from the format list (output format).


There are a lot of formats shipped with Nuke and we can also add custom formats via python or do it manually. We can add these customizations to the menu.py to use as a default startup. When we read an image sequence which has a format which is not included in the predefined format list we will find that on the bottom of the list as an unnamed item with it's size (for eg. 5184x3456 as we can see):


 But using Refomat or Crop node can produce even more specific formats like the first image (2074x5184). There are couple of ways to use that format in the graph. I found that the easiest way is the following:

Using a CopyBBox node can copy the bounding box infromation to another branch of the graph. The Reformat node can use that info just have to use a simple expression. So the reformat type is "to box" and the width/height are the following expressions:
box_width = bbox.w
box_height = bbox.h


So the Noise node after that Reformat will have the same size:


Tuesday, February 9, 2016

Nuke - Calling python from TCL - File Name To Label

So trivial but always forgotten (by me). Rigth now I write it down for the eternity.

The most common situation when we might want to call python from TCL is using the label field on the given node's Node tab. If we put some text here like "maki"

 
it will appear below the node's name in the node graph.


If we use bracket "[ ]" to delimit the text it is interpreted as TCL command until it is valid command (otherwise it will be only text). So we can put something like this:

focal: [value focal]

It would look like this:


To call python we can to use the following syntax:

[python {python commands}]

To output the file name of the camera we can use the following expression:

[python {nuke.thisNode()['file'].value().split("/")[-1]}]

It would look like this: 


Monday, February 8, 2016

Animation is the weakest area in VFX - Intro

I read an article about the future of VFX a long time ago. It was in 2004. You can still have it:12 Predictions on the Future of VFX. We can summarize what came true.
My point is as the title says: the animation in VFX is still way more immature than other areas. I don't speak about animated (2D or CG) films or shorts because they are amazing.
It is a complex issue. First of all I should define what I mean by animation. Usually we can separate animation of living things like animals (not plants though) and the others. We can talk about keyframe animation, technical animation, traditional animation, character animation, etc.
I want to write about it in details, but right now I just post a video. It is about how science can deal with animation. I'm looking forward to the solution where animation is kind of a mixture of simulation and keyframe animation.



Monday, February 1, 2016

Maya Bug - Viewport 2.0 Refresh

I tested on Maya 2015 and 2016. For example if we create a multilevel instanced hierarchy:

 

and remove one object at the second level:


 the object looks still instanced in the viewport:



If we change to Legacy Default Viewport it looks correct. To refresh Viewport 2.0 I had to reload the maya scene.