Palette:gestureCapture

From TouchDesigner Documentation
Jump to: navigation, search

Summary
[edit]

The gestureCapture COMP records movement and then displays the curves as rendered lines. The outputs of gestureCapture are a SOP containing all paths as polygonal lines, the rendered image, and a CHOP containing the number of lines. Internally you can access a CHOP and a SOP for every gesture recorded.

By default you click and draw on the panel. It uses the x and y position of the cursor over the component, plus the left-click mouse button state to start/run capturing each gesture. Random colors are artificially added via the Color page.

To record your own input channels, put any set of channels in input 1 of this component, like the channels from a Vive controller. If you have channels named tx, ty, and/or tz scaled in the XY range -1 to +1, you will see the paths in the default viewer.

In the second input, attach an on/off "select" channel to start, run and end the capturing of the gesture.

In the third input you can optionally send a “clear all lines” channel to signal to remove all lines. In the fourth input you can send a “undo” channel to signal to remove the last line drawn. Alternately you can clear and undo using the Clear and Undo pulse parameters.

For every frame while recording a gesture, a keyframe is generated for every incoming channel. Recording as keyframes enables the recorded data to be smoothed. Some parameters on the Gesture page set the threshold of motion, affecting whether keyframes are created or not. When the motion is deemed still, it will not add new keyframes. Channel groups like tx, ty, tz has their own threshold of motion vs stillness, and you can set thresholds for other sets of channels.

Each gesture is stored as a component at gestureCapture/lines/line1, line2... It outputs 3 CHOPs and a SOP:

  • out1 - CHOP - the raw captured channels.
  • out2 - CHOP - the smoothed and generated channels. It contains 16 channels including channels that compute the gesture speed, velocity, direction and distance travelled, which can be readily used by your applications.
  • out3 - SOP - the smoothed gesture as a polygonal line.
  • out4 - CHOP - the length of time of the gesture, in seconds.

To watch the data while it is being gathered and processed, press the Keys and Chans buttons in the gestureCapture panel to see floating data viewers.

The number of lines is stored in ipar.Gesture.Nlines and output to out3.

(2019 30K and later: The SOP has a 'width' attribute and is rendered with the Line MAT.)

Note: This component is set up by default to use 'u' and 'v' from the panel, 'select' from the panel left-click. 'tz' is set to 0, and random colors are artificially added. remove sero_tx and sero_color or replace them if you wish.

Note: The moving dot is gestureCapture/dotCycle1, an example of moving objects by sampling the gesture curves.

PythonIcon.pngPalette:gestureCapture Ext


Parameters - Control Page

Help Help - Opens this page.  

Version Version - Current version of this COMP.  

Wireframe Width Width - This value is the width of the stroke. This value is in pixels.  

Blur Blur - The amount of blur in pixels.  

Clear Clear - Clears all lines.  

Undo Undo - Clears the last line drawn.  

Threshold Xlate Speed Transthresh -  

Xlate Chans Transchans -  

Threshold Rotate Speed Rotthresh -  

Rotate Chans Rotchans -  

Threshold Other Otherthresh -  

Other Chans Otherchans -  

Always Moving Alwaysmoving -  

Resample by Edge Length Resamplelength - Forces the length of each stroke to be the value set in the “Edge Length” parameter.  

Edge Length Edgelength - The length of each stroke.  

Keep Last Edge Point Keeplast - Turning off this parameter will remove the ends of strokes that are less than the value in the ‘Edge Length’ parameter.  


Operator Inputs

  • Input 0 -
  • Input 1 -
  • Input 2 -
  • Input 3 -


Operator Outputs

  • Output 0 -
  • Output 1 -
  • Output 2 -

TouchDesigner Build:

Palette
Palette • Palette:arcBallCamera • Palette:arcBallGeometry • Palette:audioAnalysis • Palette:audioSet • Palette:battery • Palette:blendModes • Palette:bloom • Palette:cameraBrowser • Palette:camSchnappr • Palette:changeColor • Palette:changeToColor • Palette:checker • Palette:chromaKey • Palette:colorThreshold • Palette:compareComp • Palette:convolve • Palette:cornerPinSOP • Palette:customAttributes • Palette:dent • Palette:depthExtract • Palette:dilate • Palette:equalizer • Palette:feedback • Palette:feedbackEdge • 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.

An Operator Family that reads, creates and modifies 3D polygons, curves, NURBS surfaces, spheres, meatballs and other 3D surface data.

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.

Each SOP has a list of Points. Each point has an XYZ 3D position value plus other optional attributes. Each polygon Primitive is defined by a vertex list, which is list of point numbers.

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