Skip to content

Commit

Permalink
Start new manual section on reparenting primitives
Browse files Browse the repository at this point in the history
The operation of converting brushes and patches to/from func_static entities
has not yet been mentioned, so a new section to cover this has been added under
Basic Editing.
  • Loading branch information
Matthew Mott committed Feb 4, 2020
1 parent f971659 commit c7e288d
Show file tree
Hide file tree
Showing 2 changed files with 166 additions and 3 deletions.
67 changes: 67 additions & 0 deletions doc/manual.adoc
Expand Up @@ -989,6 +989,7 @@ insert an instance of the entity into the map at the right-clicked location. If
the selected entity type requires a brush selection and no brush is selected, a
warning will be shown at this point.

[[EntityInspector]]
==== Editing entity properties

Every entity has a list of key/value pairs known as _properties_ or _spawnargs_.
Expand Down Expand Up @@ -1041,6 +1042,72 @@ which shows a brief explanation of certain properties. If a property has help
text available, the question mark icon will be shown in the *?* column.
|===

=== Reparenting primitives

Whenever a new brush or patch is created, it will automatically be made a child
of the special *worldspawn* entity, which serves as the default entity
containing all of the primitives which define the world geometry. However,
*worldspawn* is not the only entity which can contain brushes and patches as
children.

When you create a model using the <<CreatingModels,model selector>>, DarkRadiant
will insert a type of entity called a *func_static* into the map to represent
the model geometry. A *func_static* can contain a model file loaded from disk in
LWO or ASE format, but it can also be used as a parent for one or more
primitives created within DarkRadiant. In either case, the behaviour of
*func_static* is the same: it represents a static mesh which is rendered in
game but is considered separate from the main world geometry, meaning that it
does not participate in map compilation, will not seal the map from leaks, and
will not cause intersecting brushes to be subdivided.

It is therefore often useful to make certain brushes and patches — typically
those which represent "fine detail" rather than entire walls, floors and the
like — into *func_static* entities to improve in-game performance and reduce the
chances for map compilation problems caused by excessively complex world
geometry.

==== Converting primitives into func_static

To convert one or more existing primitives into a *func_static* entity, simply
select all of the primitives, right-click in the 2D window, and choose *Convert
to func_static*.

After converting a primitive, a number of changes are noticeable:

. The primitive may be drawn in a different colour.
. The primitive will no longer be resizeable by dragging its boundary with the
mouse.
. When the primitive is selected, the *Entity Inspector* will no longer show the
*worldspawn* entity, but a new entity with a *classname* of `func_static`. You
can set spawnargs on this entity like any other (including giving it a custom
name).
. Selecting any primitive contained by a *func_static* will cause a small X/Y/Z
axis widget to be drawn at the entity's origin position (which may be inside one
of the primitives, or outside all of them, depending on their layout).
. If there are multiple primitives contained within a single entity, selecting
any individual primitive will cause all of the entity's primitives to be
selected.

==== Selecting individual child primitives

As mentioned in the previous section, selecting any primitive which comprises
part of a *func_static* will cause the entire entity and all of its child
primitives to be selected together. This allows you to easily move the entire
static object by simply dragging any one of its primitives.

However, it is still possible to perform operations on a single primitive, for
example resizing a brush, by selecting it with the *TAB* key. Each press of
*TAB* will cause DarkRadiant to select a different primitive contained within
the entity, after which it will return to selecting the entire entity. With only
a single primitive selected, all of the normal operations are possible on that
primitive, for example deleting or resizing it.

The <<EntityInspector,entity inspector>> widget makes it clear whether you have
selected an entity or a primitive within that entity, using the text above the
list of entity properties. If an entire entity is selected, the text will appear
similar to `Entity&nbsp;1`, whereas with a primitive selected it will read
`Entity&nbsp;1,&nbsp;Primitive&nbsp;1`.

=== Compiling a map

