Area2
Function. Outputs a 2D point on a user-painted area.
Valid input range is [0; 1]. The block provides stable (deterministic) output: the same input always produces the same point. To get random points within the painted area, connect the input to a Random block with range [0; 1).
The area is painted visually in the editor when the block is selected.
Properties & inputs:
- Optimized pix. size (property): The painted area is downsampled to this pixel size for performance. The checkerboard in the Preview window shows cells of this size.
Outputs:
- Square (float): Total area of the painted region in units. One unit corresponds to a 100×100 square.
- Position (vec2): 2D position within the painted area for the given input.
Painting the area
Select the block and the Preview window turns into an area editor: the painted region is shown as a checkerboard on a working plane, and a toolbar appears on the right side of the viewport.
Tools
- Paint — add to the painted region.
- Erase — remove from it. The area shrinks automatically once an edge is cleared, so erasing does not leave empty margins behind.
- Move — drag the whole painted region across the working plane.
Next to the tools you choose the brush shape — Soft (a faint brush that builds up as you paint over the same spot) or Hard (full strength in a single pass) — and the working plane the area is painted on (XOY, XOZ or YOZ).
The area grows by itself as you paint outside its current bounds, up to a maximum of 1000×1000 pixels.
Brush controls
| Action | Result |
|---|---|
| LMB click | Stamp the brush once where you clicked |
| LMB drag | Paint or erase freehand, following the cursor |
| Shift+Wheel | Change the brush size |
| Esc | Cancel the stroke you are in the middle of |
The plain mouse wheel is left to the camera, which is why resizing the brush takes Shift.
Straight lines
Hold Shift to draw a straight segment instead of a freehand stroke. There are two ways to do it, and they can be mixed freely.
- Shift+click draws a segment from the end of your last stroke to the point you click. Each click starts the next segment where the previous one ended, so clicking along a route gives you a connected run of segments. The first Shift+click after opening the editor has no previous stroke to draw from, so it only marks the starting point for the next one.
- Shift+drag draws from the point you press to the point you release. The line is previewed while you aim, so you can see where it will land before committing to it.
Hold Ctrl as well to snap the line to 45° steps — for exact horizontals, verticals and diagonals.
Straight lines work with the Erase tool too, wiping a clean straight line through what you have painted.
Each applied segment is a separate undo step, so one misplaced segment can be undone without losing the rest of the run. Pressing Esc before releasing cancels the segment without applying it.
Switching tools between Paint and Erase clears the starting point, so a segment never chains across a tool change.
Loading a picture
Load Picture in the toolbar imports an image into the area instead of painting it by hand. The image's alpha channel is used where it has one; otherwise its brightness becomes the painted shape. Flip H and Flip V mirror the area once it is in.
Related
- Path2 — for placing particles along a line rather than across a region.