Weird crosshair crap

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Weird crosshair crap

Postby Roanoke » Thu Apr 16, 2009 12:25 am

I looked at the default crosshairs, and I concluded that they were far too small. Scaling them helped, but now it was an eyesore. I made my own crosshair, of two colors. It is attached. The odd thing is, is that if you look at it with no scaling and with some custom coloring applied, there is a thin colored border near the black sections. Why is this? I designed it with inkscape then exported it as .tga. The file is a tga file masquerading as a png file (imageshack doesn't take tga's).
Image
Roanoke
Advanced member
 
Posts: 96
Joined: Fri Dec 26, 2008 2:32 am
Location: Camping mortar spawn

Postby divVerent » Thu Apr 16, 2009 5:27 am

Hehe, this bug is actually in your graphics card and not in the engine, and thus can't really be helped.

The color of pixels that are fully transparent does matter if they are direct neighbors of non-transparent ones, due to how the interpolation on the GPUs is done.

What you can do about it is easy: assuming your file is gfx/crosshair42.tga, you then do:

fixtrans gfx/crosshair42.tga

and then copy fixtrans/gfx/crosshair42.tga from the directory with your nexuiz settings to gfx/crosshair42.tga.

The "fixtrans" command makes a new TGA with this problem not entirely removed, but made much less bad, by changing the color part of fully transparent pixels to the color of the nearest pixel.

Another thing: don*t use such large images for crosshairs :)
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again

You can vary the number of "MS", so you can clearly see it's MS which is causing it.
divVerent
Site admin and keyboard killer
 
Posts: 3809
Joined: Thu Mar 02, 2006 4:46 pm
Location: BRLOGENSHFEGLE

Postby Roanoke » Thu Apr 16, 2009 5:32 am

Thanks. I'll try that and see. As for big images, it's comforting having an enormous crosshair in front of you (at least for me) :P
Roanoke
Advanced member
 
Posts: 96
Joined: Fri Dec 26, 2008 2:32 am
Location: Camping mortar spawn

Postby esteel » Thu Apr 16, 2009 9:15 am

Hehe, that crosshair must overshadow players 'behind' them.. how can you hit at all :P
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby Roanoke » Thu Apr 16, 2009 5:25 pm

Div: What do you mean by fixtrans? Is that a shell command? If it is, I don't have it.
Esteel: I had that problem until I set the crosshair to have alpha :P
Roanoke
Advanced member
 
Posts: 96
Joined: Fri Dec 26, 2008 2:32 am
Location: Camping mortar spawn


Return to Nexuiz - Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron