Tutorial: Common Questions.

Started by angie mapper
06/04/2007 00:06
Page 1 of 1
angie mapper06/04/2007 00:06

Common Problem #1 Texture Alignment

Here is a basic explanation including some reference pictures on how to align textures.

Scaling your textures

I’m sure many of you have heard the mention of Wpoly or have run developer 1 with r_speeds 1 to see the wpoly count within your maps. “Wpolys are the World Polygon count. This is the figure that people often talk about when they are describing r_speeds. This number is a result of the engine dividing the areas of the map that require a texture into polygons based on the scale of the texture to be rendered. It is not the number of brushes in the map. The size of a visible texture rendered directly affects the wpoly count. The game engine divides the visible map into sections called world polygons based on the scale of the textures applied to brushes. So if the scale of your texture on a single surface is high the wpoly count will be low. Multiple textures on multiple brushes will also increase the wpoly count, but the wpoly count created by a single texture applied to multiple brushes that form a solid will be dependent on the scale of the texture chosen and not on the number of brushes in the solid.” .” (Quoted from Andy @ twhl)

Ok so how do you scale textures up? What does that mean? Let’s take a look at the texture tool.

Texture Tool


Face Properties of the Texture Tool

Scale



Notice at the top of the picture the “scale” X Y option. By converting the numbers within X and Y you can change the scale of your texture (making it bigger or smaller). An example is shown below.

Texture at a scale of 1


Texture at a scale of 3


Texture Alignment:

Aligning your textures can be a bit more complicated and more time consuming. Many times simply using the “Treat as One” button and selecting the faces of all the textures you want to align together works well enough. However if you are working with terrain this method often doesn’t work and you are required to align your textures manually. The way you do this is by using the “Shift” X Y option next to the scale option we spoke about earlier. If you have two rock faces and you want them aligned properly you can do this by shifting the texture left and right – up and down to fit the one next to it.

Shift

As you reach a point where the texture fits you will start to notice a small line down the middle of the texture where it appears the texture is repeating – this lets you know you’re close to fitting your texture with its counterpart.
Continue moving the texture until it seems to fit smoothly and you have aligned your texture correctly.




Fitting a texture

On many occasions you will find yourself in a situation where you want a texture to fit perfectly on an object (such as the creation of a door or window). Using the “fit” button on the face properties list will do this for you by “fitting” the texture onto the brush.

Fit Button



Before Fit


After fit.



Treat as one.

As stated before using the treat as one option will allow you to align your textures with eachother so they seem smooth. To do this select the faces of all of the texture you wish to align. Click the “fit” button and apply, then select the texture scale you wish to use and hit apply again. This should align your textures.



Common Problem #2. FPS!


Managing your FPS:

I get a lot of questions about this from mappers. How do I manage my FPS? How can I make the FPS in my map higher? Well there are some rules of thumb (rules I tend to break a lot myself honestly) which you need to avoid when speaking in terms of FPS. Don’t build big OPEN areas – big open spaces are going to create huge drops in FPS. The more you’re making the player look at the lower their FPS is going to be. Don’t create complicated objects like high poly vehicles because they can cause big drops in FPS.

How can I moderate my FPS? Well make sure when you check your map you do it running developer 1 and r_speeds 1 in your console. This is going to give you a a comprehensive account of what’s taking place in your map. You should see FPS, MS, Wpoly, and Epoly. Your FPS is the number of frames that are being drawn up each second on your screen. MS is the time it takes to execute the frame in milliseconds. Your wpoly count is described by andy as being the World Polygon count. This is the figure that people often talk about when they are describing r_speeds. This number is a result of the engine dividing the areas of the map that require a texture into polygons based on the scale of the texture to be rendered. It is not the number of brushes in the map.”

So what can you do to raise the FPS in your map?

One method of raising FPS is to use the null texture on every non visible face of a brush. For example on the bottom of Spongebob's feet (no one is going to see that).



Use func_wall on your jumps. Using func_wall will cause the engine to ignore the brushes. The brushes are not rendered and therefore will not create shadows. This also keeps you from creating strange shadows in the wall caused by the jumps cutting the lighting into sections.



Limit the player’s line of sight – again don’t make a big open area. If you’re going to build a map outdoors make sure that line of sight is somehow limited by either walls, mountain cliff areas etc.

Don’t put a bunch of complicated brushes or prefabs in your map – this is going to cause FPS drops. If you want to add cars put them in areas where players are not jumping.



Scaling textures – scale your textures up.



These are all very basic ways of reducing r_speeds in a map and improving FPS in a map.

