Posted by: -+Arcadian+-
Date posted: Jun 25 2003 User Rating: 4.7 out of 5.0 | Number of views: 8030 Number of comments: 2 | Description: apply images to brushes with no seams |
In this article we will: Take a 768x768 image, cut it up into nine pieces and apply those images to nine brushes in hammer with no seams. This tutorial is semi-advanced, and I'm not a great writer so I hope you understand.
This is sorta the same idea they use in Battlefield 1942 where they take one big image and cut it into 512x512 textures and apply it to the land, but we will be doing it in Half-Life .. sorta
This technique works great for land.. but can be used anywhere you need it. If you take a picture (for example) 768x768 and cut it into nine 256x256 images, create a .wad file, go into Hammer and apply the textures (using fit) and you will notice that the images will not be seamless.. half-life blurs the outer edges or adds weird stuff to the image. This does not look good, and we don't want that. This is how you get around that.
1. Go into your photoshop and set your grid preferance up. Gridlines every: 256, subdivisions 1.

2. Turn on your grid - View/Show/Grid

3. I'll be using this 768x768 image for this tutorial (this could be a top down view of your land). I'm only using this image to show how this technique works. Right click and "save as" if you want to use this image to follow along.

4. Next we need to cut up our images. We will be using the marque tool and selecting each piece. The image below shows the exact sizes you need to select to make the textures perfect... load it up in photoshop with the gridlines turned on to see it better.

Notice that the outer edges will be smaller and any images in the middle will be 288x288. In this example of course, we only have one middle image... but if you made a bigger image you would have more.
Select the marque tool like so...

Set it to fixed size.

Enter in 272x272 for your width & height. Select it like in the image below, overlapping the 256 grid by 16 pixels. I've found it easier if you let it snap to the grid for the top and a side, then use the cursor keys (hitting it 16 times) to move it into place.

5. Go to Edit/Copy and copy your image. Then click on File/New and click ok. Next go to Edit/Paste. Next we will need to make it 256 colors for half-life, so go to Image/Mode/Indexed Color. Select local adaptive, 256 colors hit ok, and save it as 1.bmp.

6. Repeat steps 4 & 5 until you have done all nine images entering in the correct sizes, and making your selections .. heres another image to go by, it shows the middle texture being selected.

NOTE: I'm saving my images 1, 2, 3 starting at the top left and going right, so the next row will be 4, 5, 6 , and the row after that will be 7, 8, 9. You will need to do the same so you can apply the textures later in Worldcraft/Hammer.
7. Take your images into wally and make a wad file. I've included a wad file here. And the .rmf for Worldcraft/Hammer here.
8. Go into Worldcraft/Hammer and load up the wad then create a new file.
9. Create nine 256x256 brushes like so:

[B}10. [/B]Scale the first brush (the same size as in photoshop) 272x272, overlapping just like your selection overlaped in photoshop. See image below.

Apply the "1" texture (I named the textures 1-9 in wally) to the top of your brush, and justify it with fit.
11. Note: Before scaling the brush .. remember how the selections in photoshop overlapped 16 pixels? We will now cut off those 16 pixels on each brush that we make. You must be sure to scale the correct sides, or the textures wont be seamless. For brush #1 scale the bottom and right side (the overlapped areas in photoshop) ... so your brush is 256x256. Setting grid snap to 16 makes this much easier. Just crop off the overlapping areas. See image below.

12. Repeat those steps, scaling up the rest of the brushes, applying the correct textures, justify with fit, and then scaling the brush back to 256x256 cropping the correct sides. When your finished it should look like the image below.

Well that should give you a perfect image with no seams.
You can use this same idea and make the brushes bigger or smaller depending on what you need.
Any questions? Find me in #wavelength on gamesnet
-+Arcadian+- |
|
User Comments
Showing comments 1-2
This method could also be used to allow u to use a 1024x1024 texture on one wall .. by cutting your image into two 512x512 textures and use two seperate brushes. Then set up the rest like in the tutorial, and you should have a pretty 1024x1024 textured wall. |
|
Err, two textures? :P More like 4. :D |
|
You must register to post a comment. If you have already registered, you must login.
|
297 Approved Articless
8 Pending Articles
3940 Registered Members
0 People Online (4 guests)
|
|