User login

Navigation

Poll

I downloaded the ETQW demo and....
...I'm too busy playing for polls.
14%
...it's awesome.
43%
...it's okay, I expected better.
14%
...I'm lost in the valley, anyone have a map?
0%
...my machine won't run it. :-(
29%
Total votes: 7

Who's online

There are currently 0 users and 46 guests online.

Welcome to RUST | Gamedesign.net

Texture and Lighting

Submitted by Andy on Sat, 2004-10-16 21:06.

Hammer 3.4

Texture - by Andy
Now that you've created a couple of rooms, it's time to think about textures. Open the rmf from the last tutorial. Firstly, what sort of playing area are you constructing? It's important to have a theme or at least know where you are going with this. Once you have a general idea of the type of environment you're creating, choosing textures becomes much easier.

For this tutorial I am using some basic room textures. Open the Texture Application tool (unless you have it as part of your Screen Element Views) and click the Browse button to have a look at what is available.

Image 1

The texture browser has some great features. Type floor in the filter line and the browser will only show textures that have 'floor' as part of their name. Size set to 1:1 will show you the actual size of the texture and what grid space it normally covers (128x128 in this example). If you select Only Used Textures, it will show you all the textures you have used on your map so far. (Useful, since using too many textures looks bad and also wastes the limited texture memory.)

Textures have different functions based on the prefix in their name:

