Stacking 3D elements in a composition
3D Elements
A Composition can be composed of various 3D elements:
- 2D Layers that were switched to 3D
- Camera and Light Layers
- 3D Asset Layers which link to an Asset 3D in the Project Panel
- Sub-Composition only composed of 3D elements
Consecutive 3D elements in a Composition form a 3D Scene. The output image of those consecutive 3D elements is a render of the Scene through a camera. The chosen camera is the most top active Camera Layer in the Layer Stack.
This means that the visibility of consecutive 3D elements are now driven by their depth in the Scene and not by their position in the Layer Stack.
Note
A 3D Scene is automatically created for all consecutive 3D elements in the Layer Stack. If a 2D Layer is between 2 sets of 3D Layers, 2 Scenes are created and two 3D renders are made.
A Camera is also automatically created to render the 3D Scene if there is none in the Layer Stack. By default, this Camera is placed to exactly render a plane the size of the Composition.
To manipulate the position of the 3D elements in the 3D Scene, you can switch the Composition to 3D mode in the Viewer Panel, and use the Transform 3D Tool.
Warning
When switching the Composition to 3D Mode, all the 3D elements (consecutive or not) of the Composition will be merged in one unique Scene. However, this is only to help globally position all 3D elements, and is not a real representation of the Composition render in 2D Mode. An element who may seems in front in 3D Mode can still be hidden in the Composition render !
In the example below, a 2D Layer (Circle) is between 2 3D Asset Layer (Sphere3D and Cube3D). Even if the Sphere is behind the Cube in the 3D Mode, it still appears in front in the 2D Composition render.
This is due to Sphere3D and Cube3D not being consecutive 3D elements. The order of action in the Layer Stack is:
- Render of the Cube3D Scene (which only contains the cube) into an image
- Render of the Circle onto the previous image
- Render of the Sphere3D Scene (which only contains the sphere) onto the previous image