Multiplane_Camera

From Synfig Studio :: Documentation
Revision as of 18:52, 27 August 2010 by Rylleman (Talk | contribs) (Multiplane Camera technique tutorial)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Languages Language: 

English • русский



Introduction

The term multiplane is from when real cameras were used to photograph animation.

http://en.wikipedia.org/wiki/Multiplane


It's a technique where you place different parts of the animation scene on glass plates at different height below the camera. When the camera (or the layers) are moved you get pans and tracks with depth and space. (3D)


The technique I'm demonstrating here uses layer Z Depth-values to position the layers in space. Higher values goes into space, lower out. For the plates 0 puts them really close to the camera while 1 will put them away from the camera. Furthest limit is around 1.7 where the layers are too far away to move at all. The camera starts at 0 and goes into the scene, closer to the plates at positive values and away from the scene at negative values. 1 gets really close while -3 is far away from the plates.

Synfig basic-setup and example files:

Multiplane_basic-setup.sifz‎

Multiplane_landscape_example_2.sifz‎


Multiplane 01 gif-anim.gif

All circles are of the same size and all is centered in the canvas, not moving at all. The movement and depth is accomplished by moving the main or "camera" layer.


Basic layer setup

Multiplane basic setup.png

  • First create a circle. Encapsule this circle and name it CONTENT. You place all content of the plane in this encapsule, this is what the circle represent.
  • Encapsulate the CONTENT-encapsule and rename encapsule to "PLANE_01". This is the first glass plate. We will later duplicate and alter this to add more plates.
  • Encapsulate the plate and rename new encapsule to MAIN. This will be the simulated camera.
  • Now, in the plate layer create three new layers, blur, translate and zoom.


Connecting it all.

  • First export the Z-value from MAIN. Name it MAIN_Z.
  • Also export the origin from MAIN as MAIN_origin.
  • Next we'll need an inverted version of this value to use in our calculations.
    • For that create a temporary layer, say a circle.
      • Choose a real value and convert it to a scale value.
      • Connect the MAIN_Z-value to Link and set scalar to -1.
    • Select the value and export as MAIN_Z_INVERTED. Delete the temporary circle layer.
  • We'll also want the PLANE_01 Z-value so export that as PLANE_01_Z

Now we'll want the planes to scale based on it's distance from the camera. We'll use Z-depth to decide where the layer is in space.


ZOOM-LAYER Select the zoom layer of the plane.

Multiplane zoom-setup.png

  • Convert Amount to Add
  • Connect LHS to PLANE01_Z
  • Connect RHS to MAIN_Z_INVERTED
  • Set scalar to -1.

Now the plane will zoom based on it's distance from the camera which is decided by the sum of plane and camera Z-values. We reverse the number by scalar so it scales in the right direction.


TRANSLATE-LAYER

We use a separate Translate layer rather than the PLANE origin so that we can still move the plane undependable from the camera move.

Multiplane translate-setup.png

  • Convert Origin to Scale.
    • Connect Link to MAIN_origin. This is what we'll base the movement of the planes on.
    • Convert Scalar to range and set min to -1 to to avoid the layer to start moving the wrong direction when tracking out from the scene. Set max to 999999 since we really don't need an upper limit.
      • Convert Link to Subtract and set Scalar in this new calculation to -1.
        • In Link connect LHS to plane1_Z and convert RHS to reciprocal.
          • Next convert link to Range and set Min to 0 and Max to 999999 to avoid some strange movement when layers move too far off the canvas.
          • Convert the Link to Add and connect LHS to plane1_Z and RHS to MAIN_Z_inverted.

This whole calculation moves the layer more when it's closer to us and less when it's further away, thus creating illusion of depth.


BLUR

  • Add a blur layer and convert it's blend method to straight. (Due to a bug, convert blend method to scale and set link subparameter to 1)
  • Create a temporary blur layer for exporting values.
    • Export size as initial-blur and set value to 1.00x1.00
    • Export different real-values as falloff, near-focus and far-focus
    • Convert a real value to subtract and set LHS to plane1_Z and RHS to main_Z. Export this as PL1_CAM-distance. This calculation and export needs to be done separately for every new layer that is added.
  • Delete the temporary blur layer.

Multiplane blur-setup1.png

  • Convert Size to scale.
    • Connect link to initial-blur.
    • Convert scalar to switch.
      • Convert switch to compare
        • Connect LHS to PL1_cam-distance and RHS to near-focus, tick "greater than".
      • Convert Link off to scale,
        • Set scalar to 100
        • Convert link to scale
          • Connect link to falloff
          • Convert scalar to subtract
            • LHS=near-focus, RHS=PL1_cam-distance

Multiplane blur-setup2.png

      • Convert Link_on to switch,
        • Convert switch to compare
          • Connect LHS to PL1_cam-distance and RHS to far-focus, tick "less than"
        • Set Link on to 0.0
        • Convert Link off to scalar,
          • Set scalar to 100
          • Convert link to scale
            • Connect link to falloff
            • Convert scalar to subtract
              • LHS=PL1_cam-distance, RHS=far-focus

Multiplane blur-setup3.png


Adding more planes

  • Duplicate PLANE_01 and rename it to PLANE_02.
  • Select the layer Z Depth and disconnect it. Then export it as PLANE_02_Z.
  • Open up the Zoom layer amount and connect LHS to PLANE_02_Z.
  • Open Translate layer calculation and connect the two occurrences of LHS to PLANE_02_Z
  • Create a temporary layer and convert real value to subtract.
    • Connect LHS to PLANE_02_Z and RHS to MAIN_Z. Export this as PL2_cam-distance. Delete temporary layer.
  • Open Blur layer and change the 4 PL1_cam-distance references to PL2_cam-distance.

Duplicate the plane as many times as you'd like and go through these steps again.


Usage:

MAIN

  • Move to simulate camera movement.
  • Use Z-depth to track in/out with camera.

PLANES

are moved, scaled and blurred in relation to the camera (MAIN layer) to simulate 3D plane space.

Translate layer - This is used to move the layers in relation to the camera layer. Once setup you should not manually change anything here.

Zoom layer - This is used to scale the layers to simulate distance from the camera. Should not be altered after setup.

Blur layer - This layer blurs the layers in relation to their distance from the camera. It simulates depth of field from different types of lenses.

Here you can alter a few values:

Near-focus and Far-focus. Objects within this range from the camera (MAIN_Z - plane_Z) is in focus. • falloff - This value sets how fast objects gets blurry when outside the focus range. With a higher value the objects quickly gets blurry when leaving the range and with a lower objects needs to be far away from the range before getting blurry.

Multiplane landscape example2.gif


Languages Language: 

English • русский