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:
Thursday, March 3, 2016
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:
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.
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.
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.
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.
Tuesday, December 1, 2015
Breakdown / Making Of 1.
There is a lot of breakdown and making of stuff out there. A couple of my favorites below.
Development of the animation for special creatures in Cloudy with a Chance of Meatballs 2
ILM raised the standards of the breakdown clips. Check this out how it looks about the movie Battleship:
Character design on the film Rise of the Guardians:
Development of the animation for special creatures in Cloudy with a Chance of Meatballs 2
ILM raised the standards of the breakdown clips. Check this out how it looks about the movie Battleship:
Character design on the film Rise of the Guardians:
Wednesday, September 30, 2015
Autodesk Vision Series 2015
I think it is time to relax and let Autodesk be our entertainer. Okay, you might think I`m biased (or paid by Autodesk which is not the case unfortunately) I spend most of my time using Maya. Of course I`m biased. I wish I had more time to do cool stuff with other softwares like Modo, Houdini, ZBrush, Dynamo, Krita and learn more about Blender, Substance Painter and Designer, Photoshop, AfterEffects, Photoscan, PFTrack, FinalCut, Flix, Mari, Nuke, Hiero, Katana, Arnold, Renderman, OpenColorIO, ShotGun, Tactic, fTrack, USD, OSL, MU, Python, C++, JavaScript, never ending story...
Anyway, just relax and watch these videos:
Virtual production
Rendering and the cloud
The topic is Procedural Content Creation and the software is 3DS Max. I have to admit it is a bit disappointing for me because we waiting soo long ago a system like that in Maya. Okay, there is SOuP so Autodesk bosses think we don`t need proceduralism any more because we already have it.
And last but not least: Editorial
Anyway, just relax and watch these videos:
Virtual production
Rendering and the cloud
The topic is Procedural Content Creation and the software is 3DS Max. I have to admit it is a bit disappointing for me because we waiting soo long ago a system like that in Maya. Okay, there is SOuP so Autodesk bosses think we don`t need proceduralism any more because we already have it.
And last but not least: Editorial
Maya Rigging - Analyze stretching and compression with SOuP tensionMap
As we all know that SOuP maya plugin package has the tensionMap node. What it does is that colour coding the stretching or compression occurs on the deformed surface. It can be used for a lot of things. For example it can triggers blendShapes based on the surface compression or stretching.
I found it was useful to analyse how skinClusters (skin deformation) and blendShapes (morphed geometries) affected on the result surface. I made a short video to demonstrate this.
To utilize the tensionMap node easily I wrote a simple python script. We have to select the deformed mesh first and the original mesh after. It might be tricky to find those nodes in the node graph as you see below.
So here is the script:
I hope it works fine for you.
I found it was useful to analyse how skinClusters (skin deformation) and blendShapes (morphed geometries) affected on the result surface. I made a short video to demonstrate this.
To utilize the tensionMap node easily I wrote a simple python script. We have to select the deformed mesh first and the original mesh after. It might be tricky to find those nodes in the node graph as you see below.
So here is the script:
def AddTensionMaterial(Selection):
"""
== DESCRIPTION ==
It creates a lambert material diffuse color input from the vertex color map.
The color map is from SOuP tensionMap with applies an RGB color code to represent tension on the surface of the geometry.
Basic color code:
Green - relaxed
Blue - stretch
Red - compression
There is no error handling currently. SOuP plugin has to be loaded.
=== Limitations ===
It considers only the current modifiers.
=== Side Effects ===
Assign verex color set
== INPUT ARGUMENTS ==
+ List - Selection - Mesh nodes has to be selected in order -> select the deformed mesh first and the original one after
+
== RETURN ==
None
== TOOLTIP ==
Select the stretched or compressed shape node and the original (non-stretched or compressed)
shape then run the code like this:
AddTensionMaterial(cmds.ls(sl = 1))
"""
shapeResult = Selection[0]
shapeOriginal = Selection[1]
tensMap = cmds.shadingNode("tensionMap", asUtility = 1, n = "tensionColorMap")
lastDefomerOutput = cmds.listConnections(shapeResult + ".inMesh", source = 1, destination = 0, plugs = 1 )[0]
cmds.polyColorPerVertex(shapeResult, relative = 1, r = 0.5, g = 0.5, b = 0.5, a = 1, colorDisplayOption = 1)
cmds.connectAttr(lastDefomerOutput , tensMap + ".inGeometry")
cmds.connectAttr(shapeOriginal + ".worldMesh[0]", tensMap + ".restGeometry")
cmds.connectAttr(tensMap + ".outGeometry", shapeResult + ".inMesh", f = 1)
mrVertC = cmds.shadingNode("mentalrayVertexColors", asTexture = 1, n = "mrVertCol")
cmds.connectAttr(shapeResult + ".colorSet[0].colorName", mrVertC + ".cpvSets[0]", force = 1)
tensionShader = cmds.shadingNode("lambert", asShader = 1, n = "tensionMat")
cmds.connectAttr(mrVertC + ".outColor", tensionShader + ".color")
I hope it works fine for you.
Subscribe to:
Posts (Atom)