{       Transparent
!       Water (a special texture that acts like water)
~       Light (Textures begining with this will emit light)
+       Animated (Triggering shows the next texture)
+A    Animated Toggle (cycles through Max 10 frames)
-        Random Tiling (there will be 3 or 4 in a set)

So !WATERBLUE is a functional water texture and +0~ELEV1_PAN is a the first in a sequence of special animated light emitting textures. You will find a mixture of the prefixes through out the .wad files.

The Floor:
I have chosen c1a3floor02 for the floor. So in the Texture Browser double click the texture you require and that texture should now be shown in Face Properties box (or on the right hand side of your screen in the Texture Bar.
I have found that the easiest way to apply textures to entire brushes is to have the Texture Bar as part of your screen view. To select a brush click on the Ignore Group button, as this will stop you from accidentally applying the texture to an entire group, and select the brush you want to apply the texture to, in this case the Floor.
Use Ctrl + Left Click to highlight the second floor in the map and with both the floors highlighted, just click on the Apply Current Texture button. Both floors should now resemble concrete tiles.

The Walls Using the same method as above, find a suitable texture for the walls such as c2a4e_w1c and select all the wall brushes and apply the texture. Just to give you an idea of what can be achieved with textures, click on Browse in either the Texture Bar or the Face Properties box. Check the box for Only Used Textures and type c2a in the Filter line.
You should have the c2a4e_w1c texture as the only one showing in the Textures box. (If there is more than one texture showing, then all the textures showing will be marked).
Now click on Mark and this will select all the brushes in your map that have that texture (84 or so).

Move the Face Properties box so that it isn't obstructing the Camera View and move that view so that you have a clear perspective of the corridor, wall, floor and ceiling.

Image 2

In the Face Properties box adjust the Y Scale to 0.60 and the Y Shift to 70 or 71. This should leave the walls with a dark line at the top and bottom accentuating the ceiling and floor.
You can adjust the scale and shift to suit your needs and try the Align: World or Face check boxes. When you have got it looking how you want it, just close the Face Properties box.

I used the same method to apply fifties_ceil5 to the roof and then as with the walls I adjusted the ceiling to fit. Scale X:1.00 and Y:1.00, Shift X:16 and Y:55 and the Align: World box checked.

I have left the corridor as the original texture. You might want to create a border and apply a neutral texture to it.
There are heaps of ways to apply texture. Just remember that applying texture to the entire brush can avoid mixed texture errors when compiling.
Try not to use too many textures and spend some time aligning your textures so they look good. For large areas use a large texture (128x128 or larger) and for outdoors or other huge areas make the scale high so that the texture isn't repeated too often. This also improves performance.
Getting it to look right is really important. Experimenting with textures and the tools can produce great results.

Image 2
 

Part 4: Lighting:
In this tutorial we will look at the effects of lighting. Good lighting is great for atmosphere. It's also good to have a few dark places but not too many.

Before we go any further, when you compiled your Map did the light look as though there was a real light? By that I mean, did the map look as though there was a light where you placed it or did it look like the whole map was floodlit?. If it looked floodlit or really bright, then you might want to compile it again and look at the Error Log. It is normally saved in the same area as your .rmf file. Look for a line that indicates an Error. If there is a LEAK in your map, then the map will be floodlit or "Fullbright". If you do not fix the LEAK, then the rest of this tutorial is pointless, because you will not see the lighting as it is meant to be.
Another way to check for a LEAK is to bring up the console with the ~ tiald key and type in pointfile. If there is a LEAK, the pointfile will be generated and it will tell you the number of points read. If it is 0 then your map doesn't LEAK..... yet.

The Properties dialog (found by right-clicking the light entity) allows you to customize the brightness, colour, appearance (flickering, fading, etc), target, and name of the light.

Brightness

Also, in the Flags section, you have the option of indicating that the light should be Initially Dark. In this case you'd also have to supply a name for the light so it could be "triggered" to turn on.

Image 1 Image 2
Image 3

The effect created by just changing the colour is dramatic. The first figure uses the default settings. For the second room I have selected the light's properties and highlighted Brightness. This will bring up an additional setting, Pick Color. Image 4
Clicking on this option takes you to a colour palette where you can choose what suits you. The colour palette has an Add to Custom Colors button - if you find a colour that suits the theme of your room, just click that bar to save the colour. It will appear under Custom Colors: this will remain set even when you close the map or compile it. Great for large levels that need consistency. You can see from the figure that I have saved the three Colours used above. The default Brightness setting is the yellow hue shown.
Placement of the lights has a varied effect. The lights in the figures above are 8 units below the ceiling. Adding a ceiling light fixture will enhance the effect.

Working with Light Textures:
There are a lot of textures that can be used and the easiest way to find them is to open your texture browser and type + in the filter [or have a look in the file lights.rad in your WorldCraft folder]. Create a brush 64 x 80 x 4 units to apply your light texture to. In the example map I have used +0~fifts_lght01 (because the texture size is the same as the brush) and applied another texture to the border of the light. Place this brush in the centre of the room above the existing light. To add a little realism to the light you might want to change the light entity property Appearance to Flicker A. The Fluorescent Flickersetting actually turns the light off and on, transitioning the room between light and dark.
Most light textures can be used in conjunction with func_ entities, by setting the Minimum Light Level in the entity properties to > 1. This gives the appearance of the texture being lit, but adds no light to the actual room. If you add a light texture to the borders of your light brush, they will also light up and sometimes this lessens the effect and reduces the shadow, giving the light an unnatural look.

Image 5 Image 6

Create a small brush using the exit1 texture on the front face and position it above the corridor (makes sense). Select the brush and change it to a func_wall entity with a Minimum Light Level of 1 (you can make this value 500, but it doesn't make any difference. The range is 0 to 1, so 0.5 is half-lit). The figures above show the enhancement gained by applying an entity to the brush. If you don't have any light in the room, and there is a really inviting "EXIT" sign at the other end, it doesn't take a genius to work out where your player is going to go. Great place for a trap or monster trigger.

NOTE:
If you give the light a name to use with a trigger or switch, remember that the game engine can only cope with about 4 named lights or animated lights in the same visual area. More than that might produce weird effects and an error (Warning to many direct lights...) in some compiling programs. I am not sure how many unnamed lights the engine can cope with, but less is better. Try making use of texture lighting. The same applies with light_spot entities.

As I said in the first paragraph, if your map does not compile properly or VIS and RAD do not finish, then your map will be lit "Fullbright" and any changes you have made to the lights properties will not show in the final map. Be sure to check for LEAK's as this is the most common cause.

Experiment and try new things. The secret to a good level is in the texturing and the lighting.

Next Part 5: Furniture Prefabs

 
RUST | Gamedesign.net is your source for all the latest game-editing news and tutorials. If you are seeing this message, this means that you are using a browser that does not support CSS. Please upgrade your browser and enjoy your stay at RUST and if you have any questions, comments, or suggestions, please contact a site administrator.