Skip to content

Commit

Permalink
Add manual section on subdividing patches
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Mott committed Sep 25, 2018
1 parent 0031f13 commit 15fdfec
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 3 deletions.
Binary file added doc/img/PatchSubdivision.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions doc/manual.adoc
Expand Up @@ -807,3 +807,25 @@ Portion of an arch covering a 90 degree angle. This may be placed along room
edges to give a curved appearance.

|===

==== Controlling patch subdivision

Although patches are defined by Bezier curves, they are subdivided into flat
polygons for rendering. By default, the number of polygons to create is
determined dynamically by the game engine, based on the shape of the patch.
However, you can also use the *Patch Inspector* to explicitly set the level of
subdivision required, which can be useful when optimising a map by reducing
on-screen polygon counts.

.Default (automatic) subdivision, 2x2 subdivision, 3x3 subdivision, 3x10 subdivision
image::PatchSubdivision.png[align="center"]

To subdivide a patch:

. Select *Patch Inspector* in the *View* menu to make the inspector widget
visible.
. With the patch selected, enable the *Fixed Subdivisions* checkbox.
. Use the *Horizontal* and *Vertical* numeric spinboxes to set the number of
polygons to divide the patch into. The value can range from *1*, making the
patch completely flat regardless of control point positions, up to a maximum of
*32*. Each dimension can have a different subdivision level, if required.
44 changes: 41 additions & 3 deletions doc/manual.html
Expand Up @@ -471,6 +471,7 @@ <h1>DarkRadiant User Guide</h1>
<li><a href="#_creating_a_simple_patch">Creating a simple patch</a></li>
<li><a href="#_manipulating_control_points">Manipulating control points</a></li>
<li><a href="#_more_complex_patch_shapes">More complex patch shapes</a></li>
<li><a href="#_controlling_patch_subdivision">Controlling patch subdivision</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -1728,8 +1729,8 @@ <h4 id="_more_complex_patch_shapes">More complex patch shapes</h4>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="img/PatchEndCap.png" alt="PatchEndCap"></span></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><strong>End cap</strong>
</p><p class="tableblock">An arch or half-cylinder covering a 180 degree angle, aligned with the 2D view
axis. The curved part of the arch will be at the top if created in front or side
views, making this useful for curved ceilings and the like.</p></td>
axis. The peak of the arch will be at the top if created in front or side views,
making this useful for curved ceilings and the like.</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><span class="image"><img src="img/PatchBevel.png" alt="PatchBevel"></span></p></td>
Expand All @@ -1740,13 +1741,50 @@ <h4 id="_more_complex_patch_shapes">More complex patch shapes</h4>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_controlling_patch_subdivision">Controlling patch subdivision</h4>
<div class="paragraph">
<p>Although patches are defined by Bezier curves, they are subdivided into flat
polygons for rendering. By default, the number of polygons to create is
determined dynamically by the game engine, based on the shape of the patch.
However, you can also use the <strong>Patch Inspector</strong> to explicitly set the level of
subdivision required, which can be useful when optimising a map by reducing
on-screen polygon counts.</p>
</div>
<div class="imageblock" style="text-align: center">
<div class="content">
<img src="img/PatchSubdivision.png" alt="PatchSubdivision">
</div>
<div class="title">Figure 7. Default (automatic) subdivision, 2x2 subdivision, 3x3 subdivision, 3x10 subdivision</div>
</div>
<div class="paragraph">
<p>To subdivide a patch:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Select <strong>Patch Inspector</strong> in the <strong>View</strong> menu to make the inspector widget
visible.</p>
</li>
<li>
<p>With the patch selected, enable the <strong>Fixed Subdivisions</strong> checkbox.</p>
</li>
<li>
<p>Use the <strong>Horizontal</strong> and <strong>Vertical</strong> numeric spinboxes to set the number of
polygons to divide the patch into. The value can range from <strong>1</strong>, making the
patch completely flat regardless of control point positions, up to a maximum of
<strong>32</strong>. Each dimension can have a different subdivision level, if required.</p>
</li>
</ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2018-09-19 21:22:42 BST
Last updated 2018-09-25 20:46:21 BST
</div>
</div>
</body>
Expand Down

0 comments on commit 15fdfec

Please sign in to comment.