Tag Archives: Cubic

After Effects CS5 Studio Techniques mention “ft-Cubic Lens Distortion”

Mark Christiansen’s new After Effects CS5 Studio Techniques is out. Without doubt one of the best book for vfx with AE.
I’m very proud since some of the scripts and authors from AEScripts.com are mentioned including my “ft-Cubic Lens Distortion” plugin !

You can get this book on Amazon right now !

UPDATE – Cubic Lens Distortion Pixel Bender shader for AE (with scale & chromatic aberration

cubic lens distortion & chromatic aberration



If you haven’t seen my previous post yet, here is the Syntheyes’ Cubic Lens Distortion algorithm ported to Pixel Bender.


New Features

  1. Scale factor : works exactly as Syntheyes Scale Lens Workflow (v2)
  2. Chromatic Aberration : based on Martins Upitis‘s GLSL posted here (v2)
  3. Blue/Yellow Chromatic Aberration based on Dorian modification (V3)



Download

  1. Download ft-CubicDistortion.pbk here : http://aescripts.com/ft-cubic-lens-distortion/
  2. Place it in your “Support Files” folder (which is in your AE install folder)
  3. Launch AE
  4. Look for the effect called Cubic Distortion

Source Code

just download the file at http://aescripts.com/ft-cubic-lens-distortion and open it with your notepad application

Donate

still if you wish ^^




PixelBender Cubic Lens Distortion for After Effects


Introduction


If you are doing Matchmove, you probably bumped into Lens work-flow issue, where you have to un-distort the footage in your matchmove software, then track it, and export a new undistorted footage, so your client can compose the 3d rendering on top of it and then distort it back.
I don’t really like this work-flow, since for instance AfterFx do not have Cubic Lens Distortion FX and it would be really hard for the client trying to match the distortion back.

After watching Victor Wolansky’s FXPHD Class on SYN202 (syntheyes) about Lens work-flow, I thought : “hey why not porting the lens distortion algorithm ?”. Pretty easy to do, since I already did it for HLSL & Martins Upitis did port my shader to GLSL !
Thanks to SSonTech for sharing there alogrithm


Pixel Bender Cubic Lens Distortion :

Not much to say, it does what it suppose to do ! You can copy & paste values from Syntheyes and it will match perfectly (or it should at least). See the screenshot below.

  1. Download CubicDistortion.pbk here : http://aescripts.com/ft-cubic-lens-distortion/
  2. Place it in your “Support Files” folder (which is in your AE install folder)
  3. Launch AE
  4. Look for the effect called Cubic Distortion

UPDATE : now with scale factor & chromatic aberration, see the post here

Thanks to Jerzy Drozda Jr (aka Maltaannon) for his great tips about Pixel Bender.

So now, you can create a new comp with your distorted footage > pre-comp it > undistorted it with the shader > track it in syntheyes > export the camera to a 3d package > render the scene > import the render into your pre-comp > desactivate the shader. Should match perfectly :)



Screenshots

(yeah I know, PFTrack grid with Syntheyes … not cool ! :p )

Distorted Grid

Syntheyes Cubic Undistortion

AE with Cubic Lens Distortion shader

compare AE & Syntheyes Lens distortion


Donation

If you wish




Cubic Lens Distortion Shader

Introduction

Cubic Lens Distortion (or undistortion as well) is well known in compositing or any VFX package. Basic Lens Distortion would usually solve the distord plate a the center, but closer you would get to the border of the picture, more the distortion will still there. The Cubic parameter let you control that.
It could also be used to give a “Chromatic Aberration” effect

This shader is based on the Algorithm shared by ssonTech website. This algorithm is used in SynthEyes (matchmove software) and is pretty simple.


Examples

k = -1.0 ; kcube = 0.0

k = -1.0 ; kcube = 0.0

k = -1.0 ; kcube = 0.5

k = -1.0 ; kcube = 0.5

Chromatic Aberration example : k = -0.15 ; kcube = 0.15  ||  using red distord channel with green and blue undistord channel

Chromatic Aberration example : k = -0.15 ; kcube = 0.15 || using red distord channel with green and blue undistord channel



Shader (Media Player ClassicHLSL)


code on Pasteall.org

Reblog this post [with Zemanta]