Patch Troubleshooter

From The DarkMod Wiki
Jump to navigationJump to search


This article is about how to fix various errors and problems you might encounter with patches. For general information about patches see Patches.

Patch alignment tessellation error

by Komag

Patch tessellation.jpg

How do you deal with this problem where two curved patches will not align?

The problem is caused by the number of sections in each patch not matching, ie, it's the "Tesselation" of the patch curve. In many cases such as that one where you are matching up a cap or flat top curve with a vertical wall patch that bends, you will want to set them both to "Fixed Subdivisions"

  • Select one of the patches
  • Open the "Patch Inspector" by pressing "Shift+S"
  • Near the bottom check the box next to "Fixed Subdivisions"

(You should suddenly see the patch go somewhat "square")

  • Experiment cranking up the Horizontal or Vertical number until you get desired curvature
  • Repeat steps for the matching patch and set either Horizontal or Vertical to the same number.

(In the second patch it may not be the same Horizontal or Vertical, i.e. it could be the opposite)

Patch texture rendering error

by Fidcal


How do you deal with this problem where the texture on a curved patch is aligned and looks perfect in the editor but in-game it fractures as shown?

The problem is caused by the patch coming into contact with a surface that contacts another visportal area. For instance, in the example picture the chimney passes right down inside the house and through a horizontal visportal. But it does not even need to go through a visportal. If it even comes in contact with a surface which has another surface inside a different visportal area it may still go wrong. In this example I cloned the bevel patch and resized them either side of the inner visportal but the piece on the roof was still wrong. Just by coming into contact with the roof (whose inner surface would be rendered in another visportal) it caused this error. I had to clone it yet again and use a tiny piece of bevel intruding into the slope of the roof and the main bevel above. Then it was fine again.