vuo.layer
These nodes are for working with layers to create composite images.
Layers are a unique data type that are similar to images, but can be combined together as if they were stacked on top of one another. To create a layer, you can use one of the Make Layer
nodes. To combine layers into a composite image, you can use one of the Render Layers
nodes.
When creating a layer from an image, you can choose whether the node should be rendered at Real Size — with each pixel in the original image drawn as a single pixel in the composite image. A Real-Size layer can be translated but can’t be rotated or scaled. The Make Layer
and Make Layer with Shadow
nodes create a Real-Size layer, while the Make Scaled Layer
and Make Scaled Layer with Shadow
nodes do not.
Several layer nodes, such as the Is Point within Layer
node and the Receive Mouse Drags on Layer
node use a Layer’s name to detect what layer to act on. The Layer Name
entered must exactly match the name in the original layer’s Layer Name
port. A name with a trailing space, for example, will not match a name without a trailing space.
In Vuo coordinates, (0,0) is the center of the composite image. The composite image has a width of 2, with X-coordinate -1 on the left edge and 1 on the right edge. The composite image’s height is determined by its aspect ratio, with the Y-coordinate increasing from bottom to top.
Example compositions:
- Align Layers To Window: Renders two layers and aligns them to the edge of the window.
- Change Grid Spacing: Arranges layers in a grid, with the spacing between layers controlled by mouse movements.
- Change Layer Blend Mode: Cycles through the different available GL Blend modes, and applies them each to the foreground layer.
- Compare Layer Gradients: Displays a linear gradient and a radial gradient. When the mouse moves upward, the start and end point of the linear gradient get farther apart, and the radius of the radial gradient gets larger.
- Display Images On Layers: Displays two images using layers.
- Draw Rainbow Trail: Uses image feedback to draw a moving layer that leaves trails.
- Draw Shapes: Draws several shapes, with their sharpness and other parameters controlled by mouse movements.
- Is Mouse Within Layer: Changes a layer's color when you hover the mouse over it.
- Render Text Layer: This composition creates a text layer and renders it.
- Rotate Gears: Displays interactive gears using layers.
- Stretch Oval With Bounds: This composition shows the layer bounds of an oval layer as it gets stretched and compacted.
Nodes:
- Align Layer to Window (vuo.layer.align.window): Aligns the layer with an edge or corner of a window.
- Arrange Layers in Grid (vuo.layer.arrange.grid): Moves layers so that they are evenly arranged in a grid.
- Change Layer Blending (vuo.layer.blendMode): Applies a different image compositing style to the layer.
- Get Rendered Layer Bounds (vuo.layer.bounds.rendered): Outputs the center and size of a layer.
- Combine Layers with Transform (vuo.layer.combine): Groups multiple layers together and applies a transformation to the group.
- Combine Layers (vuo.layer.combine.center): Groups multiple layers together and applies a transformation to the group.
- Copy Layer with Transforms (vuo.layer.copy): Creates multiple layers consisting of transformed copies of an original.
- Copy Layer (vuo.layer.copy.trs): Creates multiple layers consisting of transformed copies of an original.
- Receive Mouse Drags on Layer (vuo.layer.drag): Fires events when the mouse tries to drag a layer.
- Make Scaled Layer (vuo.layer.make): Creates a layer that can be combined with other layers to create a composite image.
- Make Color Layer (vuo.layer.make.color): Creates a solid-color layer that can be combined with other layers to create a composite image.
- Make Linear Gradient Layer (vuo.layer.make.gradient.linear): Creates a gradient that transitions smoothly between the given colors along a straight line.
- Make Radial Gradient Layer (vuo.layer.make.gradient.radial): Creates a circular gradient that transitions smoothly between the given colors.
- Make Oval Layer (vuo.layer.make.oval): Creates a solid-color oval layer that can be combined with other layers to create a composite image.
- Make Layer (vuo.layer.make.realSize): Creates a layer that can be combined with other layers to create a composite image.
- Make Layer with Shadow (vuo.layer.make.realSize.shadow): Creates a layer that can be combined with other layers to create a composite image.
- Make Rounded Rectangle Layer (vuo.layer.make.roundedRectangle): Creates a solid-color rounded rectangle layer that can be combined with other layers to create a composite image.
- Make Scaled Layer with Shadow (vuo.layer.make.shadow): Creates a layer that can be combined with other layers to create a composite image.
- Make Text Layer (vuo.layer.make.text): Creates a layer that can be combined with other layers to create a composite image.
- Render Layers to Image (vuo.layer.render.image): Creates a composite image.
- Render Layers to Window (vuo.layer.render.window): Displays a window containing a composite image.
- Is Point within Layer (vuo.layer.within): Outputs true if the point is within the given layer.