<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
		<id>http://wiki.custommapmakers.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gsigms</id>
		<title>Custom Map Makers Wiki - User contributions [en-gb]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.custommapmakers.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gsigms"/>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Special:Contributions/Gsigms"/>
		<updated>2026-04-20T02:56:23Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=2023</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=2023"/>
				<updated>2012-01-30T09:22:11Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: /* Creating the clip model map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip CMC] is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automatically insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licensed under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
For Python versions prior to 2.7, easy_install is a convenient way to install python library (may require root privileges).&lt;br /&gt;
&lt;br /&gt;
    easy_install argparse&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip Download CMC] from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create a new map, import the model to clip for reference and place its origin at the centre of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instructs CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instructs CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Mapping:Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In this example we have a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in an awkward fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the centre of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will become handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
     qer_trans .4&lt;br /&gt;
     surfaceparm nodamage&lt;br /&gt;
     surfaceparm nodraw&lt;br /&gt;
     surfaceparm nolightmap&lt;br /&gt;
     surfaceparm trans&lt;br /&gt;
     surfaceparm nomarks&lt;br /&gt;
     surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px|Cmc-clip-model.png]]&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it anyway.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may want to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that has at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;br /&gt;
&lt;br /&gt;
== Maps built with CMC ==&lt;br /&gt;
&lt;br /&gt;
* '''Azurea''': ut4_azurea_a1 is a jump map and the main motivation for building CMC. The flameholders that are also used in this tutorial have been clipped with CMC.&lt;br /&gt;
* '''Bus Stop''': ut4_bus_stop_b2 is a frag map by JohnnyEnglish. Johnny used CMC to clip various models (buses, seats, garbages).&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1982</id>
		<title>Css</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1982"/>
				<updated>2012-01-06T14:45:57Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: /* Success Stories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CSS ==&lt;br /&gt;
CSS is an experimental modification of [[Compiling:q3map2 | q3map2]] 2.5.16 map compiler. It allows to selectively strip drawSurfaces from the bsp generated by q3map2. CSS introduces a new shader surfaceparm directive called &amp;quot;strip&amp;quot;. This directive instructs the q3map2 modified compiler to remove any surface textured with &amp;quot;strip&amp;quot; shaders from the bsp after the light stage.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you waste hours of compilation for a broken bsp}}&lt;br /&gt;
&lt;br /&gt;
=== Use Case ===&lt;br /&gt;
An interesting application of CSS is for maps that use invisible, non solid, light emitting shaders like the one below (the stage defines a fully transparent surface):&lt;br /&gt;
&lt;br /&gt;
    textures/mytextures/light_white_1k&lt;br /&gt;
    {&lt;br /&gt;
      q3map_lightRGB 1.0 1.0 1.0&lt;br /&gt;
      q3map_surfacelight 1000&lt;br /&gt;
      &lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm nonsolid&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      {&lt;br /&gt;
        map $whiteimage&lt;br /&gt;
        alphaFunc GE128&lt;br /&gt;
        alphaGen const 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Considering lights in Urbanterror are computed at compile time, surface painted with this shader have no effect ingame. With the addition of the '''surfaceparm strip''' directive, CSS can remove surface using this shader from the bsp generated by q3map in order to improve ingame performance (see test case below)&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
As of today, CSS does not remove the surface definitions from bsp files, It only invalidates references to stripped surfaces from the leaf nodes of the bsp trees.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Download CSS. CSS is provided as a single patch file for q3map2 2.5.16 source (CSS modifies 2 files, eg, game_quake3.h and light.c).&lt;br /&gt;
&lt;br /&gt;
Place the downloaded file in your q3map2 source directory &amp;quot;tools/quake3/q3map2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Apply the patch to your q3map2 source using the patch command line tool (screw you windows' users)&lt;br /&gt;
&lt;br /&gt;
    patch -p0 css.patch&lt;br /&gt;
&lt;br /&gt;
Recompile q3map2 (from the root directory of the source tree):&lt;br /&gt;
&lt;br /&gt;
    scons target=q3map2&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
Add the '''surfaceparm strip''' directive to shader to strip out of the bsp. Beware, stripping structural or visible surfaces may hold unexpected results.&lt;br /&gt;
&lt;br /&gt;
Compile the bsp and vis stage as usual. Add the '''-strip''' options for the light stage of your compilation:&lt;br /&gt;
&lt;br /&gt;
    q3map2 -threads X ... -light ... -strip path/to/map.bsp&lt;br /&gt;
&lt;br /&gt;
== Maps compiled with CSS ==&lt;br /&gt;
&lt;br /&gt;
* '''Azurea'''. ut4_azurea_a1 is a jump map and the main motivation for CSS.&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1981</id>
		<title>Css</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1981"/>
				<updated>2012-01-06T14:44:32Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CSS ==&lt;br /&gt;
CSS is an experimental modification of [[Compiling:q3map2 | q3map2]] 2.5.16 map compiler. It allows to selectively strip drawSurfaces from the bsp generated by q3map2. CSS introduces a new shader surfaceparm directive called &amp;quot;strip&amp;quot;. This directive instructs the q3map2 modified compiler to remove any surface textured with &amp;quot;strip&amp;quot; shaders from the bsp after the light stage.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you waste hours of compilation for a broken bsp}}&lt;br /&gt;
&lt;br /&gt;
=== Use Case ===&lt;br /&gt;
An interesting application of CSS is for maps that use invisible, non solid, light emitting shaders like the one below (the stage defines a fully transparent surface):&lt;br /&gt;
&lt;br /&gt;
    textures/mytextures/light_white_1k&lt;br /&gt;
    {&lt;br /&gt;
      q3map_lightRGB 1.0 1.0 1.0&lt;br /&gt;
      q3map_surfacelight 1000&lt;br /&gt;
      &lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm nonsolid&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      {&lt;br /&gt;
        map $whiteimage&lt;br /&gt;
        alphaFunc GE128&lt;br /&gt;
        alphaGen const 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Considering lights in Urbanterror are computed at compile time, surface painted with this shader have no effect ingame. With the addition of the '''surfaceparm strip''' directive, CSS can remove surface using this shader from the bsp generated by q3map in order to improve ingame performance (see test case below)&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
As of today, CSS does not remove the surface definitions from bsp files, It only invalidates references to stripped surfaces from the leaf nodes of the bsp trees.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Download CSS. CSS is provided as a single patch file for q3map2 2.5.16 source (CSS modifies 2 files, eg, game_quake3.h and light.c).&lt;br /&gt;
&lt;br /&gt;
Place the downloaded file in your q3map2 source directory &amp;quot;tools/quake3/q3map2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Apply the patch to your q3map2 source using the patch command line tool (screw you windows' users)&lt;br /&gt;
&lt;br /&gt;
    patch -p0 css.patch&lt;br /&gt;
&lt;br /&gt;
Recompile q3map2 (from the root directory of the source tree):&lt;br /&gt;
&lt;br /&gt;
    scons target=q3map2&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
Add the '''surfaceparm strip''' directive to shader to strip out of the bsp. Beware, stripping structural or visible surfaces may hold unexpected results.&lt;br /&gt;
&lt;br /&gt;
Compile the bsp and vis stage as usual. Add the '''-strip''' options for the light stage of your compilation:&lt;br /&gt;
&lt;br /&gt;
    q3map2 -threads X ... -light ... -strip path/to/map.bsp&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
&lt;br /&gt;
The CSS modification has been used for the creation of various maps:&lt;br /&gt;
&lt;br /&gt;
=== ut4_azurea_a1 ===&lt;br /&gt;
&lt;br /&gt;
This project is the main motivation for the creation of CSS.&lt;br /&gt;
&lt;br /&gt;
screenshots etc&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1980</id>
		<title>Css</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1980"/>
				<updated>2012-01-06T14:43:26Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: /* Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CSS ==&lt;br /&gt;
CSS is an experimental modification of [[Compiling:q3map2 | q3map2]] 2.5.16 map compiler. It allows to selectively strip drawSurfaces from the bsp generated by q3map2. CSS introduces a new shader surfaceparm directive called &amp;quot;strip&amp;quot;. This directive instructs the q3map2 modified compiler to remove any surface textured with &amp;quot;strip&amp;quot; shaders from the bsp after the light stage.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you waste hours of compilation for a broken bsp}}&lt;br /&gt;
&lt;br /&gt;
=== Use Case ===&lt;br /&gt;
An interesting application of CSS is for maps that use invisible, non solid, light emitting shaders like the one below (the stage defines a fully transparent surface):&lt;br /&gt;
&lt;br /&gt;
    textures/mytextures/light_white_1k&lt;br /&gt;
    {&lt;br /&gt;
      q3map_lightRGB 1.0 1.0 1.0&lt;br /&gt;
      q3map_surfacelight 1000&lt;br /&gt;
      &lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm nonsolid&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      {&lt;br /&gt;
        map $whiteimage&lt;br /&gt;
        alphaFunc GE128&lt;br /&gt;
        alphaGen const 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Considering lights in Urbanterror are computed at compile time, surface painted with this shader have no effect ingame. With the addition of the '''surfaceparm strip''' directive, CSS can remove surface using this shader from the bsp generated by q3map in order to improve ingame performance (see test case below)&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
As of today, CSS does not remove the surface definitions from bsp files, It only invalidates references to stripped surfaces from the leaf nodes of the bsp trees.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Download CSS. CSS is provided as a single patch file for q3map2 2.5.16 source (CSS modifies 2 files, eg, game_quake3.h and light.c).&lt;br /&gt;
&lt;br /&gt;
Place the downloaded file in your q3map2 source directory &amp;quot;tools/quake3/q3map2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Apply the patch to your q3map2 source using the patch command line tool (screw you windows' users)&lt;br /&gt;
&lt;br /&gt;
    patch -p0 css.patch&lt;br /&gt;
&lt;br /&gt;
Recompile q3map2 (from the root directory of the source tree):&lt;br /&gt;
&lt;br /&gt;
    scons target=q3map2&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
Add the surfaceparm strip directive to shader to strip out of the bsp.&lt;br /&gt;
&lt;br /&gt;
Compile the bsp and vis stage as usual. Add the '''-strip''' options for the light stage of your compilation:&lt;br /&gt;
&lt;br /&gt;
    q3map2 -threads X ... -light ... -strip path/to/map.bsp&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
&lt;br /&gt;
The CSS modification has been used for the creation of various maps:&lt;br /&gt;
&lt;br /&gt;
=== ut4_azurea_a1 ===&lt;br /&gt;
&lt;br /&gt;
This project is the main motivation for the creation of CSS.&lt;br /&gt;
&lt;br /&gt;
screenshots etc&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1979</id>
		<title>Css</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1979"/>
				<updated>2012-01-06T14:42:59Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: /* Use Case */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CSS ==&lt;br /&gt;
