Applying Textures: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Restructured and reformated the article. Is going to merge the cut out articles with previous chapters.)
Line 4: Line 4:
<br clear="both" />
<br clear="both" />


=Applying Textures=
[[Image:hammer_texturebrowser1.jpg |thumb|right|200px| Click the Browse... button to open the Texture Browser.]]


Click the '''Browse''' button in the '''Texture Bar''' on the right side of the Hammer window.
In order to find the texture we want, click the '''Browse...''' button in the '''Texture Bar''' on the right side of the Hammer window.


This will open the '''Texture Browser'''.
This will open the '''Texture Browser'''.


[[Image:hammer_texturebrowser1.jpg | Click the Browse button to open the Texture Browser.]]
<br clear="both" />
[[Image:hammer_texturebrowser2.jpg |thumb|right|400px| You can change the size of the texture preview to make it easier to see more textures at once.]]


The '''Texture Browser''' lets you view and select textures to apply to objects in your map.
The '''Texture Browser''' lets you view and select textures to apply to objects in your map.


Pick '''128x128''' from the '''Size''' drop-down list at the bottom-left of the '''Texture Browser''' window, if it's not already selected.
Currently you might see only a few large textures, which makes things a bit tedious to browse, so we'll need to change that:


This will reduce the size of the texture samples, so we can see more at once.
In the lower left corner of the '''Texture Browser''' window there is a drop-down list bar called '''Size:'''. If it doesn't say '''128x128''' already, pick that option.


[[Image:hammer_texturebrowser2.jpg | You can change the size of the texture preview to make it easier to see more textures at once.]]
This will reduce the size of the texture samples, so that we can see more at once.


Double-click the wall texture shown in the image (<code>brick/brickwall017b</code>).
<br clear="both" />
[[Image:hammer_texturebrowser3.jpg |thumb|right|400px| Double-click a texture to select it.]]


This will select the texture for use, and close the '''Texture Browser'''.
Find the texture under-labeled ''brick/brickwall017b'' and double-click it. (It might be in another position than the position in the image, depending on your screen resolution.) This will choose the texture for use, and close the '''Texture Browser'''. The texture that you just chose is shown in the '''Texture Bar'''.


[[Image:hammer_texturebrowser3.jpg | Double-click a texture to select it.]]
<br clear="both" />
[[Image:hammer_selectwall1.jpg |thumb|right|200px| Click a brush in the 3D View to select it.]]


In the '''3D View''', left-click one of the walls of the hollow room. This will select it, turning it red like in this image.
Left-click one of the wall brushes inside the room to select it. (It's easier to select a brush in the 3D view.)


'''Note:''' If the camera view is showing a wireframe image (like this) instead of solid textures like in the image on the right, go the '''View''' menu and choose 3D Textured Polygons to switch to the textured view.
<br clear="both" />
[[Image:hammer_applycurrenttexture1.jpg |thumb|right|200px| Use the Apply Current Texture icon to put textures on brushes.]]


[[Image:hammer_selectwall1.jpg | Click a brush in the 3D View to select it.]]
To apply the texture we picked in the '''Texture Browser''' to this brush, click the '''Apply Current Texture''' icon from the left panel.


Click the '''Apply Current Texture''' icon from the panel on the left side of the Hammer window.
<br clear="both" />
[[Image:hammer_selectwall2.jpg |thumb|right|200px| Click in the 3D View to select the next wall piece.]]


Clicking this button applies the texture we picked in the '''Texture Browser''' to the current selection.
Select another wall brush and apply the current texture to it in the same manner: Left-click the brush in one of the views to select it, and then press '''Apply Current Texture''' to apply the texture to the brush.


[[Image:hammer_applycurrenttexture1.jpg | Use the Apply Current Texture icon to put textures on brushes.]]
Continue applying this texture to the other two walls, so that all the four walls look the same.


Select the next wall brush by left-clicking it in the '''3D View''', then click the '''Apply Current Texture''' button to assign the wall texture to it, too.
<br clear="both" />
[[Image:hammer_texturebrowser4.jpg |thumb|right|200px| Click Browse to bring up the Texture Browser again.]]


[[Image:hammer_selectwall2.jpg | Click in the 3D View to select the next wall piece.]]
Finally we will texture the ceiling so it looks more like a ceiling.


You'll now need to move the camera to be able to apply the wall texture to the other two walls of the room.
Click the '''Browse...''' button once again to bring up the '''Texture Browser'''.


You can move the camera using the '''Camera Tool''' like you learned earlier, or you can use another method, called "freelook" mode.
<br clear="both" />
[[Image:hammer_texturebrowser5.jpg |thumb|right|400px| Type in a text to only show materials with that text in their name.]]


To enter freelook mode, press the "Z" key. The mouse now controls the direction of the camera — move the mouse left and right to change the direction. Press the "W" key to move the camera forward, and the "S" key to move the camera backward. Press the "Z" key again to exit freelook mode.
If you look at the sliding bar to the right, you can see that that is an awful lot of textures to browse through to find just ''one'' ceiling texture, but don't worry: Most ceiling textures are called "ceiling", and there is a filter option to filter out what doesn't contain that word. You'll find the filter text box beneath the list of textures in this browser, named '''"Filter:"'''. Type in "ceiling" there, as shown in the image, to just list the textures with names containing the word "ceiling" in the browser.


[[Image:hammer_pickcamera.jpg | Use the Apply Current Texture icon to put textures on the selection.]]
<br clear="both" />
[[Image:hammer_texturebrowser4.jpg |thumb|right|200px| Double-click the ceiling texture to select it.]]


Move the camera so that it faces the walls that haven't been textured yet.
Double click the texture called "''concrete\concreteceiling02a''", as shown in this image. The texture will be selected and the browser will close.


Select each of the walls with the Selection Tool, and use the Apply Current Texture icon to assign the wall texture, just like the other two walls.
<br clear="both" />
[[Image:hammer_applycurrenttexture2.jpg |thumb|right|200px| Select the ceiling brush with the Selection Tool, then use the Apply Current Texture icon to put textures on the ceiling.]]


[[Image:hammer_selectwall3.jpg | Use freelook mode to change the camera viewpoint, the switch back the Selection Tool and select the wall.
Now, click the ceiling brush in the '''3D View''' to select it, and click the '''Apply Current Texture''' icon to assign the texture to the ceiling.
]]


Now we'll texture the ceiling, so it looks more like a ceiling.
<br clear="both" />
 
Click the '''Browse''' button the bring up the '''Texture Browser''' again.
 
[[Image:hammer_texturebrowser4.jpg | Click Browse to bring up the Texture Browser again.]]
 
In the text box next to where it says '''"Filter:"''', type in "ceiling", as shown in the image.
 
This will filter the list of textures so that only textures with "ceiling" in their name will be shown in the '''Texture Browser''' window.
 
[[Image:hammer_texturebrowser5.jpg | Type in a text to only show materials with that text in their name.]]
 
Double click the texture called <code>"concrete\concreteceiling02a"</code>, as shown in this image. The texture will be selected and the browser will close.
 
[[Image:hammer_texturebrowser4.jpg | Double-click the ceiling texture to select it.]]
 
Now, click the ceiling in the '''3D View''' to select it.
 
Next, click the '''Apply Current Texture''' icon the assign the texture to the ceiling.
 
[[Image:hammer_applycurrenttexture2.jpg | Select the ceiling with the Selection Tool, then use the Apply Current Texture icon to put textures on the ceiling.]]


Now onto [[Adding Entities]]!
Now onto [[Adding Entities]]!

Revision as of 22:22, 15 February 2006

Now, we'll change the brick walls of our room into something more appropriate.

Click the Browse... button to open the Texture Browser.

In order to find the texture we want, click the Browse... button in the Texture Bar on the right side of the Hammer window.

This will open the Texture Browser.


You can change the size of the texture preview to make it easier to see more textures at once.

The Texture Browser lets you view and select textures to apply to objects in your map.

Currently you might see only a few large textures, which makes things a bit tedious to browse, so we'll need to change that:

In the lower left corner of the Texture Browser window there is a drop-down list bar called Size:. If it doesn't say 128x128 already, pick that option.

This will reduce the size of the texture samples, so that we can see more at once.


Double-click a texture to select it.

Find the texture under-labeled brick/brickwall017b and double-click it. (It might be in another position than the position in the image, depending on your screen resolution.) This will choose the texture for use, and close the Texture Browser. The texture that you just chose is shown in the Texture Bar.


File:Hammer selectwall1.jpg
Click a brush in the 3D View to select it.

Left-click one of the wall brushes inside the room to select it. (It's easier to select a brush in the 3D view.)


Use the Apply Current Texture icon to put textures on brushes.

To apply the texture we picked in the Texture Browser to this brush, click the Apply Current Texture icon from the left panel.


Click in the 3D View to select the next wall piece.

Select another wall brush and apply the current texture to it in the same manner: Left-click the brush in one of the views to select it, and then press Apply Current Texture to apply the texture to the brush.

Continue applying this texture to the other two walls, so that all the four walls look the same.


File:Hammer texturebrowser4.jpg
Click Browse to bring up the Texture Browser again.

Finally we will texture the ceiling so it looks more like a ceiling.

Click the Browse... button once again to bring up the Texture Browser.


Type in a text to only show materials with that text in their name.

If you look at the sliding bar to the right, you can see that that is an awful lot of textures to browse through to find just one ceiling texture, but don't worry: Most ceiling textures are called "ceiling", and there is a filter option to filter out what doesn't contain that word. You'll find the filter text box beneath the list of textures in this browser, named "Filter:". Type in "ceiling" there, as shown in the image, to just list the textures with names containing the word "ceiling" in the browser.


File:Hammer texturebrowser4.jpg
Double-click the ceiling texture to select it.

Double click the texture called "concrete\concreteceiling02a", as shown in this image. The texture will be selected and the browser will close.


Select the ceiling brush with the Selection Tool, then use the Apply Current Texture icon to put textures on the ceiling.

Now, click the ceiling brush in the 3D View to select it, and click the Apply Current Texture icon to assign the texture to the ceiling.


Now onto Adding Entities!