Last Update: March 31, 2019
This program lets you generate Arcs from Goldsource map files. It works by dropping map or txt files onto the programs executable.
Map files will have to match certain criteria, see below for further informations.
Also since the tool can not read Goldsource WAD files, you will have to create custom text files, that contain the needed texture informations for the program to function properly. See the WAD folder for further information.
At the moment arcs can be generated by either dropping a map file or a previously created settings file (that has the same name as the mapfile) onto the program executable.
When dropping the map onto the exe, the program will use internal or external (default.txt in root folder) default settings for the arc generation process, instead of your own custom arc settings.
- The only command that is crucial to generate an ARC, is “rad”. Every rad command, stands for one arc object.
- You can generate multiple arcs from the same map-file. To do this, just add more than one rad command.
- The Order of the commands specifies to which arc object they belong.
- If there are e.g. 5 “rad”-commands, you only need to specify one optional command (offset, res, type, arc, obj).
The following arc objects then share the settings of the first arc, use default values or automatically generate them from previous values.
- If there are e.g. more “res”-commands than “rad”-commands, the redundant res-commands will be ignored.
- Commands can be commented out like this: “// rad 1024”
Setting File #1
rad 0 // Arc #2
arc 90 // Both arcs will only output 90 degree (25%) of the whole generated arc (360 deg)
offset 256 // Arc #2 will be 256 units wider than #1
res 24 // Arc #1 will have 24 sides
res 0 // Arc #2 will maintain the level of detail of the first Arc.
type 0 // Both arcs will use the “Pi” method for their construction
|rad||float||+0||This specifies the arcs radius and is at the same time the “representative” for this arc. Each rad command stands for one arc, that is to be generated.
[rad = 0] original radius (y-coord)
[rad > 0] custom arc radius in game units
|offset||float||+/-0||[offset = 0] additional offset on top of radius in game units|
|res||integer||4-384||Number of arc sides. Minimum: 4.
[res = 0] Maintains “level of detail” from previous arc. Default number of sides if first arc: 8.
|type||integer||0-2||Construction type for the generated objects.
[type = 0] Pi Circle
[type = 1] Grid Circle
[type = 2] Path from path file (TBD)
|shift||integer||0-4||Horizontal texture shift mode.
[shift = 0] Nullshift
[shift = 1] Per Section
[shift = 2] Per Brush
[shift = 3] Per Brush Texture
[shift = 4] Aligned Left(Section)
|height||float||+0||Adds custom height to each section of greater than zero (stair steps).
[height > 0] Custom height is being added to each section.
|ramp||integer||0-2||Creates a ramp if height command is greater than zero.
[ramp = 0] OFF
[ramp = 1] Linear Ramp Mode
[ramp = 2] Smooth Ramp Mode
|round||bool||0/1||Rounds all coordinates to integer numbers.
[round = 0] OFF
[round = 1] ON
|tri||bool||0/1||Triangulation for 6 sided brushes with planar front and back-face.
Brushes which don’t match the criteria won’t be processed and exported.
[tri = 0] OFF
[tri = 1] ON
|obj||bool||0/1||Exports individual arcs as OBJ files.
[obj = 0] OFF
[obj = 1] ON
- Brushwork has to be horizontally aligned along the X-axis and can be anywhere on the map, but should be on the top side of the Y-axis. If some vertices of the map-brushes are below 0 on the Y axis, the source object will always be moved above 0 on the Y-axis for arc generation.
- Cutting Edges have to be planar.
- Slopes along the X-axis will lead to an invalid brush.
- Texture Rotations other than 0, 90, 180, 270, etc. will be automatically aligned to “World”.
- There can be Solid Entities and World Brushes in a Map file.
- Point Entities are being ignored.
Mesh criteria for arc generation:
- No sloped faces along the X-axis.
- Planar cutting edge faces.
Valid brush lengths:
Brushes can have any length on the X-axis.
Some valid brush profiles:
Brushes can be anywhere on the map, but will be moved above 0 on the Y-axis before arc generation.
- On body faces (all faces along X-axis) only the texture rotations/alignments: 0,90,180 and 270.
- Cutting edge faces can have any rotation/alignment.
- Each face can have any Scale and Shift.
Solid entities are being supported by Map2Curve. It is advised to turn anything into a solid entity (e.g. func_detail or func_wall) for a better brush-handling in the editor.
Point entities are currently not supported but might be added in a future update.
- “rad 0” will use the original mesh position from the map file, as long as it is above 0. Otherwise, it is moved above 0 on the Y-axis before the arc is being generated.
- Each radius (rad) command in a Map2Curve setting file corresponds to one arc.
- A setting file can consists of only one rad command. Anything else will be filled with default values by the program.
- Each arc defined in a settings file will always use the same base mesh from the loaded map file.
- Resolutions for PI Circles are always divisible by 4. Everything else will be rounded by the program.
At the moment the minimum resolution is 4.
- Resolutions for GRID Circles must be 12, 24, 48, 96, 192 or 384 or the appropiate ID: 1(12)…6(384)
Currently there are 2 ways the program generates arcs: Pi and Grid Circles. Both are very different.
Arc Type Properties
- PI (pi)
This uses pi to generate the contruction circles. This method will let you “arc” non-rectangular brushes (e.g. pipes), without the need of using triangles.
– Even length of each section
– Perfect circle
– The resulting floating point coordinates are not easy to work with (but can be compiled flawlessly in most cases and can be rounded to integer numbers)
This uses a special construction method, where the basic circle was rotated by 15 degrees, scaled to the nearest grid and then its vertices were snapped to the nearest grid. For a 12-sided circle with a radius of 128, this gridsize would be 32. By doing this, the resulting arc brushes won’t need any triangles to be planar either AND can even have integer coordinates, which can be handled a lot easier than floating point coordinates of course.
– The coordinates can be integer and are thus very comfortable to work with.
– Cutting edges are easier to work with.
– When arcing smaller brushes at high resolutions floating point coordinates (e.g. 0.5, 0.25, 0.125, 0.0625, etc.) are possible and can’t be rounded to integer numbers that easily without deforming the mesh and making the “Grid” type pointless.
– Not a perfect circle, rather oval.
– Sections don’t share the same length.
- The original generated vertice coordinates have floating point precision and are thus off grid.
- “Round 1” rounds these coordinates to integer numbers, which can be handled easier in an Editor because they are on grid.
Ramps are created by combining the commands height, tri and ramp.
- While height adds a custom height (32) to each section…
- …tri 1 splits up the brushes into wedges, which is crucial for the sloped brushes to be loaded flawlessly by a Goldsource map editor.
- ramp 1, in the end, creates the actual ramp, with a linear slope. Ramp 2 would create a smooth slope.
Ramp (Slope) Mode
- ramp 1 creates a linear slope.
- ramp 2 creates a smooth slope.
- Using Triangulation on an Arc is crucial for ramp generation!
- Triangulation will currently only work on brushes that have 6 faces (cuboids) and an upright front and back face!
Map2Curve reads texture information from imported brush faces and uses them to calculate the new generated textures, aka rotate them, re-scale them and move them horizontally along the respective brush/arc edges.
In Order to do this, source textures need to meet certain criteria in terms of texture rotations/alignments.
There are several ways textures can be arranged on the generated arc brushes horizontally:
- Shift 0 [Null] – Simply puts all horizontal texture shifts to “0”.
- Shift 1 [Per Section] – All faces of a section share the same shift that is based on the longest edge length of that section.
- Shift 2 [Per Brush] – All faces of a brush share the same shift that is based on the longest edge length of that brush.
- Shift 3 [Per Brush Texture] – All faces of a brush, that share the same texture, will have the same shift, based on the longest edge length of that brush-texture.
- Shift 4 [Align Left] – All faces of a section are aligned to the left corner of this section.
OBJ is a 3D model exchange format. It can be imported and/or viewed in potentially any available 3D software.
Exporting a generated arc or ramp to OBJ can have multiple reasons and benefits. You might want to use it as reference when animating scenes in an external 3D software, other than a classic Goldsource editor.