Palette:gestureCapture

From Derivative
Jump to navigation Jump to 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/Mapping/kantanMapper • Palette:arcBallCamera • Palette:arcBallGeometry • Palette:audioAnalysis • Palette:audioSet • Palette:battery • Palette:blendModes • Palette:bloom • Palette:camera • Palette:cameraBrowser • Palette:camSchnappr • Palette:changeColor • Palette:changeToColor • Palette:checker • Palette:chromaKey • Palette:colorThreshold • Palette:compareComp • Palette:convolve • Palette:cornerPinSOP • Palette:cppParsTemplateGen • Palette:customAttributes • 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:moviePlaylist • 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:quadReproject • Palette:radialBlur • Palette:remotePanel • Palette:rgbaBlur • Palette:rgbaDelay • Palette:rgbContrast • Palette:sceneChanger • Palette:search • Palette:searchReplace • Palette:sharpen • Palette:softenAlpha • Palette:solarize • Palette:sopRender • Palette:splitter • Palette:stitcher • Palette:stoner • Palette:superFormula • Palette:sweetSpot • Palette:sweetSpotPreviz • Palette:TDVR • Palette:transitMap • Palette:twirl • Palette:vectorScope • Palette:virtualFile • Palette:waveformMonitor • Palette:webBrowser • Palette:webSvg • Palette:xyScope