Texture Tool

From The DarkMod Wiki
Jump to navigationJump to search

written by Fidcal


The Dark Radiant editor has a surface inspector for general manipulation of textures but there is also texture tool to help with alignment. Basically it displays the entire texture tiled with the selected surfaces outlined on it so you can see what texture lies beyond the sides of the surface and scroll the texture and see more clearly how to do so. With patches you can also stretch the texture to fit awkward slopes and curves while still retaining the physical profile of the patch.

Toggle display of the Texture Tool via the View -> Texture Tool or by the default keys Ctrl+Alt+T.

Note: Generally, the Texture Tool will only work if the selected objects share the same shader. As the tool displays the infinite texture plane (also called U/V space) this wouldn't make sense if more than one texture was selected.

Controls, Features, How to use the Texture Tool

The controls are the same but there are variations in what you see and what you can do whether processing a single brush surface, multiple (or complete brush,) or a patch.

Single Brush Surface

  • Select a single brush surface in Dark Radiant's camera view using Shift+Ctrl-Click the left mouse button. You can select and deselect while the texture tool is displaying.
  • Toggle the texture tool (View -> Texture Tool or default keys Ctrl+Alt+T.)
  • You should see the texture displayed in the texture tool with a lighter area to show what part of the whole texture the selected surface covers. It might not be the same shape/proportions as your surface if the horizontal/vertical scales are different. You might need to zoom in or out to see where you are, see next.
  • Zoom the texture in and out and using the mouse wheel. If zoomed out beyond one texture tile then each tile is outlined.
  • Use Click the right mouse button drag to scroll the whole texture around
  • You can resize the texture tool window but it seems to me it ought to remain square to give a true image so keep that in mind.
  • If the texture image disappears then click in the window and it should re-appear.
  • The fourth button from the left toggles the display of a grid to help with alignment similar, but not the same, as the orthoview grid.
  • The first and second buttons decrease and increase the grid size (whether it is showing or not)
  • The third button should snap the texture surface texture to the grid but I found it only seemed to snap to the left grid and even then there was a little gap so you may need to adjust manually by decreasing the grid size and dragging the surface (see next point)
  • You can drag the surface around the tile (effectively scrolling the texture on the brush surface by...
    • First SHIFT + Click the left mouse button click on the CENTRE vertex (tiny green square) of the surface.
    • It should highlight the surface in orange to show it is selected. (repeat or Esc to deselect but remember Esc will also deselect the brush surface if not selected in the texture tool)
    • You can now Click the left mouse button drag the highlighted surface around one texture tool grid square at a time (so use finest for smooth scrolling.) If you have camera view visible then you should also see the texture scroll around.
  • The corner vertices have no effect on brushes - they are only for use with Patches see below.
  • The fifth and sixth buttons flip the texture much like in Surface Inspector. 'Vertical' means around a vertical axis, i.e., mirror left and right. 'Horizontal' means mirror top/bottom. Note: some people may see this as if bump mapping is inverted, eg, sunken bricks but it is an optical illusion - probably because of the way it is lit in Dark Radiant's camera view compared to the other surfaces.
  • Note that you can still use some other Dark Radiant controls while the texture tool is displayed, such as undo etc., but some controls might not be effective.

Multiple Brush Surfaces

I'll just describe for two selected surfaces but the principles should be the same for several including a complete brush:

  • Select two (or more) brush surfaces in Dark Radiant's camera view using Shift+Ctrl+Click the left mouse button. You can select and deselect while the texture tool is displaying.
  • Toggle the Texture Tool (View -> Texture Tool or default keys Ctrl+Alt+T.)
  • You may probably only see a large black or grey area in the texture tool divided by pale lines. Here and there are a few small white square dots. What is happening is that the selections are spread out over different tiles and the texture tool has zoomed way out to show them all at once. The pale lines are the perimeters of each tile and the small white squares are your selections. Shift+Click the left mouse button click one of the white square dots. If it won't move you probably didn't select it correctly. If more than one small white square move then either you are {{RMB} scrolling instead of Click the left mouse button dragging or you have more than one selected - deselect except the one you want. It should then have a tiny red line round it to indicate it is selected (might be hard to see.) Now LMB drag it very close to [one of] the other one[s]. You can drag across the white lines to any tile. RMB scroll the white squares to the centre of the texture tool window and zoom in as far as you can still keeping them in the window. Repeat if necessary until you can make out your surface textures.
  • . You can now treat each surface as described above for a Single Brush Surface either one at a time or select them all together.


Most of the above for faces also applies to patches. One exception is that to move a whole patch you need to select all the vertices not just the centre. The easiest way to do that is to select one vertex then click the #Select Related Items button.

In addition you can do the following with patches...

  • Select a single patch in Dark Radiant's camera view using Shift+Click the left mouse button. (multiple patches can be selected but only if they share the same shader.) You can select and deselect while the texture tool is displaying.
  • Toggle the texture tool (View -> Texture Tool or default keys Ctrl+Alt+T.)
  • You should see the texture displayed in the texture tool with a lighter area to show what part of the whole texture the selected surface covers.
  • As well as selecting the centre vertex, with patches you can also select any corner vertex (or several but it may get complicated!) and drag the corner to stretch/reduce the texture area covered by the patch. This is best explained by an example (see Texture Tool Example 01

Texture Tool Commands

Select Related Items

When editing patch vertices, it's might be required to select all vertices of the patch. Drag-selecting vertices in the Texture Tool could be troublesome if two patches partially overlap, like this:

Select related 1.jpg

To select all vertices of one patch, highlight one of them with Shift-Alt-Click the left mouse button and hit "Select Related". This will expand the selection to all vertices of the same patch:

Select related 2.jpg >> Select related 3.jpg

Merge Selection

This command is designed to help when editing patch vertices. To make a patch texture transition seamless, it's necessary that vertices share the same U/V coordinate in texture space. The Merge command takes the currently selected items and places them in a common position in the middle. An example: the two patches below share the same texture and are both selected. They are obviously not seamlessly textured:

Merge selection 1.jpg

The texture seam is well visible (both in the camera as in the texture tool - there is a gap between the two patches). Now, select the two vertices that should be merged and hit "Merge Selection":

Merge selection 2.jpg >> Merge selection 3.jpg

Do the same to the next two vertex pairs to yield this:

Merge selection 4.jpg

The patch texture transition is now seamless.


  • If while using the texture tool the texture image is lost and seems to scrunch up in one corner then click on the window might bring it back else try reselecting the surfaces should work.
  • You click flip horizontal or vertical but nothing happens - check you have a surface selected in Texture Tool. If you have then you it might be that you have to deselect the surface in Dark Radiant for it to appear in camera.
  • If you can see the main texture but your surface is not visible (eg, after flip) then it is probably off-window. In some situations Texture Tool draws the texture tiles in 'texture space' (think of it as a two-dimensional plane of tiling textures, the texture repeats at every round coordinate) and your surface is on a different tile. Zoom out - often WAY out! until you can see all the texture tiles shrink to small grid and you should see your surface as a small white square. RMB scroll it into the centre of Texture Tool, zoom in a little, and repeat until you can see it clearly.
  • You can't select a surface in the texture tool? Make sure you are using SHIFT + Click the left mouse button. Make sure you actually have a surface selected in Dark Radiant's camera view.
  • You've aligned your texture surface perfectly vertex to vertex in Texture Tool. You can see the texture obviously flows over perfectly in Texture Tool but in camera view the texture is completely wrong. Check to see if the texture needs rotating 180 degrees in Surface Inspector. If it is just a rectangular shape it will look the same in Texture Tool whichever way round it lies. Note that after rotating your texture surface it may have moved further away in Texture Tool so need dragging back and re-aligning.