Go to QuArK Web Site
Standard Duplicators
Updated 05 Apr 2018
Upper levels:
QuArK Information Base
2. Map editing
2.2. Advanced Duplicators

 2.2.1. Standard Duplicators

 [ Prev - Up - Next ] 

Standard duplicators make copies of the brushes of the group they're in, arranged in patterns depending on which duplicator is used and what its specifics are. The most often used ones put the copies in a row, although there are also ones that arrange them in various kinds of symmetrical patterns.


 Index


 Basic Use

tiglari - 05 Apr 2018   [ Top ] 

The simplest duplicator for putting copies in a row is the 'Basic Duplicator', the first item in the New Polyhedrons|Duplicators & Misc toolboxlist. To see it at work, first create a new poly, then make a group over it (by hitting the `new group' panel button). Now, with either the group or the cube selected, insert the Basic Duplicator. What you'll now see, in an XY view, is 5 blue outlines of the original New Cube heading off at a 45 degree angle. These are the copies of the original brush.

To control what's happening, push the tree-view button in the browser panel select the newly inserted Basic Duplicator, and look at its specifics. There's 'classname', and 'copy outside', which should have a check to its right, we'll look into those later. The first one that interests us now is 'offset', which will be the triple of numbers '32 32 0'. This is the amount, in the X, Y and Z dimensions, whereby each copy is displaced from the previous one. So we can make the copies head out in the X direction, spaced at a greater distance, by changing these numbers to say '200 0 0'.

The next number is 'count', which controls the number of copies, so if you only want one, set it to '1'. Count is giving us the number of copies, not including the original.

Following that is 'angle'. This rotates each copy of the duplicated object by that amount in degrees from each copy's center, or origin, point. A positive number will rotate it counter clock wise and a negative number will rotate it clockwise. This creates a circular pattern of the duplicated object. They can then be made to create a stair step pattern by moving any of the solid blue handles up or down. The smaller the number used for 'angle' the bigger the circumference of the circular pattern becomes, because the rotation of each copy's center is less, and visa versa. This can also be done with the 'red ball' handle.

The 'origin' specific, is where the duplicator is located and best controlled by dragging it around, and 'macro', which you should leave alone until you're an expert.

The point of duplicators is to have any changes you make in the original show up automatically in the copies, so you should now pull the faces of the cube around a bit, to see the shapes of the copies change. Also, if you drag the cube with respect to the duplicator, the positions of the copies will change.

You also might have noticed that for each copy there is a little blue square. If you drag a square with the mouse, you change the direction of the row and the spacing of the copies along it. Look at the 'offset' specific while you're doing this, & you'll see that what you're doing is visually editing the offset. So there's a quick way to get things into the arrangement you want.

So far we've only been making copies of single brushes. But the Basic Duplicator (and many of the others) makes copies of everything in the group that contains it, including brushes, entities, and entities, except duplicators themselves. So if you put two different brushes into the duplicator's group, you'll see them both being copied. This lets you make copies of structures as complicated as you like.

With a duplicator, you can edit the original, and see the changes in all the copies, but you can't make a change to some particular individual copy. However sometimes that is what you want to do (perhaps to introduce some variations into a bunch of things you've created). You can make the copies individually editable by RMB | Dissociate Duplicator Images on the duplicator (in the tree-view). Now the duplicator is removed from the map and replaced by the copies it has been creating, as freestanding individual pieces of map structure. Of course when you do this, you lose the advantage of having a duplicator. With the undo facility, you can get the duplicator back (until you close the editing session), but then you'll also loose any individual changes you've made.


 More Duplicators

tiglari - 05 Apr 2018   [ Top ] 

There are seven more Standard Duplicators beyond the Basic Duplicator. One of them, the Linear Duplicator, is an enhanced version of the Basic Duplicator; we'll talk about it last. Then there is Copy One and 5 mirror duplicators.

Copy One makes a single copy, which you can put where you want. If you want to make a small number of copies, and put them in assorted places (perhaps a few crates scattered around in a room), you can put several Copy One duplicators into the same group; each will make its own copies of the things in the group, which you can locate with the blue handles (notice however that if several duplicators are located in the same group, they don't copy each other).

Copy One is fine for making small numbers of copies, but for larger numbers, the more complex Instance Duplicator would be better.

The mirror duplicators make copies located symmetrically around an axis that passes through the duplicator (equivalently, reflected in the plane perpendicular to the axis). There are Mirror X, Mirror Y and Mirror Z, each making one copy, and Mirror XY, making three (so there are either two or four shapes in all). What if what you want is say 4 structures in XZ, or 8 in all in XYZ? There's a way to do that which we'll see in 'Duplicator Combinations' below.

The last of the standard duplicators is the Linear Duplicator, whose special features are somewhat advanced, so we talk about them in 'The Linear Duplicator' below.


 Duplicator Combinations

tiglari - 05 Apr 2018   [ Top ] 

Various kinds of effects can be produced by using more than one duplicator in a combination. There are two kinds.

First, more than one (standard) duplicator can be put into the same group. What will happen then is that each will produce copies according to its own type and specifics. So if you want for example to arrange the copies in a cross shape, along the X and Y axes, you could use four basic duplicators, with offsets '256 0 0', '-256 0 0', '0 256 0' and '0 -256 0'.

The second is more interesting. A standard duplicator makes copies of everything in the group that contains it. What if one of those things is itself a group with a duplicator? It turns out that the pattern made by the lower duplicator gets copied by the higher one, so that for example we can make not only rows, but grids. So for example to make a grid with 5 rows and 10 columns, you could use 2 Basic Duplicators, one with count 5, arranging things down the Y axis, and another with count 10, arranging them down the X axis.

We can use this technique to get the effects of some additional Mirror-type duplicators. For example if we wanted an XYZ mirroring, we could use a Z Mirror and and XY Mirror.


 The Linear Duplicator

tiglari - 05 Apr 2018   [ Top ] 

So finally we come to the Linear Duplicator. This is an enhanced version of the basic duplicator, with two useful additional specifics: scale and angles. The values of both are three numbers.

Scale is numbers for multipling the size of the object in the X, Y and Z dimensions. Each object is multiplied in size relative to the last, so you can get for example a series of pillars of increasing height by setting scale to something like '1 1 1.3' (no quotes in the actual value entered in). And the angles numbers specify rotation around the Y, X and Z angles in succession (Pitch, Roll and Yaw). So if you want each object to be spun 15 degrees around the Z axis, but left the same on the others, '0 0 15' will do it.

There are two more specifics, matrix and linear. Neither of these are likely to be useful to the average mapper, but here's a quick explanation anyway. Scaling and rotation are particular kinds of 'linear transformatioms', which are distortions of space (and or the objects in them) that can be specified in terms of 9 numbers. With the 'matrix' specific you can enter the matrix of any linear transformation to be applied to the object using its center as a 'fixed point', while 'linear' does the same thing using the duplicator location as the fixed point.

Finally, for what it's worth, the 'angle' specific of the Basic Duplicator specifies a rotation around the Z axis, with the duplicator as fixed point. Well so much for that, now on to something a bit more useful.

Which is suppose that you want to use scale, but you want the copies to all be lined up the same on the bottom, but each sticking up higher than the next? First, the stuff to be scaled in this way must be put in a group of its own, then select the group in the tree-view, hit the Specifics tab, and push the button captioned 'centering'. A little light blue handle should appear at the center of the group you have made. This handle can then be dragged around, and will define the point used as the center for linear operations on the group, including the duplicator's scaling. So move the handle down to the bottom of the brush, and if the scale is 1 1 1.3, they will align on the bottom but get successively taller.

The 'User Center' of the group is also used as the center for rotations; Note that if the linear duplicator's group contains two brushes, each will rotate around its own center. If we want both brushes to rotate as one unit, we need to put them under their own group, which can then have its own customizable center.


 Incrementing Specifics

tiglari - 05 Apr 2018   [ Top ] 

Suppose you want to make a row of lights, each with its own switch. The triggers will have 'target' specific, the targets a 'targetname' specific, but for the thing to work, they will need to be different in each copy. This can be acheived by activating the incrementation facility for specifics. The first step is to check the duplicator's 'increment' specific. Then choose as target and targetname values something that ends in a digit, say 'light000'. Now each copy will have the final digit incremented by 1, so each trigger will activate its own light. This basic facility applies to 'target', 'targetname' and 'killtarget' specifics, and uses 1 as the increment, but there are extensive facilities for making things more flexible.

  • the 'incr. all target' checkbox specific will extend incrementation to every specific that contains the string 'target' (e.g. 'closetarget')
  • the 'incrementable' specific takes as its value a list of names of additional specifics that are to be incremented (e.g. 'lip damage').
  • 'final_target' specifies a value that is to be used for target-value the last copy, including None if the specific is to be omitted (for example there might be a sequence of switches in which the last one activiated a door). For any specific name, we can add a final_ specific, e.g. 'final_killtarget' which will work in the same way.
  • 'increment by' specifies the size of increment. This can be used to produce a grid of lights, each with its own switch; using say 10 as the increment for the outer duplicator and 1 for the innder.
  • 'incre_lip' specifies a custom increment for the 'lip' specific; further specifics of this kind beginning with 'incre_' can be added freely.

At time of writing, incrementation is implemented for the basic, linear, and (new) copy-one duplicators. More will probably be added in the future. (Many of the ideas here, and some of the implementation, is due to subnoodle.)



Copyright (c) 2022, GNU General Public License by The QuArK (Quake Army Knife) Community - https://quark.sourceforge.io/

 [ Prev - Top - Next ]