Posts

Showing posts from 2012

plus VS screen

Image
plus VS screen in (compositing) nuke
There is operation's called plus and screen in nuke's merge node ( mostly all node based compositing software have this). Most of the people think both off this operation’s are same or similar, obviously both result look similar most of the times.  But there is huge difference between these operation's.
1. Plus operation:

When you plus your two images b+a, Plus operation increases the value in black and white pixels evenly. Which means it plus the value of "B" image's black and white values by the value of "A" image.


2. Screen operation:

When you screen your two images b+a, Screen operation increases the value on black and mid-value pixels only and keep white pixels as-it's. Which means it increases the value of "B" image's black and mid-values values by the value of "A" image.

Tips:

Use plus while working with specular and fire kind off elements.

Use Screen with hazy and snow dust …

Nuke workFlow optimisation TIPS

Image
Nuke work flow optimisation tips:

Work flow optimisation is very important  and help-full while you render or preview the shot. When you working with bigger shots you should optimise your script for better working speed and rendering. Otherwise you always suffer lot with your machine....  God damn in slow ???!!!!!

Here i'm going to give you guys some off my own way off working style and work flow optimisation tips....  Hope this will help you guys.... at-least...

First thing first.
1. Avoid multiple read nodes.



2. Keep adding(over) your FG layers always on "A" input and keep connect BG to "B" input. Working like this way will help to keep track your "BoundingBox" size.

Have a habit to always set your bbox to "B" from "union" after adding every Merge. i personally use to do this when ever add "Merge" node
 ( in some case you need keep it union, like.... BG replace, match-moving )


If you forget to keep the "bbox"…

2D Volumetric rays in nuke

Image
2D Volumetric rays
Here i'm going to explain Creating 2D Volumetric rays in nuke.


As a compositor and 3D artist every one really love Volumetric rays. Creating Volumetric rays in 3D packages such as Maya, 3dMax and any other 3D software’s are quit expensive. Its took long time to render for producing nice Volumetric rays.

Creating 2D Volumetric rays doesn’t look nice like rendered in 3D packages. But we can save some valuable times by create this effect in 2D.

You can create nice Volumetric rays effect like above image in Nuke. I used "Godrays" "Noise" and "roto" nodes to produce above result.

Here we go............

Step-1. Import image into nuke.

Step-2. Draw a roto shape to the light. If you have matte (alpha) will use that
            instead off roto.


Step-3. Add "GodRays" node and connect it to "roto" node. Move the center point
            to the opposite  direction off rays direction. Here i placed the center
            po…

chromatic aberration

Image
chromatic aberration Most people doesn’t understand What is "chromatic aberration"and struggle to handle it on post production. Here is simple solution to understand and produce good result in post.
First is first..
What is chromatic aberration?
Chromatic Aberration, also known as “color fringing” or “purple fringing”, is a common optical problem that occurs when a lens is either unable to bring all wavelengths of color to the same focal plane, and/or when wavelengths of color are focused at different positions in the focal plane.
for more info: http://toothwalker.org/optics/chromatic.html
Look below image Right side. You can see the red color (fringing) bleeds on the object edges.Its because of chromatic aberration.

 How its happen?
