From TouchDesigner Documentation
Jump to: navigation, search


The camera component can be used to interactively control a camera's position in a 3D scene. The actual functional parts are provided packaged in a complete render setup to better illustrate its usage. You can copy the Camera COMP cam1 out of this component and use it in your own render scene or use this as a default interactive render setup. The actual Camera COMP uses all of the parameters defined here, as well as additional options to remap the camera movements to different mouse buttons and keyboard modifiers.

The camera's extension Methods can be used to save and recall camera positions, get the current pivot position, align the camera to specific axis, and more. The extension class can also be used to implement additional navigation modes.

By default, camera movements are controlled by dragging the mouse while holding the left, right or middle buttons or by scrolling with the mouse wheel. The component also supports the following keyboard shortcuts:

  • 'h'/'n' - Home/Front - Frame the scene and align the camera to face the negative z axis.
  • 'f' - Frame - Frame the scene while maintaining the current camera angle.
  • 't' - Top - Frame the scene from the top looking down the negative y axis.
  • 'r' - Right - Frame the scene from the right looking along the negative x axis.
  • 'l' - Left - Frame the scene from the left looking along the positive x axis.

When placing the camera in your own scene, make sure that the referenced Panel Component has its Mouse UV Buttons parameters for Left, Middle and Right mouse button enabled as well as the Use Mouse Wheel parameter.

PythonIcon.pngPalette:camera Ext

Parameters - camera Page

Help Help - Open this help page.

Version Version - The version number of the component.

Camera OBJ Cameraobj - A read-only reference to the internal Camera COMP where all of the camera logic is performed.

Panel COMP Panelcomp - The Panel Component that is used to control the interaction. The panel receives the mouse and keyboard interactions and displays the rendered scene.

Render TOP Rendertop - A reference to the Render TOP that is rendering the 3D scene. This is used to determine the bounds of the geometry for framing and homing, and to determine what geometry can be clicked on for pivoting. Only geometry that is included in the Render TOP's Geometry parameter is included in the camera calculations. The Render TOP doesn't technically have to be the same one used for displaying the image in the panel.

Navigation Mode Navigationmode - - The navigation mode determines how mouse movements inside the Panel Component affect the camera's position and orientation. They are based off the navigation modes available through the 3D viewer's right-click menu.

  • Cursor cursor - In this mode, left-clicking the mouse will pivot around the geometry under the cursor (or the center of the viewport if there is no geometry). The right mouse button will truck/pedestal the camera and the middle mouse button and mouse wheel will dolly (zoom) the camera towards or away from the cursor position.
  • Object object - In Object mode, the camera will always pivot around the center of the geometry when dragging with the left mouse button. Dragging with the right mouse button will truck/pedestal the camera and the middle mouse button and mouse wheel will dolly (zoom) the camera towards or away from the cursor position.
  • Camera camera - This mode uses a first-person style camera where dragging with the left mouse button will turn the camera left, right, up or down. Dragging the right mouse button will truck/pedestal the camera, while dragging the middle mouse button will dolly the camera forward or pan left and right. The mouse wheel will dolly (zoom) the camera towards or away from the cursor position.

Auto Rotate Autorotate - Turning on this feature will give the camera rotation some inertia so that it continues to rotate after the mouse is released. The speed of the movement is determined by how fast the mouse is moved. The camera will continue to rotate indefinitely, and will not slow down.

Home All Homeall - Pulsing this button will set the camera to face the negative Z axis and to frame all of the geometry defined in the Render TOP parameter. The 'H' key can also be used as a shortcut for homing.

Frame All Frameall - Pulseing this button will move the camera to fit all of the geometry in the current scene while maintaining the existing camera direction. The 'F' key can also be used as a shortcut for framing.

Palette • Palette:arcBallCamera • Palette:arcBallGeometry • Palette:audioAnalysis • Palette:audioSet • Palette:battery • Palette:blendModes • Palette:bloom • Experimental:Palette:camera • Palette:cameraBrowser • Palette:camSchnappr • Palette:changeColor • Palette:changeToColor • Palette:checker • Palette:chromaKey • Palette:colorThreshold • Palette:compareComp • Palette:convolve • Palette:cornerPinSOP • Palette:customAttributes • Experimental:Palette:debugControl • Palette:dent • Palette:depthExtract • Palette:dilate • Palette:equalizer • Palette:feedback • Palette:feedbackEdge • Palette:firmata • Palette:geoPanel • Palette:gestureCapture • Palette:graphPlot • Palette:histogram • Palette:hsvBlur • Palette:imageSearch • Palette:julia • Palette:kantanMapper • Palette:kinectCalibration • Palette:kinectPointcloud • Palette:leapPaint • Palette:lightTunnel • Palette:mandelbrot • Palette:mesh • Palette:monochrome • Palette:motionSense • Palette:moviePlayer • Palette:multiLevel • Palette:multiMix • Palette:noise • Palette:onScreenKeyboard • Palette:opticalFlow • Palette:particlesGpu • Palette:pixelate • Palette:pixelRelocator • Palette:pointGenerator • Palette:pointillize • Palette:pointMerge • Palette:pointRender • Palette:pointRepack • Palette:pointTransform • Palette:pointWeight • Palette:popDialog • Palette:probe • Palette:projectorBlend • Palette:pushPins • Palette:puzzle • Palette:radialBlur • Palette:remotePanel • Palette:rgbaBlur • Palette:rgbaDelay • Palette:rgbContrast • Palette:search • Palette:searchReplace • Palette:sharpen • Palette:softenAlpha • Palette:solarize • Palette:sopRender • Palette:stitcher • Palette:stoner • Palette:superFormula • Palette:sweetSpotPreviz • Palette:TDVR • Palette:transitMap • Palette:twirl • Palette:vectorScope • Palette:virtualFile • Palette:waveformMonitor • Palette:webBrowser • Palette:xyScope

An Operator Family that contains its own Network inside. There are twelve 3D Object Component and eight 2D Panel Component types. See also Network Path.

The component types (e.g. Slider, Button, Field, Container) that are used to create custom control panels, also known simply as Panel or Gadget

An Operator Family that creates, composites and modifies images, and reads/writes images and movies to/from files and the network. TOPs run on the graphics card's GPU.

The component types that are used to render 3D scenes: Geometry Component contain the 3D shapes to render, plus Camera, Light, Ambient Light, Null, Bone, Handle and other component types.

A built-in panel in TouchDesigner that contains a library of components and media that can be dragged-dropped into a TouchDesigner network.