Camera And 3D
Use 3D only when the composition needs it, then be explicit about camera state. This page covers ThreeDScene, camera setup, camera motion, and viewport-fixed overlays.
When To Use 3D
Use plain Scene for flat compositions and explanatory layouts. Use ThreeDScene when orientation, depth, or camera motion should affect the result.
Camera Basics
set_camera_orientation() establishes the initial 3D view immediately. move_camera()animates from the current camera state.
class SimpleCubeScene(ThreeDScene): def construct(self): self.set_camera_orientation( phi=70 * DEGREES, theta=-40 * DEGREES, distance=8 ) cube = Cube() self.play(Create(cube)) self.move_camera(phi=60 * DEGREES, theta=-15 * DEGREES, distance=7.4, run_time=1.8) Fixed Overlays
Use fixed-in-frame overlays for titles, HUD-like labels, and explanatory annotations that should stay attached to the viewport while the 3D world moves.
Scene Types
Scenefor flat timelines and 2D compositions.ThreeDScenefor camera-aware 3D work.VoiceoverThreeDScenewhen narration and 3D camera motion need to share one timeline.