Chromatic aberration is caused by lens dispersion, with different colors of light travelling at different speeds while passing through a lens. As a result, the image can look blurred or noticeable colored edges (red, green, blue, yellow…

Getting roto shapes name

Image
Getting roto shapes namegettingRotoNames.py script will print all the "Roto" shapes and "Layers" name in all the Roto nodes.  This script goes down 4 child layers deep and get all the shapes and layers. If want to go further you can add some more by editing this code. def gettingRotoNames():
    for rpNode in nuke.allNodes('Roto'):
        cKnob= rpNode['curves']
        root = cKnob.rootLayer
        print '\n' + root.name
        for e in cKnob.rootLayer:   
            print ' - ' + e.name
            if isinstance(e, nuke.rotopaint.Shape):
                pass
            else:
                for i in cKnob.toElement(e.name):
                    print '   - ' + i.name
                    if isinstance(i, nuke.rotopaint.Shape):
                        pass
                    else:
                        for o in cKnob.toElement(e.name + '/' + i.name):
                            print '     - ' + o.name
                 …

randomRotoColor

Image
randomRotoColor
Created a node with python button called "randomRotoColor". It applies random color values to the individual roto shapes on selected roto nodes in nuke. Nicolas Houle made this script for help me out. I made some manipulation on that script and make it work really handy. You can apply random overlay color value to each roto shapes.
Add this node into your node-graph. Select the roto nodes ( multiple or single ) and click the randomRotoColor button. Your roto shapes are changed their color values randomly from default white color.
Before:



After randomRotoColor applied:

I made it randomRotoColor gizmo. you can download it from below link.
https://skydrive.live.com/redir?resid=776F8351D9892B6A!268
else copy below code and run it from nuke's script editor:
def randomRotoColor(elem): for i in elem: if isinstance(i, nuke.rotopaint.Layer): randomRotoColor(i) elif isinstance(i, nuke.rotopaint.Shape): attrs = i.getAttributes() randR = nuke.expression('random()…

Import fbx camera

Image
importFbxCamera.py
Import fbx camera script will add a camera node and import the camera data from the fbx file based on selected "ReadGeo" node.
Usually we import our objects into nuke as a .fbx file. After importing the .fbx file will do the same thing for import the camera from the same file.  To do that go to toolbar-->3D-->Camera... check the "read from the file" and then import the .fbx file by clicking file browser.
To get reduce the above timing. I created this small "importFbxCamera" python script. 
Import your object files by "ReadGeo" node in nuke. Select the "ReadGeo" node and run this script.


It will automatically create a "camera" node and import the camera data from the .fbx file and create a backdrop with shot name.


If you have not selected any nodes this script will show a message...    "select ReadGeo node to import camera"



Result:

Your camera will imported into nuke with name.

Download: ht…

python scripts for daily work on nuke

Image
I'm updating regularly this post with "Tiny, Tiny " python scripts for daily uses in nuke.
1. For define roto nodes output.
Usually  we set the roto node output to "alpha" and premultiply to "rgb" for getting the premultiplied output. like below image:


rotoOut python script:
This script will do this work by a single mouse click are a short-cut key.

import nuke def rotoOut():     for s in nuke.selectedNodes():         s['output'].setValue('alpha')         s['premultiply'].setValue('rgb')
save this as rotoOut.py file into your custom python or gizmo DIR.
This script works only selected roto nodes. If you want to make it work with all roto nodes in inside nuke means, youe need to change the 3rd line like this...
import nuke def rotoOut():     for s in nuke.allNodes('Roto'):         s['output'].setValue('alpha')         s['premultiply'].setValue('rgb')
2. Shuffle the image based matt…

change Roto Views to left and right

Image
RotoViewsPanel.py
This little python script will help you lot when working with stereoscopic conversion. While Import roto nodes from silhouette, mocha and other software’s, Imported roto nodes are output the channels only on "Left" view.

Like below image.

 We have to change the roto shapes view on both "left & right" for stereo conversion. To do that, manually select all rotoshapes and set the view on "left - right". This may take lot of time to do this on bigger shots. So how to reduce this manual work. Here is the solution for that.

RotoViewsPanel.py.
This script will pop-up a window for setting the selected or all roto nodes views to left are right only are Both. Run this script on nukes script editor and enjoy.


result:
Hope this script will help you friends.


RotoViewsPanel script:

class RotoViewsPanel(nukescripts.PythonPanel):
    def __init__(self):
        import nuke.rotopaint
        super(RotoViewsPanel,self).__init__('Change views on …

projecting multiple camera's in a single object

Image
merging multiple camera projectionsWhile working with some clean-plate  or clean-up work. Usually we create multiple peace off patches and project those peaces onto the "cards" ( usually ), sometime on some geometry. like below image: Here i projected on 3 cards for getting this result.
I red on fxguide forum, some one asked like this, is there any way to merge multiple camera projection?

http://www.fxguide.com/forums/showthread.php?11757-merging-multiple-camera-projections Here is the example image which is he attached. Its look really complicated when its grow with some other patches.
Here is solution for this. "MergeMat" will do the magic. Add a mergemat node and merge the two projection node output.Add a card node and connect it with mergemat node. Here is other example. I projected 3 images on a cube by left, right and front side with 3 different cameras. Using "MergeMat" node. Here is the example files: https://skydrive.live.com/redir?resid=776F8351D9892B6A…