Posts Tagged ‘Nuke’

VFX Breakdown: WW1 Battle Field

Posted on: No Comments

We had two live action elements for this shot, a dirt explosion and some dark billowing smoke. Some burnt trees were also photographed.

The rest was cobbled together from stills projected through a camera onto a ground plane and cards.

The ground plane has some procedural displacement to match the hills and valleys in the comp.

The camera shake is animated using TCL random expressions whose amplitude is an animated Nuke nob.

VFX Breakdown: Avalanche

Posted on: No Comments

One of the major shots for the season, we had one artist on the avalanche R&D for a month. Another artist worked on some smaller particle and fluid interactions.

Another artist was on the plane animation and mountain ground plane modelling.

I comped all these passes together for the most part using luminosity values of the avalanche to mask the plane.

I also had to re-project the matte painting of the plane’s skid marks through the 3D animated camera to integrate it with the background plate.

VFX Breakdown: Ice Shacks

Posted on: No Comments

This shot required the addition of a few ice shacks into the plate.

From stills taken by the supervisor, I made 4 unique shacks – one for the foreground and 3 for the background. The shacks are graded to match the plate, adding in light leaks and highlights.

To tie everything in, I added some haze using fBm noise. I created the falling snow using particles applying the alpha channel to a gradient so that the flakes are light over the dark sky and dark over the light snow.

Add camera shake and done.

mrender: sendToAvconv 2014 update

Posted on: 1 Comment

It’s time for a new version of the sendToAvconv that takes into account the -start_number flag and xterm (two options that came out of comments from the last update from 2012).

Now called mrender, I add this to the afterRender callback in Nuke write nodes to send a subprocess call to avconv (or ffmpeg) and render a Quicktime. This is primarily meant for linux distros which don’t have great gui options for converting image sequences into movies.

Changelog

This update no longer requires image sequences output from Nuke to start at frame 0, or 1.

You can set xterm to show the output under the configuration options (request).

And if you have ffmpeg installed instead, you can set that to default

 

Animate camera through Photoshop layers in Nuke

Posted on: No Comments

You can use camera-linked lens-in-focal, lens-in-aperture and z fields in a Card node in Nuke to easily line up and correctly scale layers from a 2D image. These fields are normally used to create a pan & tile dome.

Typically, this kind of motion graphic would be accomplished in Adobe After Effects, but after the switch to node based compositing, I find the layer based approach of AE less intuitive.

3D View

The camera’s horiz aperture and focal length constrain the layer’s dimensions.

Here are the Steps

  1. Get 2D elements
    1. In this case I’m using artwork by Nigel Quarless
    2. Export layers as tiff with transparency (if you are using a simple 8bit Photoshop file, Nuke can handle the file directly).
    3. Drag into Nuke DAG
    4. Order them from left to right, front to back
  2. 3d Setup
    1. Add a camera
      • The (horiz aperture / vert aperture) should equal your project settings’ full size format (w/h) ratio. I’m working in HD (1920/1080), my horiz aperture is 24, so my vert
        aperture
        = 24 * (1080/1920) = 13.5.
      • You can leave the focal length at the default 50 for now
    2. Add a Card node (Card1) to the first FG layer
      • lens-in-focal = parent.Camera1.focal (ctrl drag the focal value from camera1)
      • lens-in-aperture = parent.Camera1.haperture (tcrl drag the horiz aperture value from camera1)
      • z = 1
    3. Duplicate Card1 for each additional layer
      • z = (the previous Card’s z value) + .25
        For example Card2.z = parent.Card1.z+.25 and Card3.z = parent.Card2+.25
    4. Connect everything to a Scene node
  3. Animate Camera
    1. Duplicate Camera1 (Camera2)
    2. In the Viewer, lock to Camera2

      Viewer locked to Camera2

    3. Adjust the focal value of Camera1 so that you can see all the 2d layers.
      • in my case, I had to increase the focal value to 135.
    4. Animate the Camera2’s z value
      1. position playhead at the start of the animation
      2. set a key for z = -2.5 (this value will change based on how many layers you have)
      3. position playhead at the end of the animation
      4. set a key for z = 0
  4. Final steps
    1. Add some 3d motion blur if you want
    2. I wanted the last layer to fill the frame, so I added a transform geo node after the card (see the image below)
    3. reformat and write out.
dag

DAG setup

You can see the project for which this was completed on vimeo. Or see my previous post.

Send to FFmpeg from Nuke Update

Posted on: 6 Comments

Update: sendToAvconv has been depreciated in favourr of mrender

Ubuntu 12.04 has moved to avconv from ffmpeg and my previous python script to execute a shell script on Nuke’s afterRender callback needed to be updated appropriately.

Additional changes:

  • The function now takes an arg ‘dnxhd’ to output a movie using the avid codec instead of the default x264.
  • the renderSlug configuration option has been added
    • when false: the movie start frame = the nuke project start frame*
    • when true: the movie start frame = 0

* Note: You always have to render from frame 0 out of Nuke regardless of the project start frame (avconv image sequences always start at 0).

 

Execute FFmpeg Command in Nuke AfterRender Callback

Posted on: 3 Comments

Update: there’s some new code to use avconv insead

Freelancing from home, I don’t have a dedicated render manager. Running Ubuntu 11.10, FFmpeg is the most convenient solution for rendering Quicktime movies for review.

With the help of NathanR and ivanbusquets over at the Nuke forums, I’ve got a working AfterRender callback that spawns a shell subprocess to automate the creation of .mov files from an image sequence rendered out of Nuke.

The Code

Installation

  1. Add the above code to the ~/.nuke/menu.py.
  2. Add sendToFFmpeg() to the afterrender field in the python tab of your write node.

The .mov file should be created one directory up from rendered image sequence.

Note: FFmpeg assumes the image sequence starts at frame 0. At some point I’ll have to add an offset to adjust for those that don’t.

Nuke Python Script setProjectFrameRange

Posted on: No Comments

Often we receive plates with frame ranges that don’t begin at frame 1. The plates have 48 frame handles but we only need to deliver 8 frame handles. This script will set the selected Read node to start at frame 1 and set the correct handle ranges based on user input.

Saves a few seconds of math.

As an example, the project settings first frame for the settings in the image on the right would be 1 + 48 – 8 (41) and the last frame would 1 + [selected read node’s last frame ] – [selected read node’s first frame ] – 48 + 8.

Installation

  1. Add setProjectFrameRange.py to your ~/.nuke folder
  2. In ~/.nuke/menu.py, import setProjectFrameRange
  3. Add the command to a menu

Configuration

You can set the project handle default frame counts (48 and 8 in the image above) in the first portion of the class.

Download from Nukepedia.

 

 

 

Toggle switch on user defined frame in Nuke

Posted on: No Comments

In this tutorial, we demonstrate how to let the user specify a frame that toggles a switch. I know – pretty dope.

We use “manage user knobs”, and a small expression to accomplish this.

If your name is James, you know I made this for you.

The video is more easily viewed in fullscreen – click the button in the bottom right of the player controls.

Toggle switch loop in Nuke

Posted on: No Comments

This screencast demonstrates how to create a squarewave in The Foundry’s Nuke. You’d want to use this if you ever have to toggle a switch on and off repeatedly at set intervals, for example.

We basically loop some key frames in the curve editor. The looping technique can be adjusted for many other applications.

If your brother’s name in Nick, I made this just for him.

The video is more easily viewed in fullscreen – click the button in the bottom right of the player controls.