Hauptseite | How to make a transparent watermark for ETPro - Forum | Registrieren | Login
[ Neue Beiträge · User · Suche · RSS ]

Seite 1 von 11
Forum » Server Stuff » Server Stuff » How to make a transparent watermark for ETPro

How to make a transparent watermark for ETPro
How to make a transparent watermark for ETPro with GIMP

In this tutorial I am going to convert the ETPro logo into a watermark for an ETPro server. If you don’t have GIMP installed download it from here.



Once you have the logo open in Gimp select the magic wand tool:



Hold the shift key and select all of the black areas of the logo until the whole image is selected.



Click Edit and then Copy.

Next click File then New to open a new window.

Set the Image Size to 256 x 256 pixels.

Expand the Advanced Options and set the Fill with drop down menu to Transparency.

Click OK.

In the new window click Edit and then click Paste. Now we have the logo with a transparent backhround.



save the image as a .tga file.

Now we need to create a .pk3 file with the watermark in it that we can upload to our etpro server.

So, create a folder on the desktop called watermark. Open the watermark folder and create another folder, I will call mine xy. Open the xy folder and put your .tga file inside this folder. Mine is called xy.tga.

Now return to your desktop so that you can see the watermark folder. Select it and make it into a compressed zipped folder. Now change file file extension from watermark.zip to watermark.pk3.

Upload this .pk3 file to the etpro folder on your server.

The final step is to add the following line to server.cfg in the etpro folder on your server:

set b_watermark xy/xy

Here the first xy refers to the folder in our pk3 file and the second xy refers to the file name of our .tga file.

Reboot the server, and viola!


While the creation of the image itself is fairly obvious, I would like to make some comments on image size. As stated in the documentation, image dimensions must be a power of two; along this line, an image size of 128x128 is a good guide to ensure the image quality is acceptable at all resolutions. In Quake 3, RtCW, and ET, elements on the HUD are drawn at a virtual resolution of 640x480, regardless of your actual screen resolution; however, extra detail in the textures used will be shown if the screen resolution is high enough to support it. When the image is resized to 48x48 for the HUD, a 128x128 image will be scaled DOWN to fit this space until the user's resolution exceeds 1706x1280, so 128x128 will probably be ample to ensure your texture isn't stretched to fit. A little smaller or larger won't necessarily hurt, however--the primary concern you should keep in mind is download size.

The image itself may be a JPEG or TGA, although a TGA is recommended since JPEG has no support for alpha channels, and therefore cannot contain transparency. ET will always assume that the TGA begins in the lower-left corner, so you will need to be certain that you set whatever program you create the watermark with to save the image this way.



Optionally, you can also create a shader script to be distributed with your watermark. Creating a shader script is not required, but it can very slightly lower load time and ensure that your watermark is not blurred by the r_picmip cvar. This example shader script should be usable as a template to make your own script (don't forget to change the filenames, displayed in bold!), if you decide to include a shader script. If you decide to make your own shader script, be certain that you include the 'alphaGen vertex' line in the definition, as it's required for watermark fading and the client's watermarkAlpha setting to work properly. Like all of the shader scripts, this file should go in scripts/.

Example shader script


Code
// shader name
watermark/bluecherry/bc
{
          nocompress
          nomipmaps
          nopicmip
          {
              // image filename
              map watermark/bluecherry/bc.tga
              blendFunc blend
              rgbGen vertex
              alphaGen vertex
          }
}


Next, you need to arrange everything into a pk3 so that the server can properly send it to clients. The correct directory structure must be present inside the pk3, although the required directories aren't much different from what you might normally expect (and should be familiar to anyone who has made a map for RtCW or ET.) The only special case is that the watermark images MUST exist in the watermark/ directory, because the server will prepend this before the specified watermark name. It is, however, recommended that you try to keep all the filenames as unique as possible--keep in mind that clients will need to download this pk3, and may have watermark pk3s from several other servers as well.



Finally, put this in your etpro/ directory along with the other data files, and select your watermark in the server configuration. For the example watermark, this could be done with "set b_watermark bluecherry/bc" at the server console or in your server's configuration file. Clients will need to have this file in order to play on your server unless you have sv_pure set to 0, so you will want to make sure your server is configured to allow downloads, and don't forget to make your pk3 available at the redirect site if you use redirected downloads.

by Rain

Forum » Server Stuff » Server Stuff » How to make a transparent watermark for ETPro
Seite 1 von 11
Suche:

Copyright etpro.de © 2008-2016 . Toolbar | Impressum | Kontakt

Bookmark and Share