Tweets
Squarespace
Powered by Squarespace
« Close-Up on The Day of the Triffids: London Aftermath | Main | Close-Up on Legion: Gabriel's Wings »
Sunday
Mar282010

VFX Quick Tip: Sharp Clone Strokes

A common mistake especially among junior artists is misunderstanding sub-pixel filtering.  While most experienced artists understand the importance of choosing an appropriate filtering algorithm when scaling an image, it is often overlooked with simple transformations.  My personal favorite and perhaps the most often overlooked of all is the transformation that takes place behind the scenes when performing cloning operations.  I can often be heard around the studio saying, "No mushy paint strokes!" to artists at all levels of experience.  Here are a couple quick and simple tips for preserving sharpness and detail when transforming images in both Nuke and Fusion.

In any software, when you translate an image by sub-pixel values the software must interpolate the new position by sampling surrounding pixels.Reference size  While some algorithms do a better job of maintaining sharpness than others, the best way is to avoid re-sampling all together.  In other words, move the image by a whole number of pixels.  If a transform is animated then the only recourse is to choose an appropriate filtering algorithm.  But if your simply moving an image from one place to another there is no better way to ensure a lossless transformation.  In Nuke this is as easy as using the Position node rather than the Transform node.  The Position node by definition, "Moves the input by an integer number of pixels."  In Fusion it's a little less obvious.  At the bottom of any transform tool you'll see a toggle labelled "Reference size."  Clicking this reveals width and height sliders, and a "Use Frame Format Settings" check box.  Assuming you've set your frame format preferences according to the resolution of your footage you can simply check this option.  This gives you positional values based on the width and height of your image, rather than values normalized between zero and one.  Now it should be easy to translate by whole pixels by simply avoiding decimals.

"Snap Offset" in FusionSo what does any of this mean for clone painting?  If you think about it, a clone stroke is simply a transform masked by the extent of the brush stroke.  So the same rules apply here.  Fortunately both Fusion and Nuke provide an easy solution.  In Fusion it's called "Snap Offset" and it does exactly what you would expect.  It snaps the clone source offset to the nearest whole pixel.  In Nuke it's called "round" and the tool tip says it all.  It will, "Round translation amount to the nearest whole integer pixel to avoid softening due to filtering."  "Round" in NukeThese techniques are especially important when working with material which originated on film or with any media where preserving the grain structure is critical to achieving seamless results.  A rig or wire removal which might otherwise be invisible will boil noticeably if the grain detail is softened.  To see the effect for yourself, be sure to view your work at full resolution.  Proxy scaling or viewer re-sizing will make it difficult to see the difference as it introduces another layer of image re-sampling.

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments (5)

Thanks Eric

Excellent tip i often find myself wondering what the cause of the soften effect was and now that i understand it i can avoid it

i was wondering if the same applies to a mask if i have a mask that is on sub pixel values
will rounding produce a better mask ?

April 5, 2010 | Unregistered CommenterBoris

Thanks Boris!

If you're translating a mask downstream of the source the same rules apply. Depending on the nature of the mask, the softening may be very subtle.

Eric

April 5, 2010 | Registered CommenterEric Doiron

my question was more aimed towards roto i mean is this something i need to be aware of all the time to produce acceptable film quality roto shapes


p.s Thanks for taking the time to answer :}

April 8, 2010 | Unregistered CommenterBoris

Boris,

Roto shapes are vector-based so no need to worry about filtering.

Cheers,

Eric

April 8, 2010 | Registered CommenterEric Doiron

Thanks :D

that makes more sense now.

April 8, 2010 | Unregistered CommenterBoris

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>