CSS is an experimental modification of [[Compiling:q3map2 | q3map2]] 2.5.16 map compiler. It allows to selectively strip drawSurfaces from the bsp generated by q3map2. CSS introduces a new shader surfaceparm directive called &amp;quot;strip&amp;quot;. This directive instructs the q3map2 modified compiler to remove any surface textured with &amp;quot;strip&amp;quot; shaders from the bsp after the light stage.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you waste hours of compilation for a broken bsp}}&lt;br /&gt;
&lt;br /&gt;
=== Use Case ===&lt;br /&gt;
An interesting application of CSS is for maps that use invisible, non solid, light emitting shaders like the one below (the stage defines a fully transparent surface):&lt;br /&gt;
&lt;br /&gt;
    textures/mytextures/light_white_1k&lt;br /&gt;
    {&lt;br /&gt;
      q3map_lightRGB 1.0 1.0 1.0&lt;br /&gt;
      q3map_surfacelight 1000&lt;br /&gt;
      &lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm nonsolid&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      {&lt;br /&gt;
        map $whiteimage&lt;br /&gt;
        alphaFunc GE128&lt;br /&gt;
        alphaGen const 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Considering lights in Urbanterror are computed at compile time, surface painted with this shader have no effect ingame. With the addition of the '''surfaceparm strip''' directive, CSS can remove surface using this shader from the bsp generated by q3map in order to improve ingame performance (see test case below)&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
As of today, CSS does not remove the surface definitions from bsp files, It only invalidates references to stripped surfaces from the leaf nodes of the bsp trees.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Download CSS. CSS is provided as a single patch file for q3map2 2.5.16 source (CSS modifies 2 files, eg, game_quake3.h and light.c).&lt;br /&gt;
&lt;br /&gt;
Place the downloaded file in your q3map2 source directory &amp;quot;tools/quake3/q3map2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Apply the patch to your q3map2 source using the patch command line tool (screw you windows' users)&lt;br /&gt;
&lt;br /&gt;
    patch -p0 css.patch&lt;br /&gt;
&lt;br /&gt;
Recompile q3map2 (from the root directory of the source tree):&lt;br /&gt;
&lt;br /&gt;
    scons target=q3map2&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
Add the surfaceparm strip directive to shader to strip out of the bsp.&lt;br /&gt;
&lt;br /&gt;
Compile the bsp and vis stage as usual. Add the &amp;quot;-strip&amp;quot; options for the light stage of your compilation:&lt;br /&gt;
&lt;br /&gt;
    q3map2 -threads X ... -light ... -strip path/to/map.bsp&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
&lt;br /&gt;
The CSS modification has been used for the creation of various maps:&lt;br /&gt;
&lt;br /&gt;
=== ut4_azurea_a1 ===&lt;br /&gt;
&lt;br /&gt;
This project is the main motivation for the creation of CSS.&lt;br /&gt;
&lt;br /&gt;
screenshots etc&lt;br /&gt;
&lt;br /&gt;
[[Category:Compiling]]&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1978</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1978"/>
				<updated>2012-01-06T14:42:00Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip CMC] is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automatically insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licensed under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
For Python versions prior to 2.7, easy_install is a convenient way to install python library (may require root privileges).&lt;br /&gt;
&lt;br /&gt;
    easy_install argparse&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip Download CMC] from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create a new map, import the model to clip for reference and place its origin at the centre of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instructs CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instructs CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Mapping:Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In this example we have a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in an awkward fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the centre of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will become handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
     qer_trans .4&lt;br /&gt;
     surfaceparm nodraw&lt;br /&gt;
     surfaceparm nolightmap&lt;br /&gt;
     surfaceparm trans&lt;br /&gt;
     surfaceparm nomarks&lt;br /&gt;
     surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px|Cmc-clip-model.png]]&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it anyway.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may want to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that has at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;br /&gt;
