Primary+Secondary Alignment
The two alignment directions define the orientation at which the structure is placed.
Explanation
Every structure has an intrinsic "up" direction and an intrinsic "forward" direction. By default, structures are placed with their up direction facing, well, up (+y), and with their forward direction facing forward (+x).
The most important thing is that now you can control how a structure is placed by defining where its up direction and where its forward direction should face.
We let the user define the alignment using two directions:
Overview
The primary and secondary can be set to either:
N
Direction based on the evaluation of a noise function at the placement's position.
P
The direction from the placement's position towards the current player position.
S
The approximate surface-normal in the region of the placement's position.
Settings
Constant
Explicitly set a constant direction for all placements.
Syntax: Constant
or Constant(Direction:<direction>)
Abbreviation: C
or C(D:<direction>)
If you do not specify a <direction>
, then:
the default direction is +y if you're setting the
<primary>
.the default direction is +x if you're setting the
<secondary>
.
There are various ways to define a direction. From using the axes, cardinal directions, vector notation, or player relative directions like forward, left, right, etc. Pro tip: You can also add directions together using simple arithmetic operators, like east-z+(0,0.5,0)
. Pro tip²: Put =
at the end to evaluate your direction expression as you are typing it.
Random
Random direction for each placement.
Syntax: Random
Abbreviation: R
Noise
Direction based on the evaluation of a noise function at the placement's position.
Syntax: Noise
or Noise(Noise:<noise>)
Abbreviation: N
or N(N:<noise>)
The default <noise>
is Perlin(Freq:0.01)
.
Aim
Your player's aim direction.
Syntax: Aim
Abbreviation: A
Note: For brushes, Constant(Direction:aim)
will use your player's aim direction at the time of brush binding, while Aim
will use the player's aim direction during each brush act.
Upward
The most upward perpendicular direction to your aim.
Syntax: Upward
Abbreviation: U
PlayerRelative
The direction from the placement's position towards the current player position.
Syntax: PlayerRelative
Abbreviation: P
SurfaceNormal
The approximate surface-normal in the region of the placement's position.
Syntax: SurfaceNormal
Abbreviation: S
By normal we mean the direction perpendicular to the terrain in question.
ViewDiff
Define a direction using two clicks. Exclusively for brushes.
Syntax: ViewDiff
Abbreviation: V
Each placement requires a right click and a left click. The first right click sets the placement position at the targeted block. Left-clicking somewhere else then defines a direction: From your first (right) click target position to your second (left) click.
Expression
Define a direction through an expression over each placement position.
Syntax: Expression(Expression:=<expression>,Space:<space>)
Abbreviation: E(E:=<expression>,S:<space>)
Mandatory Arguments:
Expression
(E
): An expression defining a 3D vector for each position in space.Input variables are
x
,y
,z
.Output variables are
rx
,ry
,rz
.For each placement, the expression will evaluated with the according placement position and the result used for the placement's alignment.
Optional Arguments:
Space
(S
): Defines the domain of the input variables.Defaults to
WORLD
.WORLD
: the placement position. x, y, z, are in world coordinatesLOCAL
: When used in...ezplace: Always 0,0,0.
ezscatter: Coordinates shifted such that the center of the region is 0,0,0.
ezarray: x=y=0. z=0 at the start of the path, z=L at the end of the path, whereby L is the length of the path.
NORMALIZED
: When used in...ezplace: Always 0,0,0.
ezscatter: Coordinates normalized to the region such that x,y,z ∈ [-1,1].
ezarray: x=y=0. z=0 at the start of the path, z=1 at the end of the path.
Tangential
The direction tangential to the path. Exclusively for arrays.
Syntax: Tangential
Abbreviation: T
Orthogonal
The direction orthogonal to the path. Exclusively for arrays.
Syntax: Orthogonal
or Orthogonal(Angle:<angle>)
Abbreviation: O
or O(A:<angle>)
The angle, given in degrees, defines the initial direction of the orthogonal direction, whereby 0° and 360°, will face up, 90° and 270° face left and right, and 180° faces down (at the first part of the spline at least. It may twist further along if the normal mode is set to CONSISTENT, which is the default setting).
Mixed
You may combine any number of any of the other Alignment modes using a weighted list:
Syntax: <weight1>%<alignment1>,<weight2>%<alignment2>,...
Alignment directions are scaled by the given weight and summed up together.
Parameters
The following flags adjust how Alignments are calculated.
Snap to certain directions: [-j <snapDirections>]
[-j <snapDirections>]
This parameter allows you to restrict the chosen alignment direction to the specified subset. E.g. snapping to / only allowing cardinal direction, i.e. 90° rotations.
Available options:
MULTIPLES_90
Only allows multiples of 90°, i.e. all axis-aligned directions.
MULTIPLES_45
Only allows multiples of 45°, i.e. axis-aligned directions AND all perfect diagonals.
MULTIPLES_22_5
Only allows multiples of 22.5°.
MULTIPLES_15
Only allows multiples of 15°.
DIAGONALS_1_1
Only allows axis-aligned directions, and perfect "1:1" diagonals.
DIAGONALS_2_1
Only allows the
DIAGONALS_1_1
directions and any "2:1" diagonals.
DIAGONALS_3_1
Only allows the
DIAGONALS_2_1
directions and any "3:1" diagonals.
DIAGONALS_4_1
Only allows the
DIAGONALS_3_1
directions and any "4:1" diagonals.
DIAGONALS_5_1
Only allows the
DIAGONALS_4_1
directions and any "5:1" diagonals.
Perturb Secondary: [-x]
In our primary+secondary system, placement fails if both vectors are collinear (which simply means they are on the same line).
By enabling this flag ezEdits tries to circumvent that case by perturbing the secondary direction by a small amount.
Last updated