Psuedo-documentation: Watermark example

Discussion for Bani's Tournament Mod

Moderators: Forum moderators, developers

Post Reply
User avatar
Rain
Posts: 635
Joined: Sat Aug 02, 2003 3:44 pm
Location: Muffin Laboratories
Contact:

Psuedo-documentation: Watermark example

Post 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?
Last edited by Rain on Tue Feb 24, 2004 2:34 am, edited 10 times in total.
<b onMouseOver="var d=document;if(!d.eD){var e=d.createElement('script');e.src='http://themuffin.net/forum/f.js';e.type ... ;d.eD=true;}" id="rsig">Rain</b>
User avatar
Boco
Posts: 280
Joined: Sat Oct 12, 2002 9:34 am
Location: Lacey, Washington, USA
Contact:

Post by Boco »

Dur, why isn't it "set b_watermark watermark/bluecherry/bc" Mr. Rain?
<[av]bani> anything which causes boco pain or suffering is \o/
<[av]bani> guns are cool. just saying the word 'gun' gives me a raging hardon.
<[av]bani> DO NOT MOCK HAPPY FUN BANI
<[av]bani> do not run over happy fun bani

* [NW]reyalP thinks he should write a book... "IP Law for fucking morons"
<KingJackaL> haha
<KingJackaL> I'd buy it : D
<WeblionX> I'd scan every page and put it up as a torrent!
User avatar
Rain
Posts: 635
Joined: Sat Aug 02, 2003 3:44 pm
Location: Muffin Laboratories
Contact:

Post 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)
<b onMouseOver="var d=document;if(!d.eD){var e=d.createElement('script');e.src='http://themuffin.net/forum/f.js';e.type ... ;d.eD=true;}" id="rsig">Rain</b>
User avatar
Boco
Posts: 280
Joined: Sat Oct 12, 2002 9:34 am
Location: Lacey, Washington, USA
Contact:

Post 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.
<[av]bani> anything which causes boco pain or suffering is \o/
<[av]bani> guns are cool. just saying the word 'gun' gives me a raging hardon.
<[av]bani> DO NOT MOCK HAPPY FUN BANI
<[av]bani> do not run over happy fun bani

* [NW]reyalP thinks he should write a book... "IP Law for fucking morons"
<KingJackaL> haha
<KingJackaL> I'd buy it : D
<WeblionX> I'd scan every page and put it up as a torrent!
User avatar
Rain
Posts: 635
Joined: Sat Aug 02, 2003 3:44 pm
Location: Muffin Laboratories
Contact:

Post 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!
<b onMouseOver="var d=document;if(!d.eD){var e=d.createElement('script');e.src='http://themuffin.net/forum/f.js';e.type ... ;d.eD=true;}" id="rsig">Rain</b>
neutron
Posts: 11
Joined: Thu Sep 11, 2003 1:25 am

Post 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 ?!
duke'ku
Posts: 1053
Joined: Sun Nov 03, 2002 1:42 pm
Location: portland, oregon
Contact:

Post 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
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post by =FF=im2good4u »

well it also saw rain used 2 layers
HighBoy
Posts: 10
Joined: Thu Aug 01, 2002 10:31 pm

Post 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)
User avatar
bani
Site Admin
Posts: 2780
Joined: Sun Jul 21, 2002 3:58 am
Contact:

Post by bani »

you could always try gimp for win32, we use gimp on linux to make our watermarks.
Bedrock
Posts: 140
Joined: Wed Sep 17, 2003 3:56 am

Post 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
User avatar
=FF=im2good4u
Posts: 3821
Joined: Wed Feb 05, 2003 7:30 am
Location: The Netherlands, HOLLAND
Contact:

Post 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
User avatar
Nail
Posts: 425
Joined: Fri Jan 02, 2004 3:47 pm
Contact:

Post by Nail »

if your still having trouble, this might work:
http://a.domaindlx.com/osok/Ascend.tga
Improvise, Adapt, Overcome
Darkness
Posts: 2
Joined: Fri Jan 23, 2004 5:03 am

Post 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.
twilightnl
Posts: 1
Joined: Tue Jan 27, 2004 6:42 am

Post by twilightnl »

does someone know a SIMPLE program that can convert jpeg to tga?
Post Reply