Multiplane_Camera

From Synfig Studio :: Documentation
Jump to: navigation, search
m (Text replace - "{{Category|NewTerminology}}" to "{{NewTerminology}}")
(Connecting it all.)
 
(5 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 Z-value from MAIN. Name it MAIN_Z.
+
*First {{l|Export}} the {{Literal|Z Depth}} from Main. Name it Main_Z.
*Also export the 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 Link and set 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 Z-value so export that as PLANE_01_Z
+
*We'll also want the Plane_01 {{Literal|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.
+
Now we'll want the planes to scale based on it's distance from the camera. We'll use {{Literal|Z Depth}} to decide where the layer is in space.
  
  
'''ZOOM-LAYER'''
+
'''SCALE-LAYER'''
Select the zoom 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 Amount to Add
+
*Convert {{Literal|Amount}} to {{Literal|Add}}
*Connect  LHS to PLANE01_Z
+
*Connect  {{Literal|LHS}} to Plane_01_Z
*Connect RHS to MAIN_Z_INVERTED
+
*Connect {{Literal|RHS}} to Main_Z_Inverted
*Set scalar to -1.
+
*Set {{Literal|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.
+
Now the plane will zoom based on it's distance from the camera which is decided by the sum of plane and camera {{Literal|Z Depth}} value. We reverse the number by scalar so it scales in the right direction.
  
  
 
'''TRANSLATE-LAYER'''
 
'''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.
+
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 Origin to Scale.
+
*Convert {{Literal|Origin}} to {{Literal|Scale}}.
**Connect Link to MAIN_origin. This is what we'll base the movement of the planes on.
+
**Connect {{Literal|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 {{Literal|Scalar}} to {{Literal|Range}} and set {{Literal|Min}} to '''-1''' to to avoid the layer to start moving the wrong direction when tracking out from the scene. Set {{Literal|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.
+
***Convert {{Literal|Link}} to {{Literal|Subtract}} and set {{Literal|Scalar}} in this new calculation to '''-1'''.
****In Link connect LHS to plane1_Z and convert RHS to reciprocal.
+
****In {{Literal|Link}} connect {{Literal|LHS}} to Plane_01_Z and convert {{Literal|RHS}} to {{Literal|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.
+
*****Next convert the {{Literal|RHS}} {{Literal|Link}} to {{Literal|Range}} and set {{Literal|Min}} to '''0''' and {{Literal|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.
+
*****Convert the {{Literal|Link}} to {{Literal|Add}} and connect {{Literal|LHS}} to Plane_01_Z and {{Literal|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.
 
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.
Line 90: Line 87:
 
'''BLUR'''
 
'''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)
+
*Select the Blur layer and select it's {{Literal|Blend Method}} to {{Literal|Straight}}. (Due to a bug, convert blend method to scale and set link subparameter to 1)
 
*Create a temporary blur layer for exporting values.
 
*Create a temporary blur layer for exporting values.
**Export size as initial-blur and set value to 1.00x1.00
+
**Export {{Literal|Size}} as Initial-Blur and set value to '''1.00x1.00'''
**Export different real-values as falloff, near-focus and far-focus
+
**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 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.
+
**Convert a real value to subtract and set {{Literal|LHS}} to Plane_01_Z and {{Literal|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.
 
*Delete the temporary blur layer.
  
[[File:Multiplane_blur-setup1.png‎]]
+
[[File:MultiplaneCamera 04 BlurSetup1 0.63.06.png|frame|none]]
  
*Convert Size to scale.
+
*In the Blur Layer, Convert {{Literal|Size}} to {{Literal|Scale}}.
**Connect link to ''initial-blur''.
+
**Connect {{Literal|Link}} to Initial_Blur.
**Convert ''scalar'' to ''switch''.
+
**Convert {{Literal|Scalar}} to {{Literal|Switch}}.
***Convert ''switch'' to ''compare''
+
***Convert {{Literal|Switch}} to {{Literal|Compare}}
****Connect ''LHS'' to ''PL1_cam-distance'' and ''RHS'' to ''near-focus'', tick "greater than".
+
****Connect {{Literal|LHS}} to Plane_01_CamDistance and {{Literal|RHS}} to Near_Focus, and check {{Literal|Greater}}.
  
***Convert Link off to scale,  
+
***Convert {{Literal|Link Off}} to {{Literal|Scale}},  
****Set scalar to 100
+
****Set {{Literal|Scalar}} to '''100'''
****Convert link to scale
+
****Convert {{Literal|Link}} to {{Literal|Scale}}
*****Connect link to falloff
+
*****Connect {{Literal|Link}} to Falloff
*****Convert scalar to subtract
+
*****Convert {{Literal|Scalar}} to {{Literal|Subtract}}
******LHS=near-focus, RHS=PL1_cam-distance
+
******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 Link_on to switch,
+
***Convert {{Literal|Link On}} to {{Literal|Switch}},
****Convert switch to compare
+
****Convert {{Literal|Switch}} to {{Literal|Compare}}
*****Connect LHS to PL1_cam-distance and RHS to far-focus, tick "less than"
+
*****Connect {{Literal|LHS}} to Plane_01_CamDistance and {{Literal|RHS}} to Far_Focus, check {{Literal|Less}}
****Set Link on to 0.0
+
****Set {{Literal|Link On}} to '''0.0'''
****Convert Link off to scalar,  
+
****Convert {{Literal|Link Off}} to {{Literal|Scale}},  
*****Set scalar to 100
+
*****Set {{Literal|Scalar}} to '''100'''
*****Convert link to scale
+
*****Convert {{Literal|Link}} to {{Literal|Scale}}
******Connect link to falloff
+
******Connect {{Literal|Link}} to Falloff
******Convert scalar to subtract
+
******Convert {{Literal|Scalar}} to {{Literal|Subtract}}
*******LHS=PL1_cam-distance, RHS=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 • русский