Palette:gestureCapture

From Derivative
Jump to navigation Jump to search

Summary
[edit]

The gestureCapture COMP records movement and then displays the curves as (1) rendered lines and/or (2) a dot following the curves and/or (3) free-hand drawn shapes. The outputs of gestureCapture are (a) the rendered image, (b) a SOP containing all paths as polygonal lines, (c) a CHOP containing the merged lines and (d) 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 illustrate that any channels can be recorded with the positions.

Undo deletes the last curve. Clear deletes them all.

To record your own input channels, put any set of channels in input 1 of this component, for instance, the channels from an HTC 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 (tz is overriden internally so you will have to remove it from linemaster0.

In the second input, attach an on/off "select" channel to start, run and end the capturing of the gesture. It can be a keyboard key, MIDI button or controller button or some motion threshold.

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 better smoothed. Some parameters on the Gesture page set the threshold of motion, affecting whether keyframes are created or not. With a non-zero threhold, 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:

  • out3 - SOP - the smoothed gesture as a polygonal line.
  • out2 - CHOP - the smoothed and generated channels. It contains 18 channels including channels that compute the gesture speed, velocity, direction and distance travelled, which can be readily used by your applications.
  • 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. (The max of the CHOP output's lineindex channel also indicates how many lines there are.)

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.

Dot page: The moving dot (controlled from the Dot page) is gestureCapture/dotCycle1, an example of moving objects by sampling the gesture curves.

PolyFill page: You can also draw closed shapes by turning on Render Fill in the PolyFill page. Simple smoothing so no Illustrator quality here.

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: in1 -
  • Input 1: in2 -
  • Input 2: in3 -
  • Input 3: in4 -


Operator Outputs

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

TouchDesigner Build:

Palette
Palette • Palette:arcBallCamera • Palette:arcBallGeometry • Palette:audioAnalysis • Palette:audioSet • Palette:battery • Palette:bitwigClip • Palette:bitwigClipSlot • Palette:bitwigDeviceRemotes • Palette:bitwigMain • Palette:bitwigNote • Palette:bitwigProjectRemotes • Palette:bitwigRemotesDevice • Palette:bitwigRemotesProject • Palette:bitwigRemotesTrack • Palette:bitwigSelect • Palette:bitwigSong • Palette:bitwigTrack • Palette:bitwigTrackRemotes • Palette:blendModes • Palette:bloom • Palette:camera • Palette:cameraBrowser • Palette:cameraViewport • 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:encoder • Palette:equalizer • Palette:feedback • Palette:feedbackEdge • Palette:firmata • Palette:gal • 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:logger • Palette:mandelbrot • Palette:materialDesignIcons • Palette:mesh • Palette:monochrome • Palette:motionSense • Palette:movieEngine • Palette:moviePlayer • Palette:moviePlaylist • Palette:multiLevel • Palette:multiMix • Palette:noise • Palette:onScreenKeyboard • Palette:operatorPath • Palette:opticalFlow • 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:recorder • Palette:remotePanel • Palette:rgbaBlur • Palette:rgbaDelay • Palette:rgbContrast • Palette:sceneChanger • Palette:search • Palette:searchReplace • Palette:sharpen • Palette:sickEngine • Palette:signalingClient • Palette:signalingServer • Palette:softenAlpha • Palette:solarize • Palette:sopRender • Palette:splitter • Palette:stitcher • Palette:stoner • Palette:superFormula • Palette:SVG • Palette:sweetSpot • Palette:sweetSpotPreviz • Palette:synchroCache • Palette:synchroClient • Palette:synchroFrameIn • Palette:synchroFrameOut • Palette:synchroNDIIn • Palette:synchroSDIIn • Palette:synchroVideoOut • Palette:tdBitwigPackage • Palette:TDVR • Palette:transitMap • Palette:twirl • Palette:vectorScope • Palette:virtualFile • Palette:waveformMonitor • Palette:webBrowser • Palette:webRTC • Palette:webRTCPanel • Palette:webRTCPanelRcv • Palette:xyScope