Multiplane_Camera

From Synfig Studio :: Documentation
Jump to: navigation, search
m (Connecting it all.: Update term' (zoom layer -> scale layer) + Unify exported names + literal)
(Connecting it all.)
 
(4 intermediate revisions by one other user not shown)
Line 5: Line 5:
 
{{NewTerminology}}
 
{{NewTerminology}}
 
<!-- Page info end -->
 
<!-- Page info end -->
Somes of the screenshots needs to be updated with 0.64.0
 
  
 
== Introduction ==
 
== Introduction ==
 
  
 
The term multiplane is from when real cameras were used to photograph animation.
 
The term multiplane is from when real cameras were used to photograph animation.
Line 36: Line 34:
 
== Basic layer setup ==
 
== Basic layer setup ==
  
[[File:Multiplane_basic_setup.png]]
+
[[File:MultiplaneCamera 01 BasicSetup 0.63.06.png|frame|none]]
 
+
*First create a circle. Group this circle and name it CONTENT. You place all content of the plane in this group, this is what the circle represent.
+
*Group again the CONTENT-group and rename it to "PLANE_01". This is the first glass plate. We will later duplicate and alter this to add more plates.
+
*Group the plate and rename it to MAIN. This will be the simulated camera.
+
*Now, in the plate layer create three new layers, blur, translate and zoom.
+
  
 +
*First create a {{l|Circle Layer}}. {{l|Group}} this circle and name it "Content". You place all content of the plane in this group, this is what the circle represent.
 +
*Group again the "Content" group and rename it to "Plane_01". This is the first glass plate. We will later duplicate and alter this to add more plates.
 +
*Group the plate and rename it to "Main". This will be the simulated camera.
 +
*Now, in the plate layer create three new layers, {{l|Blur Layer}}, {{l|Translate Layer}} and {{l|Scale Layer}}.
  
 
== Connecting it all. ==
 
== Connecting it all. ==
  
*First export the {{Literal|Z Depth}} from Main. Name it Main_Z.
+
*First {{l|Export}} the {{Literal|Z Depth}} from Main. Name it Main_Z.
 
*Also export the {{Literal|Origin}} from Main as Main_Origin.
 
*Also export the {{Literal|Origin}} from Main as Main_Origin.
 
*Next we'll need an inverted version of this value to use in our calculations.
 
*Next we'll need an inverted version of this value to use in our calculations.
**For that create a temporary layer, say a circle.
+
**For that create a temporary layer, say a circle, in any place of the layer stack.
***Choose a real value and convert it to a Scale value.
+
***Choose a real value (for example the radius) and convert it to a Scale value.
***Connect the Main_Z value to {{Literal|Link}} and set {{Literal|Scalar}} to '''-1'''.
+
***Connect the Main_Z value to {{Literal|Link}} from the scale converted and set {{Literal|Scalar}} subparameter to '''-1'''.
**Select the value and export as Main_Z_Inverted. Delete the temporary circle layer.
+
**Select the real value (i.e. the radius) and export as Main_Z_Inverted. Delete the temporary circle layer.
 
*We'll also want the Plane_01 {{Literal|Z Depth}} so export that as Plane_01_Z.
 
*We'll also want the Plane_01 {{Literal|Z Depth}} so export that as Plane_01_Z.
  
Line 61: Line 58:
 
Select the Scale layer of the plane.
 
Select the Scale layer of the plane.
  
[[File:Multiplane_zoom-setup.png‎]]
+
[[File:MultiplaneCamera 02 ScaleSetup 0.63.06.png|frame|none]]
  
 
*Convert {{Literal|Amount}} to {{Literal|Add}}
 
*Convert {{Literal|Amount}} to {{Literal|Add}}
Line 75: Line 72:
 
We use a separate Translate layer rather than the Plane {{Literal|Origin}} so that we can still move the plane undependable from the camera move.
 
We use a separate Translate layer rather than the Plane {{Literal|Origin}} so that we can still move the plane undependable from the camera move.
  
[[File:Multiplane_translate-setup.png]]
+
[[File:MultiplaneCamera 03 TranslateSetup 0.63.06.png|frame|none]]
  
 
*Convert {{Literal|Origin}} to {{Literal|Scale}}.
 
*Convert {{Literal|Origin}} to {{Literal|Scale}}.
Line 97: Line 94:
 
*Delete the temporary blur layer.
 
*Delete the temporary blur layer.
  
[[File:Multiplane_blur-setup1.png‎]]
+
[[File:MultiplaneCamera 04 BlurSetup1 0.63.06.png|frame|none]]
  
 
*In the Blur Layer, Convert {{Literal|Size}} to {{Literal|Scale}}.
 
*In the Blur Layer, Convert {{Literal|Size}} to {{Literal|Scale}}.
Line 112: Line 109:
 
******Connect {{Literal|LHS}} to Near-Focus, {{Literal|RHS}} to Plane_01_CamDistance
 
******Connect {{Literal|LHS}} to Near-Focus, {{Literal|RHS}} to Plane_01_CamDistance
  
[[File:Multiplane_blur-setup2.png‎]]
+
[[File:MultiplaneCamera 05 BlurSetup2 0.63.06.png|frame|none]]
  
 
***Convert {{Literal|Link On}} to {{Literal|Switch}},
 
***Convert {{Literal|Link On}} to {{Literal|Switch}},
Line 125: Line 122:
 
*******Connect {{Literal|LHS}} to Plane_01_CamDistance, {{Literal|RHS}} to Far_Focus
 
*******Connect {{Literal|LHS}} to Plane_01_CamDistance, {{Literal|RHS}} to Far_Focus
  
[[File:Multiplane_blur-setup3.png‎]]
+
[[File:MultiplaneCamera 06 BlurSetup3 0.63.06.png|frame|none]]
  
 
== Adding more planes ==
 
== Adding more planes ==
  
*Duplicate PLANE_01 and rename it to PLANE_02.
+
*Duplicate Plane_01 and rename it to Plane_02.
*Select the layer Z Depth and disconnect it. Then export it as PLANE_02_Z.
+
*Select the layer {{Literal|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 up the Scale layer {{Literal|Amount}} and connect {{Literal|LHS}} to Plane_02_Z.
*Open Translate layer calculation and connect the two occurrences of LHS to PLANE_02_Z
+
*Open Translate layer calculation and connect the two occurrences of {{Literal|LHS}} to Plane_02_Z
 
*Create a temporary layer and convert real value to subtract.
 
*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.
+
**Connect {{Literal|LHS}} to Plane_02_Z and {{Literal|RHS}} to Main_Z. Export this as Plane_02_CamDistance. Delete temporary layer.
*Open Blur layer and change the 4 PL1_cam-distance references to PL2_cam-distance.
+
*Open Blur layer and change the 4 Plane_01_CamDistance references to Plane_02_CamDistance.
  
 
Duplicate the plane as many times as you'd like and go through these steps again.
 
Duplicate the plane as many times as you'd like and go through these steps again.
 
 
  
 
== Usage: ==
 
== Usage: ==

Latest revision as of 23:59, 13 September 2014

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

MultiplaneCamera 01 BasicSetup 0.63.06.png
  • First create a Circle Layer. Group this circle and name it "Content". You place all content of the plane in this group, this is what the circle represent.
  • Group again the "Content" group and rename it to "Plane_01". This is the first glass plate. We will later duplicate and alter this to add more plates.
  • Group the plate and rename it to "Main". This will be the simulated camera.
  • Now, in the plate layer create three new layers, Blur Layer, Translate Layer and Scale Layer.

Connecting it all.

  • First Export the "Z Depth" 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, in any place of the layer stack.
      • Choose a real value (for example the radius) and convert it to a Scale value.
      • Connect the Main_Z value to "Link" from the scale converted and set "Scalar" subparameter to -1.
    • Select the real value (i.e. the radius) and export as Main_Z_Inverted. Delete the temporary circle layer.
  • We'll also want the Plane_01 "Z Depth" 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.


SCALE-LAYER Select the Scale layer of the plane.

MultiplaneCamera 02 ScaleSetup 0.63.06.png
  • Convert "Amount" to "Add"
  • Connect "LHS" to Plane_01_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 Depth" value. 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.

MultiplaneCamera 03 TranslateSetup 0.63.06.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 Plane_01_Z and convert "RHS" to "Reciprocal".
          • Next convert the "RHS" "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 Plane_01_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

  • Select the Blur layer and select 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 Amount to Add, you've got three 'new' real values)
    • Convert a real value to subtract and set "LHS" to Plane_01_Z and "RHS" to Main_Z. Export this as Plane_01_CamDistance. This calculation and export needs to be done separately for every new layer that is added.
  • Delete the temporary blur layer.
MultiplaneCamera 04 BlurSetup1 0.63.06.png
  • In the Blur Layer, Convert "Size" to "Scale".
    • Connect "Link" to Initial_Blur.
    • Convert "Scalar" to "Switch".
      • Convert "Switch" to "Compare"
        • Connect "LHS" to Plane_01_CamDistance and "RHS" to Near_Focus, and check "Greater".
      • Convert "Link Off" to "Scale",
        • Set "Scalar" to 100
        • Convert "Link" to "Scale"
          • Connect "Link" to Falloff
          • Convert "Scalar" to "Subtract"
            • Connect "LHS" to Near-Focus, "RHS" to Plane_01_CamDistance
MultiplaneCamera 05 BlurSetup2 0.63.06.png
      • Convert "Link On" to "Switch",
        • Convert "Switch" to "Compare"
          • Connect "LHS" to Plane_01_CamDistance and "RHS" to Far_Focus, check "Less"
        • Set "Link On" to 0.0
        • Convert "Link Off" to "Scale",
          • Set "Scalar" to 100
          • Convert "Link" to "Scale"
            • Connect "Link" to Falloff
            • Convert "Scalar" to "Subtract"
              • Connect "LHS" to Plane_01_CamDistance, "RHS" to Far_Focus
MultiplaneCamera 06 BlurSetup3 0.63.06.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 Scale 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 Plane_02_CamDistance. Delete temporary layer.
  • Open Blur layer and change the 4 Plane_01_CamDistance references to Plane_02_CamDistance.

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 • русский