Page 1 of 8

Psuedo-documentation: Watermark example

Posted: Mon Sep 29, 2003 12:50 pm
by Rain
Note: phpbb's search highlighting will break part of this post. If you found this post as a search result, try viewing this thread directly.

Since so many people seem to be having difficulties creating watermarks, I'm providing mine as an example.

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.

<table align="center"><tr><th align="center">Example .TGA</th></tr><tr><td><img src="http://themuffin.net/etpro/watermark-guide/bc.png" alt="Example watermark" width="256" height="256" border="0"></td></tr><tr><td align="center">[download]</td></table>

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/.

<table align="center"><tr><th align="center">Example shader script</th></tr><tr><td nowrap="nowrap"><pre>// shader name<br>watermark/bluecherry/bc<br>{<br> nocompress<br> nomipmaps<br> nopicmip<br> {<br> // image filename<br> map watermark/bluecherry/bc.tga<br> blendFunc blend<br> rgbGen vertex<br> alphaGen vertex<br> }<br>}<br></td></tr><tr><td align="center">[download]</td></tr></table>

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.

<table align="center"><tr><th align="center">Example PK3 contents</th></tr><tr><td nowrap="nowrap"><pre>Archive: watermark-bluecherry.pk3<br> Length Method Size Ratio Date Time CRC-32 Name<br>-------- ------ ------- ----- ---- ---- ------ ----<br> 0 Stored 0 0% 09-29-03 14:28 00000000 scripts/<br> 209 Defl:X 127 39% 09-29-03 14:34 b70745ed scripts/watermark-bluecherry.shader<br> 0 Stored 0 0% 09-29-03 14:23 00000000 watermark/<br> 0 Stored 0 0% 09-29-03 14:20 00000000 watermark/bluecherry/<br> 37593 Defl:X 15158 60% 09-29-03 15:58 046ab77c watermark/bluecherry/bc.tga<br>-------- ------- --- -------<br> 37802 15285 60% 5 files<br></pre></td></tr><tr><td align="center">[download]</td></tr></table>

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.

So, there's my novel. Any questions?

Posted: Mon Sep 29, 2003 12:59 pm
by Boco
Dur, why isn't it "set b_watermark watermark/bluecherry/bc" Mr. Rain?

Posted: Mon Sep 29, 2003 1:09 pm
by Rain
Boco wrote:Dur, why isn't it "set b_watermark watermark/bluecherry/bc" Mr. Rain?
The astute reader will notice that I've already answered this question. 8)

Posted: Mon Sep 29, 2003 1:16 pm
by Boco
Rain wrote:
Boco wrote:Dur, why isn't it "set b_watermark watermark/bluecherry/bc" Mr. Rain?
The astute reader will notice that I've already answered this question. 8)
You forget that the astute reader will always miss that or not understand the implication.

Posted: Mon Sep 29, 2003 1:19 pm
by Rain
Boco wrote:
Rain wrote:
Boco wrote:Dur, why isn't it "set b_watermark watermark/bluecherry/bc" Mr. Rain?
The astute reader will notice that I've already answered this question. 8)
You forget that the astute reader will always miss that or not understand the implication.
In which case it's not my problem!

Posted: Tue Sep 30, 2003 4:21 am
by neutron
How the hell did you create .TGA files with alpha channels ? I mean, i used photoshop to do so, but the damn Photoshop doensn't save .tga files with transparency, whats what ?!

Posted: Tue Sep 30, 2003 6:58 am
by duke'ku
neutron wrote:How the hell did you create .TGA files with alpha channels ? I mean, i used photoshop to do so, but the damn Photoshop doensn't save .tga files with transparency, whats what ?!
Click the transparency button when you save. :P

Posted: Tue Sep 30, 2003 10:49 am
by =FF=im2good4u
well it also saw rain used 2 layers

Posted: Sun Oct 19, 2003 10:56 am
by HighBoy
Okay, i am a complete n00b when it comes to Paitnshop/Photoshop so i would really appreciate if someone could push me in the right direction...

I have Paintshop pro 8.0 !

I have tried 100000000000000 times to make a simple transparent picture with some text on it, but every time i save it, and reload it again it has a white background.

Please help me 8)

Posted: Tue Nov 11, 2003 2:35 am
by bani
you could always try gimp for win32, we use gimp on linux to make our watermarks.

Posted: Thu Jan 01, 2004 3:53 pm
by Bedrock
if anyone would be so kind to help me.. now, I've done a watermark before.. so telling me to read above won't help. Basically my tga wont save with transperancy, at first I thought it was PS 8.0, but I had a few friends do it in 7.0 and it still won't work. Maybe someone could take it, see if they can make it work.

We remove the white BG, save it as a transperant tga, open it back up.. and the whitebg is back..

file is at www.clansx.com/bedrock/ascend.zip

ty

Posted: Fri Jan 02, 2004 1:48 am
by =FF=im2good4u
well i used

ps image ready

new file

then sleced size and sleced background tranperycy

then made the image

then saved it as a photoshop documment

then opend it whit photoshop

and saved it as tga -copy

and it worked

Posted: Sat Jan 03, 2004 2:08 am
by Nail
if your still having trouble, this might work:
http://a.domaindlx.com/osok/Ascend.tga

Posted: Fri Jan 23, 2004 9:29 am
by Darkness
Ok.. ive gone through all the steps posted in this thread..

I created a watermark.tga file.

It is stored in a pk3 file with the path /watermark/cr/watermark.tga

I uploaded the watermark.pk3 file to my server and placed it in the enemy-territory/etpro directory

I edited my etmain/server.cfg file to include the following lines
set b_watermark "cr/watermark"
set b_watermarkFadeAfter -1
set b_watermarkFadeTime 1.5

and then restarted my server.

Upon connecting, the server brings up the screen saying "Downloading etpro/watermark.pk3"

But the download never begins.. I have webbased downloading enabled and have successfully downloaded the etpro-2_0_0.pk3 file from the webspace before, and I placed the watermark.pk3 file in the same folder as the etpro-2_0_0.pk3 file.

If anyone seens any errors in this, pls help me out.

Posted: Tue Jan 27, 2004 6:45 am
by twilightnl
does someone know a SIMPLE program that can convert jpeg to tga?