Stroke

This lesson is about all the nodes that get data from the action of making a stroke with your stylus or your mouse.

Get Direction

Angle

../../../_images/odysseybrush-nodes-get-stroke-getdirection.png

These two nodes get respectively the normal and the tangent angles based on the direction of your stroke. The value you get in both case is a Float. These nodes can be useful to create painting brushes, like rakes, or to force a stamp to follow a specific direction.

An example of how to use “Get Direction Angle Tangent Deg”, in the Odyssey Brush “Arrow 1”:

The Blueprint:

../../../_images/odysseybrush-nodes-get-stroke-getdirection-blueprint.png

The result (stroke at the top did not use Get Direction Angle Tangent Deg, while the stroke at the bottom used it):

../../../_images/odysseybrush-nodes-get-stroke-getdirection-blueprint-result.png

Vector

../../../_images/odysseybrush-nodes-get-stroke-direction.png

These nodes calculate respectively the normal or the tangent of the stroke’s direction and give a result as a Vector 2D Structure.

Get Distance Along Stroke

../../../_images/odysseybrush-nodes-get-stroke-distance.png

This node simply takes the distance covered in pixels and gives a Float result. This might be useful to automatically increase the size of your Brush with the distance of your stroke.

The Blueprint:

../../../_images/odysseybrush-nodes-get-stroke-distance-blueprint.png

The result:

../../../_images/odysseybrush-nodes-get-stroke-distance-result.png

Get Current Stroke Point Index

../../../_images/odysseybrush-nodes-get-stroke-index.png

When you draw a stroke with an Odyssey Brush, it applies multiple stamps (see this lesson). Each stamp you create gets an ID and this ID, an Integer, can be used in some specific cases.

n the example below, this series of nodes will prevent your stroke to display the first stamp of your brush in order to avoid an unpleasant result on the canvas (espcially for brushes whose the result depends on the direction of the stroke).

The Blueprint:

../../../_images/odysseybrush-nodes-get-stroke-index-blueprint.png

The result:

  • Top : without “Get Current Stroke Point Index” and “Branch” nodes (you can see the extra yellow dot)

  • Bottom : with Get “Current Stroke Point Index” and “Branch” nodes

../../../_images/odysseybrush-nodes-get-stroke-index-result.png

Get Speed

../../../_images/odysseybrush-nodes-get-stroke-speed.png

This node calculates the speed of the stroke and gives a result as a Vector 2D Structure.

Get Acceleration

../../../_images/odysseybrush-nodes-get-stroke-acceleration.png

This node calculates the acceleration of the stroke and gives a result as a Vector 2D Structure.

Get Jolt

../../../_images/odysseybrush-nodes-get-stroke-jolt.png

This node calculates the jolt of the stroke and gives a result as a Vector 2D Structure.

Get Delta

Position

../../../_images/odysseybrush-nodes-get-stroke-position.png

This node calculates the delta position of the stroke and gives a result as a Vector 2D Structure.

Time

../../../_images/odysseybrush-nodes-get-stroke-deltatime.png

This node calculates the delta time of the stroke and gives a result in micro seconds as an Integer.

Get Stroke Block

../../../_images/odysseybrush-nodes-get-stroke-block.png

This node will create a stroke based on the stroke currently made (which means this block should be blended or combined with another sample). The return value is an Odyssey Block Proxy (to be connected to Block input).

The input “Area” must be connected to “Make Odyssey Rectangle”.