If you're interested in more complex ways of managing your FPS you might want to look into hint brushes.



Common Problem #3. Brushwork!

Creating Mountain Terrain:

Many people have trouble understanding how to create complex objects using the vertex manipulation tool. Terrain work can be difficult. I would recommend that anyone interested in understanding how terrain work is done watch Radon's video.

The video tutorial is a wonderful example of how to create terrain work with step by step instruction showing how it is done within the Valve Hammer Editor. this is just 1 way to do it, it can be done in 100 different ways, but i recommend this one.

Thank you Radon for creating this exceptional video!

Mountain Tutorial


Common Problem #4. Texture Lighting!

How to use texture lightning by Radon:

Most mappers use texture lighting because its much easier to use and you dont have to fill the map up with a bunch of light entities.
Perhaps you know the light entity can be buggy sometimes, but the texture light doesnt look buggy and it can look much better!

Here we go: if you have ZHLT.. go to your ZHLT folder where your VIS, RAD, CSG and BSP tools are. It can be like this: F:valve hammer editorZHLT for an example.

In that folder there should be a file called lights, open using notepad ( rightclick and press open as.. )

Now if you want to add your own texture. It's pretty simple. Just add your texture and RBG code as well as brightness.
You can customize it how you want it to be, then just save the log and compile, the texture will now appear exactly how you have written it in the file.

If you dont have the light file... try to download a new ZHLT, and if that doesnt work too, just create one

Good luck with it.


Common Problem #5 Custom Textures

Creating Custom Textures:

First you’re going to need a program called “Wally”. You can download Wally here:
http://www.telefragged.com/wally/downloads.shtml.

After you download the program open up the exe and go to File – New. You want to make sure you select HL Package wad3 as shown in the example below.


Now open the image you would like to use as a texture. I use Photoshop but if you do not have access to Adobe Photoshop I recommend downloading a program called GIMP. It’s a free program that shares many of the same features Photoshop has. When you open your image file make sure the file size is multiples of 16 no higher than 256. For example an image size 64X64 would work fine.



After you have opened your image you’re going to want to put it into the wad file. Right click your image and select copy.



Right click in the wad file window and select “Paste as New”. Now you want to give your texture a name. You can name it whatever you like.





Now you have created a custom texture. Go to File – Save As and chose a name for your wad file. You can load your wad in the Valve Hammer Editor options under Textures.

Ok I specifically get a lot of questions referring to invisible textures. So I’m going to explain how to do it in Wally.

Alright lets use Mr Krab from before since we’ve already been using him. First double click on the image so that it brings up the picture. Make sure you can see your color palette in Wally by going to View at the top and making sure “Color Palette” is checked. Ok now if you select the “eyedropper” tool (four tool down from the top on the toolbar) and run it along your picture you will notice that each color on the palette has a corresponding color index. Well invisible textures use the color index 255 as a reference point.

Go to Colors at the top and select Edit Palette.

Click on the very bottom right box and manually change the color to 0 0 255. It should turn the color box true blue. Select ok and close the color palette.




Now you may see a color change on your image and you may not. Since the white background of my image was the original index 255 when I replaced it with the blue the color changed to blue in my image as shown below.



Now I need to make the areas of the entire texture true blue index 255. I do this by selecting the pencil tool and coloring in the rest of my picture manually.



When you’re done it should look something like this.



Now I need to do the same thing as before. Right click on the picture and select “Copy”.



Right click inside the Wally wad file and select “Paste as New”. Now because we are using a transparent texture we need to make sure we name it using the “{“ at the beginning. I’ve chosen to name my texture {spngcrab, you can name yours whatever you want.



Then click ok and go to file and save. Now you’ve created a custom transparent texture.



Note: Make sure when using transparent textures that you set the properties of the texture to Solid: No Light / 255.


Common Problem #6 Error: File read failure

The file read failure problem comes on the most when u are using too many wads or too many textures. You can fix it easy by adding this command to the compiler paths(csg,bsp,vis,rad): -texdata value

where value is a number in kilobytes. the standard limit is 4mb so it looks then -texdate 4000 because 4000kbs are 4mb. For kzmaps it should be like 8mb because on kzmaps you can get fast on the limits. (By Demolite)


[ Edited ]

angie mapper06/04/2007 00:12

Saved #3

angie mapper06/04/2007 00:12

Saved #4

dEMolite mapper12/05/2007 06:28

saved #6
[ Edited Tue May 15 2007, 05:14PM ]

Page 1 of 1

Please log in to post replies.