Plan Shape
a 3D Shape Generator for Quake Map Format
Documentation
Here
you can choose one of the 4 geometric objects that Plan Shape can
generate.
When loading a template file that specifies a
different shape, you need to come back here to choose the wanted
shape again. The loaded settings from the template file will stay.
After
choosing a shape you will open the sub menu. Here you also get some
basic informations about the current object and settings.
Type in the full path and
filename+extension here, to load predefined settings from a template
file.
You can also type in the filename+extension only, when the
template file lies in the same directory as the PlanShape
executable.
Note:
If you
haven't changed any settings, you can always still generate a shape.
The program will use the default settings then.
Coordinate
before:
78.5
Coordinate after:
157 (model
size
was doubled, scale factor for editor
is 0.5)
When a model
is generated with a high resolution and a >relative< small
size, the generated coordinates will probably contain decimal
places.
When opening a map file that contains brushes with such
coordinates, Hammer won't be able to correctly calculate the
corresponding planes and vertices. When you save a brush like this
again as a map-file and look at the map file in a text editor, you
will realize the coordinates are completey messed up:
Loading
floating point coordinates into Hammer
Original:
After loading and saving:
This
behaviour occurs in spite of using floating point patches like the
one by vluzacn. This issue can't be adressed, so it is neccessary to
enlarge said objects, before opening them in Hammer.
By sticking to the RMF format after that, you probably won't run into trouble again.
Resolutions start from 12 and are
then being doubled (24, 48, 96, 192,...).
Like stated before,
high resolutions are either not implemented or not tested and will
probably lead to faulty results. This depends on the choosen shape,
too.
Resolution of 12 (lowest possible) |
Resolution of 24 |
To avoid floating point
coordinates, it is absolutely recommended, that you use numbers that
are at least divisible by 16, 32 or even 64.
|
Cylinder |
Arch |
Torus |
HTorus |
Sphere |
Rad 1 |
✔ |
✔ |
✔ |
✔ |
✔ |
Rad 2 |
|
|
|
✔ |
|
Rad 3 |
|
✔ |
✔ |
✔ |
|
Arch Radius 1 |
Arch Radius 3 |
Hollow Torus Radius 1 |
Hollow Torus Radius 2 |
Hollow Torus Radius 3 |
Adding symmetry lines will actually add 4 more brushes to the given object, or in other words: it will split the 4 axis-brushes into halves.
This
feature doesn't work on Cylinder, Torus and Sphere at all or only on
certain axes, since the body sections of these shapes consist of
single large brushes instead of many small ones.
Here you can specify which part(s)
of the generated object you actually want to export. This can be
useful when using high resolutions, which will produce a high amount
of brushes.
This works for the Arch shape
only at the moment. It will do exactely this. Be aware that this will
double the amount of brushes.
The
export rules apply to any shape individually. While an arch always
consists of one section and e.g. 12 segments/brushes, a Torus has
possibly 12 brushes/sections altogether, and only 1 segment per
section/brush. This depends on how a specific shape is being
constucted.
[0] (All
Brushes – DEFAULT)
[1] (Brush Range)
[2]
(Section/Segment Range)
The
additional rule #2-4 uses this number to draw (export) only the nth
(2nd, 3rd, 5th, ...) element of the generated shape.
Drawing
every
3rd Brush of an Arch
[3] (Draw n-th Section only)
Drawing every 2nd Section of a Torus or Htorus
[4]
(Draw n-th Segment only)
Drawing
every 3rd Segment of a Hollow Torus
The given numbers will be
interpreted as percentage values.
You can specify the start and end
positions for the correspondent element (brush, section, segment) as
integer number ranging from first to last element (e.g. 1-12 or 1-16
when symmetry is activated) or percentage value (0-100).
"N" is the number used of some of the additional export rules, where only the N-th (e.g. 2nd, fourth or twelfth) element of a region (brush, section, segment) is being drawn.
N will not be interpreted as
percentage value!
There are 1 to 3 texture regions,
depending on the shape you're using. 1 and 2 are usually the outer
and inner sides of a shape, while region 3 is always the "floor"
texture.
Floor textures have a slightly different behaviour, but
act more or less the same as the body textures and use the same
commands.
The Null texture region could be another region
to be modified by the user, but I have not included that possibility
yet. This might be the case for a future update.
Use the texture name from the WAD
file here. This can be a string of any
The texture pixel width and height
from the WAD Bmp file. Always an integer number.
The basic Texture Scale can be an
integer or floting point number.
This in not fully implemented yet
and might not always work. It defines an alternative source for the Y
OR X axis scale (depends on the texture region you're using it on)
and will thus override the basic scale. The difference is, that the
alternative scale is already adjusted to the model size and thus will
give you a better result, without additional work. A good choice
would be "[1] Match X".
Example: Instead of having 2
different axis scales, let's say 2.05X and 2.65Y, the Y scale will
match the X scale, so both axis will have a scale of 2.05.
This is the shift, that will be
added on top of the final shift, when everything is done. With this
you can fix little differences between texture regions or just
compensate a missing symmetry line.
This rotation is added to a
texture region, when everything else is done. You can only use 0, 90,
180 and 270, any other value will be ignored.
This will toggle between world and
face align for a texture region, which does exactely the same as in
any Quakemap-editor. The 2 texture vectors are being aligned by using
the face itself as the source.
Texture
Align of a Torus Face
One of the most interesting
features of PlanShape is the texture "Shearing". This
method will align the texture vectors at the respective face edges.
Currently these edges are fixed, so you won't be able to choose
between the left or the right one.
Shearing or "Mesh Align"
will produce much better results on Torus, Sphere and any floor
textures, where normal face align would lead to cropped
details.
Texture
Align of a Torus Face
This will lead to the texture of a
region to be wrapped around it, based on the current scales and
bmp-sizes. Unless "Seamless" is also activated, the
resulting Scales will be "clean" and there will be a gap at
the beginning/end point, where the texture meets itself again.
While Wrapping AND Seamless are
activated, this will lead to a seamless result on the respective
axis.
Any integer value greater than
Zero will cause the texture to be wrapped around the shape exactely
this many times.
Usually you want to leave this at "0",
but sometimes you want to have more control over how many times the
texture is being wrapped around the shape. This will of course
override any of the set scales and also depends on "seamless"
being activated.
Zero means it will be wrapped seamless
automatically, based on the current scales and sizes. This is the
easiest solution for quick results, when the amount doesn't matter.
One of the
latest additions to the program gives you the ability to choose the
edge (or face), where the horizontal (X) shift of all faces of a
texture region of a Torus, Sphere or Hollow Torus is being copied
from, to allow for a clean, seamless wrapping result.
This
is neccessary, when you want a specific part of the shape to be more
"seamless" than the others, maybe for displaying text or
other details.
PST (Plan
Shape Template) are simple text files. You can open end edit them
with any text editor. You can also bind them to the PlanShape EXE to
compile them instantly even easier.
Comments
can be added by using "//" at the end of a line or
in front of it. This way commands can be commented out and will thus
be ignored at the import process.
Placeholders
should be spaces or tabulators.
Only use the
allowed data types for the respective commands.
The same
command can be pasted multiple times, but will only be detected
once!
Command |
Type |
Description |
Example |
filename |
string |
Just the name of the final file without extensions or anything. |
MyTorus_test |
filepath |
string |
Leave empty when in same dir as EXE or insert full path like. |
C:\Directory\blabla\ |
exmap |
bool (0/1) |
Wether or not the generated object gets exported as MAP file. |
1 |
exobj |
bool (0/1) |
Wether or not the generated object gets exported as OBJ file. |
0 |
nomenu |
bool (0/1) |
For drag and drop operations (drag and drop a template file onto the PlanShape-EXE to generate it). IF you just want to load the template file after D&D and still be able to modify some settings, leave this at 0. |
|
autoscale |
bool (0/1) |
Wether or not the model gets enlarged automatically before being saved as MAP file. |
1 |
shape |
string |
Which shape shall be generated. Use one of the following: cylinder, arch, torus, htorus, sphere |
cylinder |
#Basic Mesh Information# |
|
|
|
res |
integer |
Resolution 1 (valid for all shapes). Only use doubled version of 12: 12, 24, 48, 96, ... |
12 |
res2 |
integer |
Resolution 2 (needed for Torus and Hollow Torus only) |
24 |
rad |
integer |
Radius 1, applies to all shapes. |
512 |
rad2 |
integer |
Radius 2, applies to Hollow Torus only. Must be bigger than HALF the distance between Rad 1 and 3! |
960 |
rad3 |
integer |
Radius 3, applies to Arch, Torus and HTorus. |
1024 |
sym |
bool (0/1) |
Add symmetry lines. |
0 |
tri |
bool (0/1) |
Add triangles. Currently only works on the Arch. |
0 |
#Export Rules# |
|
|
|
rule1 |
integer |
[0]
(All Brushes – DEFAULT) |
2 |
rule2 |
integer |
[0]
(None – DEFAULT) |
3 |
percent |
bool (0/1) |
When activated, the ranges stated below (e.g. start1, end1) are interpreted as percentage values. |
1 |
nth |
integer |
The second rule #2-4 uses this number to draw (export) only the nth (2nd, 3rd, 5th, ...) element of the generated shape. |
3 |
start1 |
integer |
Start/End
element. This uses the total amount as maximum and the least one
as minimum. |
4 |
end1 |
integer |
^ |
9 |
start2 |
integer |
^ |
|
end2 |
integer |
^ |
|
#Texture Region 1-3 Settings# |
|
|
|
n_tex |
string |
Null texture (name from WAD file) |
solidhint |
1_tex |
string |
Texture name from WAD file |
C1A0_LABW3 |
1_sizex |
integer |
Texture size X (from BMP file) |
128 |
1_sizey |
integer |
Texture size Y (from BMP file) |
96 |
1_shiftx |
floating point |
X/Y axis shift, that is being added on top of the final shift. |
24.2452 |
1_shifty |
floating point |
^ |
155 |
1_scalex |
floating point |
Basic X/Y scale, you wanna use on this axis. This will get overridden by the wrapping amount command for seamless texture wrapping. |
2.75 |
1_scaley |
floating point |
^ |
3.5 |
1_scalesrc |
integer |
Scale-source
for a certain texture-axis. The scale will be copied from the
final scale of another axis. |
2 |
1_rot |
integer |
Rotation that gets added on top of the final texture. Can be 0, 90, 180 and 270 only! |
270 |
1_facealign |
bool (0/1) |
Turn
on facealign for this texture region. |
1 |
1_shear |
bool (0/1) |
Turn on shear (mesh align) for this texture region. |
0 |
1_v_wrap |
bool (0/1) |
Turn
on wrapping for this texture regions vertical axis. |
1 |
1_v_seamless |
bool (0/1) |
Turn
on seamless wrapping for this texture regions vertical
axis. |
1 |
1_v_wrapam |
integer |
The
amount of times the texture is being wrapped around the texture
region seamlessly. |
5 |
1_h_wrap |
bool (0/1) |
Horizontal wrapping... (see above) |
1 |
1_h_seamless |
bool (0/1) |
Horizontal seamless wrapping... (see above) |
1 |
1_h_wrapam |
integer |
Horizontal wrapping amount... (see above) |
0 |
1_h_rangesrc |
integer |
This
will change the source edge for the horizontal shift calculation
to another edge. |
4 |
1_h_range |
integer |
The custom edge-number for the horizontal Shift calculation can range from the smallest element number "1" to the biggest, e.g. "12" (24,48,...). |
9 |