&lt;br /&gt;
== Maps built with CMC ==&lt;br /&gt;
&lt;br /&gt;
* '''Azurea''': ut4_azurea_a1 is a jump map and the main motivation for building CMC. The flameholders that are also used in this tutorial have been clipped with CMC.&lt;br /&gt;
* '''Bus Stop''': ut4_bus_stop_b2 is a frag map by JohnnyEnglish. Johnny used CMC to clip various models (buses, seats, garbages).&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1630</id>
		<title>Css</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1630"/>
				<updated>2011-10-04T16:23:24Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CSS ==&lt;br /&gt;
CSS is an experimental modification of [[Compiling:q3map2 | q3map2]] 2.5.16 map compiler. It allows to selectively strip drawSurfaces from the bsp generated by q3map2. CSS introduces a new shader surfaceparm directive called &amp;quot;strip&amp;quot;. This directive instructs the q3map2 modified compiler to remove any surface textured with &amp;quot;strip&amp;quot; shaders from the bsp after the light stage.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you waste hours of compilation for a broken bsp}}&lt;br /&gt;
&lt;br /&gt;
=== Use Case ===&lt;br /&gt;
An interesting application of CSS is for maps that use invisible, non solid, light emitting shaders like the one below (the stage defines a fully transparent surface):&lt;br /&gt;
&lt;br /&gt;
    textures/mytextures/light_white_1k&lt;br /&gt;
    {&lt;br /&gt;
      q3map_lightRGB 1.0 1.0 1.0&lt;br /&gt;
      q3map_surfacelight 1000&lt;br /&gt;
      &lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm nonsolid&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      {&lt;br /&gt;
        map $whiteimage&lt;br /&gt;
        alphaFunc GE128&lt;br /&gt;
        alphaGen const 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Considering lights in Urbanterror are computed at compile time, surface painted with this shader have no effect ingame. With the addition of the surfaceparm strip, CSS can remove surface using this shader from the bsp generated by q3map in order to improve ingame performance (see test case below)&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
As of today, CSS does not remove the surface definitions from bsp files, It only invalidates references to stripped surfaces from the leaf nodes of the bsp trees.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Download CSS. CSS is provided as a single patch file for q3map2 2.5.16 source (CSS modifies 2 files, eg, game_quake3.h and light.c).&lt;br /&gt;
&lt;br /&gt;
Place the downloaded file in your q3map2 source directory &amp;quot;tools/quake3/q3map2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Apply the patch to your q3map2 source using the patch command line tool (screw you windows' users)&lt;br /&gt;
&lt;br /&gt;
    patch -p0 css.patch&lt;br /&gt;
&lt;br /&gt;
Recompile q3map2 (from the root directory of the source tree):&lt;br /&gt;
&lt;br /&gt;
    scons target=q3map2&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
Add the surfaceparm strip directive to shader to strip out of the bsp.&lt;br /&gt;
&lt;br /&gt;
Compile the bsp and vis stage as usual. Add the &amp;quot;-strip&amp;quot; options for the light stage of your compilation:&lt;br /&gt;
&lt;br /&gt;
    q3map2 -threads X ... -light ... -strip path/to/map.bsp&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
&lt;br /&gt;
The CSS modification has been used for the creation of various maps:&lt;br /&gt;
&lt;br /&gt;
=== ut4_azurea_a1 ===&lt;br /&gt;
&lt;br /&gt;
This project is the main motivation for the creation of CSS.&lt;br /&gt;
&lt;br /&gt;
screenshots etc&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1629</id>
		<title>Css</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1629"/>
				<updated>2011-10-04T14:40:31Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CSS ==&lt;br /&gt;
CSS is an experimental modification of [[Compiling:q3map2 | q3map2]] 2.5.17 map compiler. It allows to selectively strip drawSurfaces from the bsp generated by q3map2. CSS introduces a new shader surfaceparm directive called &amp;quot;strip&amp;quot;. This directive instructs the q3map2 modified compiler to remove any surface textured with &amp;quot;strip&amp;quot; shaders from the bsp after the light stage.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you waste hours of compilation for a broken bsp}}&lt;br /&gt;
&lt;br /&gt;
=== Use Case ===&lt;br /&gt;
An interesting application of CSS is for maps that use invisible, non solid, light emitting shaders like the one below (the stage defines a fully transparent surface):&lt;br /&gt;
&lt;br /&gt;
    textures/mytextures/light_white_1k&lt;br /&gt;
    {&lt;br /&gt;
      q3map_lightRGB 1.0 1.0 1.0&lt;br /&gt;
      q3map_surfacelight 1000&lt;br /&gt;
      &lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm nonsolid&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      {&lt;br /&gt;
        map $whiteimage&lt;br /&gt;
        alphaFunc GE128&lt;br /&gt;
        alphaGen const 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Considering lights in Urbanterror are computed at compile time, surface painted with this shader have no effect ingame. With the addition of the surfaceparm strip, CSS can remove surface using this shader from the bsp generated by q3map in order to improve ingame performance (see test case below)&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
As of today, CSS does not remove the surface definitions from bsp files, It only invalidates references to stripped surfaces from the leaf nodes of the bsp trees.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Download CSS. CSS is provided as a single patch file for q3map2 2.5.17 source (CSS modifies 2 files, eg, game_quake3.h and light.c).&lt;br /&gt;
&lt;br /&gt;
Place the downloaded file in your q3map2 source directory &amp;quot;tools/quake3/q3map2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Apply the patch to your q3map2 source using the patch command line tool (screw you windows' users)&lt;br /&gt;
&lt;br /&gt;
    patch -p0 css.patch&lt;br /&gt;
&lt;br /&gt;
Recompile q3map2 (from the root directory of the source tree):&lt;br /&gt;
&lt;br /&gt;
    scons target=q3map2&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
Add the surfaceparm strip directive to shader to strip out of the bsp.&lt;br /&gt;
&lt;br /&gt;
Compile the bsp and vis stage as usual. Add the &amp;quot;-strip&amp;quot; options for the light stage of your compilation:&lt;br /&gt;
&lt;br /&gt;
    q3map2 -threads X ... -light ... -strip path/to/map.bsp&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
&lt;br /&gt;
The CSS modification has been used for the creation of various maps:&lt;br /&gt;
&lt;br /&gt;
=== ut4_azurea_a1 ===&lt;br /&gt;
&lt;br /&gt;
This project is the main motivation for the creation of CSS.&lt;br /&gt;
&lt;br /&gt;
screenshots etc&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1628</id>
		<title>Css</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Css&amp;diff=1628"/>
				<updated>2011-10-04T14:37:59Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: Created page with &amp;quot;== CSS == CSS is an experimental modification of  q3map2 2.5.17 map compiler. It allows to selectively strip drawSurfaces from the bsp generated by q3map2. ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CSS ==&lt;br /&gt;
CSS is an experimental modification of [[Compiling:q3map2 | q3map2]] 2.5.17 map compiler. It allows to selectively strip drawSurfaces from the bsp generated by q3map2. CSS introduces a new shader surfaceparm directive called &amp;quot;strip&amp;quot;. This directive instructs the q3map2 modified compiler to remove any surface textured with &amp;quot;strip&amp;quot; shaders from the bsp after the light stage.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you waste hours of compilation for a broken bsp}}&lt;br /&gt;
&lt;br /&gt;
=== Use Case ===&lt;br /&gt;
An interesting application of CSS is for maps that use invisible, non solid, light emitting shaders like the one below (the stage defines a fully transparent surface):&lt;br /&gt;
&lt;br /&gt;
    textures/mytextures/light_white_1k&lt;br /&gt;
    {&lt;br /&gt;
      q3map_lightRGB 1.0 1.0 1.0&lt;br /&gt;
      q3map_surfacelight 1000&lt;br /&gt;
      &lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm nonsolid&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      {&lt;br /&gt;
        map $whiteimage&lt;br /&gt;
        alphaFunc GE128&lt;br /&gt;
        alphaGen const 0&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Considering lights in Urbanterror are computed at compile time, surface painted with this shader have no effect ingame. With the addition of the surfaceparm strip, CSS can remove surface using this shader from the bsp generated by q3map in order to improve ingame performance (see test case below)&lt;br /&gt;
&lt;br /&gt;
=== Internals ===&lt;br /&gt;
As of today, CSS does not remove the surface definitions from bsp files, It only invalidates references to stripped surfaces from the leaf nodes of the bsp trees.&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
Download CSS. CSS is provided as a single patch file.&lt;br /&gt;
&lt;br /&gt;
Place the downloaded file in your q3map2 source directory &amp;quot;tools/quake3/q3map2/&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Apply the patch to your q3map2 source using the patch command line tool (screw you windows' users)&lt;br /&gt;
&lt;br /&gt;
    patch -p0 css.patch&lt;br /&gt;
&lt;br /&gt;
Recompile q3map2 (from the root directory of the source tree):&lt;br /&gt;
&lt;br /&gt;
    scons target=q3map2&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
Add the surfaceparm strip directive to shader to strip out of the bsp.&lt;br /&gt;
&lt;br /&gt;
Compile the bsp and vis stage as usual. Add the &amp;quot;-strip&amp;quot; options for the light stage of your compilation:&lt;br /&gt;
&lt;br /&gt;
    q3map2 -threads X ... -light ... -strip path/to/map.bsp&lt;br /&gt;
&lt;br /&gt;
== Success Stories ==&lt;br /&gt;
&lt;br /&gt;
The CSS modification has been used for the creation of various maps:&lt;br /&gt;
&lt;br /&gt;
=== ut4_azurea_a1 ===&lt;br /&gt;
&lt;br /&gt;
This project is the main motivation for the creation of CSS.&lt;br /&gt;
&lt;br /&gt;
screenshots etc&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1573</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1573"/>
				<updated>2011-09-16T13:42:10Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: /* Creating the clip model map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip CMC] is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automatically insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licensed under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
For Python versions prior to 2.7, easy_install is a convenient way to install python library (may require root privileges).&lt;br /&gt;
&lt;br /&gt;
    easy_install argparse&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip Download CMC] from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create a new map, import the model to clip for reference and place its origin at the centre of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instructs CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instructs CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Mapping:Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In this example we have a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in an awkward fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the centre of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will become handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
     qer_trans .4&lt;br /&gt;
     surfaceparm nodraw&lt;br /&gt;
     surfaceparm nolightmap&lt;br /&gt;
     surfaceparm trans&lt;br /&gt;
     surfaceparm nomarks&lt;br /&gt;
     surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px|Cmc-clip-model.png]]&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it anyway.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may want to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that has at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1572</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1572"/>
				<updated>2011-09-16T13:39:39Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: /* Requirements */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip CMC] is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automatically insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licensed under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requirements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
For Python versions prior to 2.7, easy_install is a convenient way to install python library (may require root privileges).&lt;br /&gt;
&lt;br /&gt;
    easy_install argparse&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip Download CMC] from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create a new map, import the model to clip for reference and place its origin at the centre of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instructs CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instructs CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Mapping:Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In this example we have a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in an awkward fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the centre of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will become handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
     qer_trans .4&lt;br /&gt;
     surfaceparm nodraw&lt;br /&gt;
     surfaceparm nolightmap&lt;br /&gt;
     surfaceparm trans&lt;br /&gt;
     surfaceparm nomarks&lt;br /&gt;
     surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it anyway.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px|Cmc-clip-model.png]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may want to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that has at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1493</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1493"/>
				<updated>2011-09-09T13:31:47Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip CMC] is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip Download CMC] from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
     qer_trans .4&lt;br /&gt;
     surfaceparm nodraw&lt;br /&gt;
     surfaceparm nolightmap&lt;br /&gt;
     surfaceparm trans&lt;br /&gt;
     surfaceparm nomarks&lt;br /&gt;
     surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it anyway.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px|Cmc-clip-model.png]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1492</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1492"/>
				<updated>2011-09-09T12:32:26Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip CMC] is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip Download CMC] from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
    {&lt;br /&gt;
      qer_trans .4&lt;br /&gt;
      surfaceparm nodraw&lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      surfaceparm nomarks&lt;br /&gt;
      surfaceparm slick&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1491</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1491"/>
				<updated>2011-09-09T12:24:37Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip CMC] is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip Download CMC] from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
    {&lt;br /&gt;
      qer_trans .4&lt;br /&gt;
      surfaceparm nodraw&lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      surfaceparm nomarks&lt;br /&gt;
      surfaceparm slick&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1490</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1490"/>
				<updated>2011-09-09T12:24:11Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
[http://www.custommapmakers.org/storage/resources/cmc.zip Download CMC] from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
    {&lt;br /&gt;
      qer_trans .4&lt;br /&gt;
      surfaceparm nodraw&lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      surfaceparm nomarks&lt;br /&gt;
      surfaceparm slick&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1489</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1489"/>
				<updated>2011-09-09T12:21:12Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
    {&lt;br /&gt;
      qer_trans .4&lt;br /&gt;
      surfaceparm nodraw&lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      surfaceparm nomarks&lt;br /&gt;
      surfaceparm slick&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     --output maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1488</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1488"/>
				<updated>2011-09-09T12:20:55Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
    {&lt;br /&gt;
      qer_trans .4&lt;br /&gt;
      surfaceparm nodraw&lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      surfaceparm nomarks&lt;br /&gt;
      surfaceparm slick&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
      -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1487</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1487"/>
				<updated>2011-09-09T12:20:42Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
  Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
  positional arguments:&lt;br /&gt;
    ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
  optional arguments:&lt;br /&gt;
    -h, --help            show this help message and exit&lt;br /&gt;
    -ls, --list-shaders   list all shaders&lt;br /&gt;
    -c model:pattern, --clip model:pattern&lt;br /&gt;
               clip models with clip pattern file&lt;br /&gt;
    -u clip/shader, --unclip clip/shader&lt;br /&gt;
               delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
    -o ofilename, --output ofilename&lt;br /&gt;
               output file&lt;br /&gt;
    -d, --debug&lt;br /&gt;
    -v, --version&lt;br /&gt;
 &lt;br /&gt;
   I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
    {&lt;br /&gt;
      qer_trans .4&lt;br /&gt;
      surfaceparm nodraw&lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      surfaceparm nomarks&lt;br /&gt;
      surfaceparm slick&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
      -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1486</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1486"/>
				<updated>2011-09-09T12:19:58Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
    delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
    output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
    {&lt;br /&gt;
      qer_trans .4&lt;br /&gt;
      surfaceparm nodraw&lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      surfaceparm nomarks&lt;br /&gt;
      surfaceparm slick&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-clip-model.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
      -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1485</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1485"/>
				<updated>2011-09-09T12:19:30Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
    delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
    output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
 {&lt;br /&gt;
   qer_trans .4&lt;br /&gt;
   surfaceparm nodraw&lt;br /&gt;
   surfaceparm nolightmap&lt;br /&gt;
   surfaceparm trans&lt;br /&gt;
   surfaceparm nomarks&lt;br /&gt;
   surfaceparm slick&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:cmc-clip-model.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
      -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1484</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1484"/>
				<updated>2011-09-09T12:18:59Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
    delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
    output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
 {&lt;br /&gt;
   qer_trans .4&lt;br /&gt;
   surfaceparm nodraw&lt;br /&gt;
   surfaceparm nolightmap&lt;br /&gt;
   surfaceparm trans&lt;br /&gt;
   surfaceparm nomarks&lt;br /&gt;
   surfaceparm slick&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
[[File:cmc-clip-model.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
  -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
     -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=File:Cmc-clip-model.png&amp;diff=1483</id>
		<title>File:Cmc-clip-model.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=File:Cmc-clip-model.png&amp;diff=1483"/>
				<updated>2011-09-09T12:18:16Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: clip model&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;clip model&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1482</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1482"/>
				<updated>2011-09-09T12:17:28Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
 {&lt;br /&gt;
    qer_trans .4&lt;br /&gt;
    surfaceparm nodraw&lt;br /&gt;
    surfaceparm nolightmap&lt;br /&gt;
    surfaceparm trans&lt;br /&gt;
    surfaceparm nomarks&lt;br /&gt;
    surfaceparm slick&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
   -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1481</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1481"/>
				<updated>2011-09-09T12:17:09Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
 {&lt;br /&gt;
    qer_trans .4&lt;br /&gt;
    surfaceparm nodraw&lt;br /&gt;
    surfaceparm nolightmap&lt;br /&gt;
    surfaceparm trans&lt;br /&gt;
    surfaceparm nomarks&lt;br /&gt;
    surfaceparm slick&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1480</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1480"/>
				<updated>2011-09-09T12:16:33Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
 {&lt;br /&gt;
     qer_trans .4&lt;br /&gt;
     surfaceparm nodraw&lt;br /&gt;
     surfaceparm nolightmap&lt;br /&gt;
     surfaceparm trans&lt;br /&gt;
     surfaceparm nomarks&lt;br /&gt;
     surfaceparm slick&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-clip-map.png|thumb|center|700px|Cmc-test-clip-map.png]]&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1478</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1478"/>
				<updated>2011-09-09T12:16:13Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
  {&lt;br /&gt;
      qer_trans .4&lt;br /&gt;
      surfaceparm nodraw&lt;br /&gt;
      surfaceparm nolightmap&lt;br /&gt;
      surfaceparm trans&lt;br /&gt;
      surfaceparm nomarks&lt;br /&gt;
      surfaceparm slick&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
[[File:cmc-test-clip-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=File:Cmc-test-clip-map.png&amp;diff=1479</id>
		<title>File:Cmc-test-clip-map.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=File:Cmc-test-clip-map.png&amp;diff=1479"/>
				<updated>2011-09-09T12:16:13Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: Brazier clip model brushes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Brazier clip model brushes&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1477</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1477"/>
				<updated>2011-09-09T12:14:12Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|center|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1476</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1476"/>
				<updated>2011-09-09T12:13:49Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cmc-test-map.png|700px|thumb|c|center|x]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1475</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1475"/>
				<updated>2011-09-09T12:11:56Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|left|frame|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1474</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1474"/>
				<updated>2011-09-09T12:11:06Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|left|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1473</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1473"/>
				<updated>2011-09-09T12:10:38Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|left|700px|Cmc-test-map.png]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1472</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1472"/>
				<updated>2011-09-09T12:10:13Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:Cmc-test-map.png|thumb|left|700px]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1471</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1471"/>
				<updated>2011-09-09T12:09:52Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
[[File:cmc-test-map.png|700px|thumb|left|initial map]]&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=File:Cmc-test-map.png&amp;diff=1470</id>
		<title>File:Cmc-test-map.png</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=File:Cmc-test-map.png&amp;diff=1470"/>
				<updated>2011-09-09T12:08:50Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: cmc test map&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;cmc test map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1469</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1469"/>
				<updated>2011-09-09T12:07:01Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:models/mapobjects/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
    -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1468</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1468"/>
				<updated>2011-09-09T12:06:42Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip models/mapobjects/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;models/mapobjects/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:model/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1467</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1467"/>
				<updated>2011-09-09T11:55:14Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. The Zip archive contains a one file python program. Unzip and copy it to a conveniant location.&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:model/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1466</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1466"/>
				<updated>2011-09-09T11:54:09Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:model/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;br /&gt;
&lt;br /&gt;
You might realize later that your clip model brushes need some modifications. Or you may to add new instances of your model and want CMC to clip them for you. Sadly, as of today CMC has no way of tracking models that have been clipped or replace clip brushes with a new pattern. With CMC you must first remove the clip brushes before reapplying a new clip model else you map might have duplicated clip brushes.&lt;br /&gt;
&lt;br /&gt;
Hopefully, if you followed this tutorial recommendation to use a dedicated clip shader, CMC will help you do that. CMC allows you to remove every brush that have at least one face with a given shader from you map. To do that run the following command.&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --unclip textures/test/autoclip \&lt;br /&gt;
      -o maps/test_unclipped.map maps/test_clipped.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1465</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1465"/>
				<updated>2011-09-09T11:45:20Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:model/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
     -o maps/test_clipped.map maps/test.map&lt;br /&gt;
&lt;br /&gt;
If you followed this tutorial, you should now have a new map &amp;quot;test_clipped.map&amp;quot; where CMC has automatically insert the clip brushes over your model, as shown in our example.&lt;br /&gt;
&lt;br /&gt;
=== Because nothing is right the first time ===&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1464</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1464"/>
				<updated>2011-09-09T11:42:59Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:model/test/brazier.md3:maps/brazier_clip.map \&lt;br /&gt;
      -o maps/test_clipped.map maps/test.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1463</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1463"/>
				<updated>2011-09-09T11:42:41Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;br /&gt;
&lt;br /&gt;
From this point, let us assume you extracted the CMC script into your &amp;quot;q3ut4&amp;quot; directory. Relative to the current directory, your map file path should be &amp;quot;maps/test.map&amp;quot; and your clip model map should be &amp;quot;maps/brazier_clip.map&amp;quot; run the following command:&lt;br /&gt;
&lt;br /&gt;
    python ./cmc.py --clip:model/test/brazier.md3:maps/brazier_clip.map -o maps/test_clipped.map maps/test.map&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1462</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1462"/>
				<updated>2011-09-09T09:09:53Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                 clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
     delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
     output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will cover how to use CMC in order to clip a model semi-automatically. We will show how to do so in a way that facilitates modifying or removing the clip brushes even after modification of the map file.&lt;br /&gt;
&lt;br /&gt;
=== Set up ===&lt;br /&gt;
&lt;br /&gt;
For this tutorial, you need to set up a map &amp;quot;test.map&amp;quot;. This can be a simple rectangular room ([[Create your first room]]). Add a model into your map ([[Radiant:Using#How_to_add_a_model]]), this can be any kind of model (''eg,'' md3, ase). In our example is a rectangular room containing two instance of a brazier model &amp;quot;model/test/brazier.ase&amp;quot;. One instance is scaled/rotated in a awkard fashion, to illustrate CMC features.&lt;br /&gt;
&lt;br /&gt;
=== Creating the clip model map ===&lt;br /&gt;
&lt;br /&gt;
Let us now create a ''clip model map''. A ''clip model map'' is a set of brushes that CMC is going to use as a ''pattern'' to clip our brazier model into &amp;quot;test.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Create a new map called &amp;quot;brazier_clip.map&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
To help us draw our clip brushes, import one brazier model into the map, and place the model origin at the center of the map (''ie,'' coordinates (0 0 0)). It is important that the model must not be rotated or scaled here.&lt;br /&gt;
&lt;br /&gt;
Now create the clip brushes around your model. It is not necessary to precisely cover every detail of the model. The purpose of a clip is to be accurate enough without being too complex. In our example, only the rough form of the base has been clipped.&lt;br /&gt;
&lt;br /&gt;
Apply a &amp;quot;clip&amp;quot; shader to the newly created brushes. A clip shader is provided in the &amp;quot;common&amp;quot; shader script. But for CMC, we recommend using a dedicated shader only for CMC purpose. We will later see that this will come handy for future modifications. Here, we used a new shader called &amp;quot;textures/test/autoclip&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
    textures/test/autoclip&lt;br /&gt;
   {&lt;br /&gt;
       qer_trans .4&lt;br /&gt;
       surfaceparm nodraw&lt;br /&gt;
       surfaceparm nolightmap&lt;br /&gt;
       surfaceparm trans&lt;br /&gt;
       surfaceparm nomarks&lt;br /&gt;
       surfaceparm slick&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
You can optionally remove the brazier model. CMC will ignore it.&lt;br /&gt;
&lt;br /&gt;
Save the ''clip model'' map&lt;br /&gt;
&lt;br /&gt;
=== Clipping the map ===&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1461</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1461"/>
				<updated>2011-09-08T20:40:34Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                   clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
       delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
       output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1460</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1460"/>
				<updated>2011-09-08T20:40:10Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Creating a ''clip model'' ===&lt;br /&gt;
&lt;br /&gt;
Create an new map, import the model to clip for reference and place its origin at the center of the map (''ie,'' at coordinates 0 0 0), do not rotate or scale the model. Create the clip brush around your model, once finished you can remove the model and save the ''clip model'' map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                   clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
       delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
       output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1459</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1459"/>
				<updated>2011-09-08T20:21:21Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,'' a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                      clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
          delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
          output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
    --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
    --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
    --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1458</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1458"/>
				<updated>2011-09-08T20:21:04Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,&amp;amp;nbsp;''a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                       clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
           delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
           output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
     --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
     --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
     --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1457</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1457"/>
				<updated>2011-09-08T20:19:38Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,&amp;amp;nbsp;''a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                        clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
            delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
            output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1456</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1456"/>
				<updated>2011-09-08T20:18:59Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,&amp;amp;nbsp;''a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                        clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
            delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
            output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
     --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
     --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	<entry>
		<id>http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1455</id>
		<title>Cmc</title>
		<link rel="alternate" type="text/html" href="http://wiki.custommapmakers.org/index.php?title=Cmc&amp;diff=1455"/>
				<updated>2011-09-08T20:18:39Z</updated>
		
		<summary type="html">&lt;p&gt;Gsigms: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CMC ==&lt;br /&gt;
&lt;br /&gt;
CMC is a commandline tool for semi-automatic clipping of models for Q3map2 map files. The approach carried by CMC is to automaticaly insert clip brushes into a map file following a &amp;quot;clip model&amp;quot; (''ie,&amp;amp;nbsp;''a standalone map file) provided by the user. CMC consists of a python script and is licenced under beerware revision 42. Beware, the licence will be strongly enforced.&lt;br /&gt;
&lt;br /&gt;
{{Warning|Don't blame the tool if you forgot to backup your map...}}&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== Requierements ===&lt;br /&gt;
&lt;br /&gt;
CMC requires a working Python environment, and the argparse library (shipped with Python starting from version 2.7).&lt;br /&gt;
&lt;br /&gt;
=== Installation ===&lt;br /&gt;
&lt;br /&gt;
Download CMC from Custom Map Makers. And copy it to a conveniant location&lt;br /&gt;
&lt;br /&gt;
=== Commandline argument ===&lt;br /&gt;
&lt;br /&gt;
==== Getting help&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --help&lt;br /&gt;
&lt;br /&gt;
display a help message:&lt;br /&gt;
&lt;br /&gt;
  usage: cmc.py [-h] (-ls | -c model:pattern | -u clip/shader) [-o ofilename] [-d] [-v] ifile&lt;br /&gt;
 &lt;br /&gt;
 Q3map2 map model clipper&lt;br /&gt;
 &lt;br /&gt;
 positional arguments:&lt;br /&gt;
 ifile                 q3map2 map file&lt;br /&gt;
 &lt;br /&gt;
 optional arguments:&lt;br /&gt;
 -h, --help            show this help message and exit&lt;br /&gt;
 -ls, --list-shaders   list all shaders&lt;br /&gt;
 -c model:pattern, --clip model:pattern&lt;br /&gt;
                        clip models with clip pattern file&lt;br /&gt;
 -u clip/shader, --unclip clip/shader&lt;br /&gt;
            delete brushes using &amp;quot;clip/shader&amp;quot;&lt;br /&gt;
 -o ofilename, --output ofilename&lt;br /&gt;
            output file&lt;br /&gt;
 -d, --debug&lt;br /&gt;
 -v, --version&lt;br /&gt;
 &lt;br /&gt;
 I map therefore I am&lt;br /&gt;
&lt;br /&gt;
==== Clipping a model&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
      --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
This is the path to the map to process.&lt;br /&gt;
&lt;br /&gt;
    --output maps/mymap_clipped.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to output the new map into the file &amp;quot;maps/mymap_clipped.map&amp;quot; (highly recommended). Without this option, CMC will overwrite the input file&lt;br /&gt;
&lt;br /&gt;
    --clip model/mymodel/mymodel.md3:maps/clip_pattern.map&lt;br /&gt;
&lt;br /&gt;
This instruct CMC to clip every instance of model &amp;quot;model/mymodel/mymodel.md3&amp;quot; (This is not the path to the md3 file, but the model name as it appears in the entity window in GtkRadiant), according to the clip model from file maps/clip_pattern.map.&lt;br /&gt;
&lt;br /&gt;
==== Clipping multiple models at once&amp;lt;br/&amp;gt; ====&lt;br /&gt;
&lt;br /&gt;
    python cmc.py --clip model/mymodel/mymodel.md3:maps/clip_pattern.map \&lt;br /&gt;
 --clip model/mymodel/anothermodel.ase:maps/clip_anotherpattern.map&lt;br /&gt;
 --output maps/mymap_clipped.map maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
    maps/mymap.map&lt;br /&gt;
&lt;br /&gt;
CMC accepts any number of model/clip_pattern pair using multiple &amp;quot;--clip&amp;quot; options&lt;/div&gt;</summary>
		<author><name>Gsigms</name></author>	</entry>

	</feed>