Make Vector
Combines individual scalar values into a Vec2 or Vec3 output.
Category: Math Menu path: Math > Make Vector
Ports
Vec2 Mode
| Port | Type | Direction | Description |
|---|---|---|---|
x | scalar | input | X component |
y | scalar | input | Y component |
out | vec2 | output | Combined vector |
Vec3 Mode
| Port | Type | Direction | Description |
|---|---|---|---|
x | scalar | input | X component |
y | scalar | input | Y component |
z | scalar | input | Z component |
out | vec3 | output | Combined vector |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
mode | enum | Vec2 | Output type: Vec2 or Vec3 |
x | scalar | 0 | Fallback X value when input not connected |
y | scalar | 0 | Fallback Y value when input not connected |
z | scalar | 0 | Fallback Z value when input not connected (Vec3 mode only) |
Only the params for the current mode are visible in Properties (Vec2 shows x/y, Vec3 shows x/y/z).
How It Works
MakeVector reads scalar values from its input ports (or falls back to param values when disconnected) and assembles them into a vec2 or vec3 output. This is a mode-switching node -- changing mode updates the output port type and adds/removes the Z input port, pruning incompatible edges.
MakeVector is evaluated in the CPU pre-pass before GPU work, so it has no performance cost.
Usage Examples
Basic: Animated position
Time.seconds -> Math (Sin, output: X offset) -> MakeVector.x. Time.seconds -> Math (Cos, output: Y offset) -> MakeVector.y. MakeVector.out -> Transform2D position_in. Creates circular motion.
Scale from expression
Math (some expression) -> MakeVector (x and y both connected to same scalar). Creates a uniform scale vec2 from a single value.
Independent axis control
Separate Math chains for X and Y -> MakeVector -> Noise scale_in. Control noise scale independently per axis via expressions.
Tips
- When only some inputs are connected, the unconnected components use their param values -- no need to connect all ports
- Vec2 output can connect to vec3 inputs (auto-promotion with z=0)
- Switching from Vec3 to Vec2 mode removes the Z port and prunes any edge connected to it
Related Nodes
- BreakVector -- the inverse operation: split a vector into scalars
- Constant -- fixed vec2/vec3 without component inputs
- Math -- scalar operations to feed into MakeVector
- VectorMath -- vec2 operations on assembled vectors