Touch Ripples | Ripples are used to visualize touch positions regardless of the gestures a touch my trigger. |
The Touch Ripple node serves too purposes in one: Its primary use is to give the user visual feedback which touches have been registered by Ventuz and where they are. A typical effect is to have outward moving lines (hence the name ripples) or some form of glow effect appear underneath the users fingers. Especially for non-direct surface tracking (e.g. laser scanners in front of a project wall) where the user does not actually touch the surface, giving a visual feedback of the vicinity the user is touching in can improve usability.
The Touch Ripples node works in a fashion similar to the Ticker node. The number of touches to be tracked can be adjusted by the buttons at the bottom of the Hierarchy Editor. For each touch, an additional output branch is created in the scene hierarchy.
The hierarchy nodes behind an output are considered a re-usable element that visualizes a single touch. For example, when dragging a Touch Ripples node into the Hierarchy Editor, by default 5 outputs are created and each is connected to its own Container. When a new touch appears, the Touch Ripples node assigns one of the yet unused outputs to that touch and updates its world matrix to match the position of the touch on screen.
Similar to the Touch Translation, Rotation & Transformation nodes, a touch's position is mapped to the virtual X/Y-plane of the Touch Ripples node itself. Rotating the Touch Ripples node will therefore also rotate the plane in which the ripples lie.
Although the position of a ripple is therefore done under the hood, its visibility is up to the user. In general, one wants to connect the Touch#IsActive output property (where # represent the number of the output) to the respective content behind the Touch Ripples node and have the content change its visibility accordingly. The default content for example fades in a ripple when the flag is enabled and fades it out when it becomes deactivated again. Otherwise ripples would be visible even after a touch has left the surface.
Besides the IsActive property, each output contains further properties that give detailed information about a touch:
Very few touch devices actually transmit a pressure value. The virtual touch generated by Ventuz when moving the mouse above the render output is one example. Although no mouse button is pressed, a mouse-touch will set its IsActive property to true as soon as it enters the render area. However, its pressure will be -1 (hovering) until the user presses the left mouse button and the pressure becomes 1 (fully pressed).
For marker objects (uniquely identifiable objects as opposed to generic fingers), two further properties are filled with meaningful values:
While those properties can be used to refine the visualization of ripples, their main purpose is for customized touch-handling. For example, a user might choose to ignore all Ventuz interaction nodes and instead bind the output properties to a custom script and create completely new gestures.
A couple of input properties are available to change the behavior of the Touch Ripples node:
Coordinate System:
Recyling Mode: By default, the First unassigned output is used when a new touch is detected. This is the usually preferred behavior when attaching some custom logic to the Touch Ripples node output. However, it can lead to problems when a touch leaves and a new one enters before the ripple visualization finishes its out animation. The result is that the old touch does not fade out but suddenly disappears as the output's content is re-used. By switching this property to Cycle, not the first but the next available output is used, preventing one touch from stealing another's visualization as long as the number of outputs is high enough. Touch Types: By default, the Touch Ripples node only tracks ordinary touches (i.e. fingers) and not markers. This output can be used to also track marker objects. Tracking Mode: Ripples usually appear for all touches, regardless of whether they hit a button or activate another gesture. However, especially for remoting other applications or using scripts, it can be interesting to just track touches that are not used by any of Ventuz's interaction node. This can be achieved by setting this property to Non Captured.