Curve : The complete guide to all parameters
<r0><r1><n><a0><a1><t><r2><r3><s><id><od><h><ct>
Documentation of curve written by Dave also available in PDF or ODT
Curve is a program designed to create rounded structures which can be imported directly into GtkRadiant. These structures are aligned to the 1-unit grid, as that is the Neverball standard.
There are six ways to use the curve program:
curve 256 272 64 0 720 256 8 48 384 0 0 192 1 > mycurve.map
In the following sections, each parameter will be explained in depth, with picture examples taken straight from the editing windows in GtkRadiant. Each picture has a caption with the exact parameters that were used to create each curve. Each file that is output by curve contains a comment header with the exact parameters used to create that curve. Simply open the file in a text editor to view the header (see this note about the header.)
Quick list :
The inner radius can be any number, including zero. Zero would be useful if you are planning on creating a “disc” shape that is solid. (After importing such a “disc”, you can use the CSG Merge function in GtkRadiant to merge the sections into a single lump). Certain advanced curves may experience small(easily corrected) glitches when the inner radius is zero.
| | |
| curve 128 256 16 0 180 | curve 0 112 24 0 360 | curve 0 112 24 0 360 - CSG Merged |
The outer radius can be any number as long as it is at least 1 unit larger than the inner radius <r0>.
| | |
| curve 128 256 16 0 180 | curve 0 112 24 0 360 | curve 0 112 240 0 360 - CSG Merged |
The number of lumps specified here will be the number of “sections” that your curve will be divided into. Therefore, a low <n> will produce a coarse curve, while a high <n> will produce a smoother curve.
| |
| curve 128 192 7 0 180 | curve 128 192 24 0 180 |
It is important to note that using any of the so called “Advanced Curve Settings“ (<s> <id> <od> <h>) will double the number of lumps that you specify here. This is due to each lump being cut into two triangular pieces, necessary for it to work correctly in both GtkRadiant and Neverball. Please note that when using advanced curve settings, it is possible to specify a number of lumps that is too high, resulting in a bumpy,coarse surface (due to alignment on the 1 unit grid), when what you wanted was a smooth one. If you find that your advanced curve/spiral/sloped curve,etc. is rougher than you wanted it to be, try a lower number of lumps – this can smooth things out.
| |
| curve 96 128 16 0 90 16 96 128 64 This ends up much smoother in-game, with less lumps | curve 96 128 30 0 90 16 96 128 64 This curve is rough and hard to navigate in-game |
The beginning angle can be any figure, and is expressed in degrees(360 is full circle). It's probably best to make this a positive number – negative numbers may not behave in an expected manner, and could possibly crash the program.
| | |
| curve 128 256 16 0 180 | curve 128 256 16 45 180 | curve 128 256 16 90 180 |
The ending angle can be any figure as well, again expressed in degrees(360 is full circle). There are no checks as to whether you enter a lower or higher number than <a0>, so to be safe, make it a number higher than <a0>. You may also go beyond 360 degrees, which can be useful when making spirals (explained further in the slope <s> section, under Advances Curves)
| | |
| curve 64 128 12 0 135 | curve 64 128 24 0 270 | curve 192 256 64 0 720 16 192 256 256 |
The thickness of the curve is expressed in radiant units, and the default is 16 – a common height for a platform. You may specify any number for <t> as long as it is at least 1 unit. Thickness of a curve is easily adjusted in GtkRadiant. This number plays a more important role when creating "advanced" curves, especially ones that use <id>, <od> or <h>).
| |
| curve 64 128 16 0 90 8 | curve 64 128 16 0 90 32 |
The ending inner radius can be any number, greater than, equal to, or less than the starting inner radius <r0> including zero. This can be especially useful for creating various spirals, and swirls, or creating a curve that grows wider or more narrow from one end to the other.
| | |
| curve 0 32 64 0 1080 16 224 256 | curve 64 256 16 0 180 16 192 256 | curve 256 288 16 0 180 16 0 32 |
The ending outer radius can be any number as long as it is greater than the ending inner radius <r2> by at least 1 unit. Not surprisingly, this setting is also useful when creating spirals, swirls, and curves of varying width from one end to the other.
| | |
| curve 144 256 36 0 540 16 32 64 | curve 64 128 16 0 225 16 64 256 | curve 128 256 24 0 180 16 16 48 doubled and rotated in GtkRadiant |
The slope specifies the total number of units to change vertically between the beginning and end of the curve. It can be any number, including zero, and negative numbers(which will move “down” from the beginning to the end). Why zero? Two reasons: First, you might want to only use some of the other advanced settings, <id>, <od> or <h>, but not have a slope. Second, if you plan on rotating your curve in an unusual way in GtkRadiant, it might be advantageous to have it split into more pieces(with the doubled number of lumps <n>), so it can be aligned to the 1 unit grid more easily after rotation. If you specify *anything* for the slope, you can count on having the <n> doubled. It is also worthy of note that while you can specify any value for the slope <s> that you wish, and you will get a nice smooth ascent(or descent) - for perfect results, make the value for <s> be a multiple of the number of lumps <n>. (e.g. Slope of 80 will be a little smoother vertically with 20 lumps than with 24.)
| | |
| curve 128 192 12 90 180 16 128 192 64 | curve 384 512 64 0 1080 16 128 160 256 | curve 512 520 32 0 360 256 512 520 320 rotated 90 deg. on the Y-axis in GtkRadiant, for a loop-de-loop |
The inner drop parameter is how many units to drop the top level of the inside of the curve. It must be at least one unit less than the total thickness <t>. This figure is subtracted from the thickness parameter, and the result is that your curve will be angled inward. This option can combine nicely with hill <h> option, to create banked curves, similar to what you might see at a race track.
| | |
| curve 128 256 8 0 90 48 128 256 0 32 | curve 128 256 8 0 90 48 128 256 0 32 0 32 the same curve using the “hill” option | curve 768 1024 80 0 900 64 256 320 -512 48 |
The outer drop parameter is how many unit to drop the top level of the outside of the curve. Just as with the inner drop <id>, the outer drop must be at least 1 unit less than the thickness <t>of the curve. The result will be a curve which is angled outward.
| |
| curve 128 256 8 0 90 48 128 256 0 0 32 | curve 128 256 8 0 90 48 128 256 0 0 32 0 0 same curve with constant thickness <ct> off |
The hill value specifies the amount to drop the top level of the ends of the curve. The middle of the curve will be the full value of thickness <t> while the ends will have a thickness equal to <t>minus <h>. The hill curve is a sine wave, which provides for a smooth transition.
| | |
| curve 128 256 16 0 180 64 128 256 0 0 0 48 | curve 96 192 24 0 180 128 96 192 0 0 0 112 cut in half, then copied and pasted in GtkRadiant | curve 512 576 64 0 720 256 128 192 160 0 0 240 |
The default for constant thickness <ct> is 1, which means on. You can specify 0 to turn it off. Its default function is to compensate for the <id>, <od> , and hill <h> values, so that you can have a curve that has a constant thickness from beginning to end, even when it is angled, or hill shaped. It could be desirable to have an angled curve or hill where the thickness is not adjusted.
| |
| curve 128 256 8 0 90 48 128 256 0 32 0 0 0 | curve 128 256 16 0 180 64 128 256 0 0 0 48 0 |
The curve program will look in a file called textures.txt for information about the textures that should be automatically applied to the different parts of the curve. The following is generated in textures.txt when you run the curve program with the -textures option:
TOP invisible BOT invisible IN invisible OUT invisible
You can replace the “invisible” (which is the default texture) with the name of any texture that resides in the mtrl folder. Only put the shader name in and not any file extension (e.g. turf-grey , not turf-grey.jpg).
Each curve file that is generated by the curve program contains a comment header with all of the parameters that went into creating that specific curve. In the case of “non-advanced” curves, the header will contain more info than is necessary to recreate the curve. For instance:
If you create a curve with the following command:
curve 128 256 16 0 180 8 64 128 > mycurve.map
The header will say your curve was created with the following parameters:
curve 128 256 16 0 180 8 64 128 0 0 0 0 1
However, if you re-input those exact numbers, you will end up with a curve that has twice as many lumps <n> as necessary, due to the zero being explicitly specified for the slope <s>.
Therefore, please be aware of the issue that a simple curve does not need to have all of the parameters entered from the header to recreate it, and that it could be potentially undesirable to do so.
Some versions, perhaps all, of GtkRadiant will create a copy of imported .map files in memory. This only becomes a problem if you are trying to fine-tune a curve, and decide to over-write an existing .map file. If you import a .map into GtkRadiant, over-write the .map, and then try to import it again right away, you will get exactly the same .map that imported the first time. The curve program really has overwritten the .map with your new curve, but GtkRadiant has somehow cached the first version of it.
Please be aware of this behavior when importing your curves, to avoid unnecessary confusion.