DarkRadiant does not include functionality for compiling a map into the form
Expand Down
102 changes: 99 additions & 3 deletions doc/manual.html
Expand Up @@ -482,7 +482,13 @@ <h1>DarkRadiant User Guide</h1>
<li><a href="#CreatingModels">Creating models</a></li>
<li><a href="#_creating_a_player_start_marker">Creating a player start marker</a></li>
<li><a href="#_creating_other_entity_types">Creating other entity types</a></li>
<li><a href="#_editing_entity_properties">Editing entity properties</a></li>
<li><a href="#EntityInspector">Editing entity properties</a></li>
</ul>
</li>
<li><a href="#_reparenting_primitives">Reparenting primitives</a>
<ul class="sectlevel3">
<li><a href="#_converting_primitives_into_func_static">Converting primitives into func_static</a></li>
<li><a href="#_selecting_individual_child_primitives">Selecting individual child primitives</a></li>
</ul>
</li>
<li><a href="#_compiling_a_map">Compiling a map</a>
Expand Down Expand Up @@ -2145,7 +2151,7 @@ <h4 id="_creating_other_entity_types">Creating other entity types</h4>
</div>
</div>
<div class="sect3">
<h4 id="_editing_entity_properties">Editing entity properties</h4>
<h4 id="EntityInspector">Editing entity properties</h4>
<div class="paragraph">
<p>Every entity has a list of key/value pairs known as <em>properties</em> or <em>spawnargs</em>.
These properties are displayed on the <strong>Entity</strong> tab of the editing panel.</p>
Expand Down Expand Up @@ -2232,6 +2238,96 @@ <h4 id="_editing_entity_properties">Editing entity properties</h4>
</div>
</div>
<div class="sect2">
<h3 id="_reparenting_primitives">Reparenting primitives</h3>
<div class="paragraph">
<p>Whenever a new brush or patch is created, it will automatically be made a child
of the special <strong>worldspawn</strong> entity, which serves as the default entity
containing all of the primitives which define the world geometry. However,
<strong>worldspawn</strong> is not the only entity which can contain brushes and patches as
children.</p>
</div>
<div class="paragraph">
<p>When you create a model using the <a href="#CreatingModels">model selector</a>, DarkRadiant
will insert a type of entity called a <strong>func_static</strong> into the map to represent
the model geometry. A <strong>func_static</strong> can contain a model file loaded from disk in
LWO or ASE format, but it can also be used as a parent for one or more
primitives created within DarkRadiant. In either case, the behaviour of
<strong>func_static</strong> is the same: it represents a static mesh which is rendered in
game but is considered separate from the main world geometry, meaning that it
does not participate in map compilation, will not seal the map from leaks, and
will not cause intersecting brushes to be subdivided.</p>
</div>
<div class="paragraph">
<p>It is therefore often useful to make certain brushes and patches — typically
those which represent "fine detail" rather than entire walls, floors and the
like — into <strong>func_static</strong> entities to improve in-game performance and reduce the
chances for map compilation problems caused by excessively complex world
geometry.</p>
</div>
<div class="sect3">
<h4 id="_converting_primitives_into_func_static">Converting primitives into func_static</h4>
<div class="paragraph">
<p>To convert one or more existing primitives into a <strong>func_static</strong> entity, simply
select all of the primitives, right-click in the 2D window, and choose <strong>Convert
to func_static</strong>.</p>
</div>
<div class="paragraph">
<p>After converting a primitive, a number of changes are noticeable:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>The primitive may be drawn in a different colour.</p>
</li>
<li>
<p>The primitive will no longer be resizeable by dragging its boundary with the
mouse.</p>
</li>
<li>
<p>When the primitive is selected, the <strong>Entity Inspector</strong> will no longer show the
<strong>worldspawn</strong> entity, but a new entity with a <strong>classname</strong> of <code>func_static</code>. You
can set spawnargs on this entity like any other (including giving it a custom
name).</p>
</li>
<li>
<p>Selecting any primitive contained by a <strong>func_static</strong> will cause a small X/Y/Z
axis widget to be drawn at the entity&#8217;s origin position (which may be inside one
of the primitives, or outside all of them, depending on their layout).</p>
</li>
<li>
<p>If there are multiple primitives contained within a single entity, selecting
any individual primitive will cause all of the entity&#8217;s primitives to be
selected.</p>
</li>
</ol>
</div>
</div>
<div class="sect3">
<h4 id="_selecting_individual_child_primitives">Selecting individual child primitives</h4>
<div class="paragraph">
<p>As mentioned in the previous section, selecting any primitive which comprises
part of a <strong>func_static</strong> will cause the entire entity and all of its child
primitives to be selected together. This allows you to easily move the entire
static object by simply dragging any one of its primitives.</p>
</div>
<div class="paragraph">
<p>However, it is still possible to perform operations on a single primitive, for
example resizing a brush, by selecting it with the <strong>TAB</strong> key. Each press of
<strong>TAB</strong> will cause DarkRadiant to select a different primitive contained within
the entity, after which it will return to selecting the entire entity. With only
a single primitive selected, all of the normal operations are possible on that
primitive, for example deleting or resizing it.</p>
</div>
<div class="paragraph">
<p>The <a href="#EntityInspector">entity inspector</a> widget makes it clear whether you have
selected an entity or a primitive within that entity, using the text above the
list of entity properties. If an entire entity is selected, the text will appear
similar to <code>Entity&nbsp;1</code>, whereas with a primitive selected it will read
<code>Entity&nbsp;1,&nbsp;Primitive&nbsp;1</code>.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_compiling_a_map">Compiling a map</h3>
<div class="paragraph">
<p>DarkRadiant does not include functionality for compiling a map into the form
Expand Down Expand Up @@ -3520,7 +3616,7 @@ <h4 id="_creating_an_assets_lst_file">Creating an assets.lst file</h4>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2020-01-28 21:37:38 GMT
Last updated 2020-02-04 21:15:22 GMT
</div>
</div>
</body>
Expand Down

0 comments on commit c7e288d

Please sign in to comment.