Author Topic: custom gunsights alpha  (Read 1515 times)

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
custom gunsights alpha
« on: September 01, 2010, 08:12:17 AM »
so I'm making up some gunsights and cant work out how the alpha works. against the sky the sight goes white, against a darker background it shows the correct colour, even though the gunsight alpha in options is set to 100%

against a dark background with the original colour, the antialiasing looks ok. when the sight goes white, the antialiasing looks awful. grrr.

also for crosshairs, zoomed in looks fine, zoomed out (default view) the horizontal line looks ok, but the vertical line looks very thin (1px?) and is barely visible. doesnt look great either.

any tricks I need to know for gunsights?

:headscratch:
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: custom gunsights alpha
« Reply #1 on: September 03, 2010, 08:58:55 AM »
no one?

:(
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline Ghastly

  • Silver Member
  • ****
  • Posts: 1756
Re: custom gunsights alpha
« Reply #2 on: September 03, 2010, 04:10:55 PM »
RTHolmes,

All I can say is that I fought a minor war trying to make a single alpha enhanced gunsite.  IIRC, Gimp didn't do something right with creating the alpha channels, or I didn't and IIRC I ended up using a machine at work that had Photoshop installed.   What I do recall is that you can't extend the lines all the way to the end or something weird happened. Perhaps that's the white you are experiencing?

<S>


"Curse your sudden (but inevitable!) betrayal!"
Grue

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: custom gunsights alpha
« Reply #3 on: September 03, 2010, 04:26:51 PM »
I know what you mean, this should have been a 20min job total :furious

I found the 2px black border trick in another thread :aok


just wondering how to achieve alpha ch, when 8bit BMPs dont have one. sure I read somewhere you can use a 2nd grayscale file as the alpha ch, but none of the default sights appear to do so.

it also looks like AH just treats black as the transparent colour.

but then there is some kind of alpha thing going on because the sight changes colour depending on the background.

 :headscratch:
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline Ghastly

  • Silver Member
  • ****
  • Posts: 1756
Re: custom gunsights alpha
« Reply #4 on: September 03, 2010, 08:10:34 PM »
I remember something else now too - whatever color was in the last cell of the color palette (i.e. color number 255) was the color that was considered the transparent color.   I had to manually manipulate the color palette in order to get things to work at ALL, and I couldn't make them anywhere near as "granular" as I would have liked using Gimp.

Part of it was me of course as graphic arts is waaaay not my forte, and part of it was Gimp which really isn't meant to manipulate 8 bit paletted graphics.

If it will help you in any way, here's what  I was working on:

(save as grue2_alpha.bmp)


(save as grue2.bmp)


Then select grue2 as your gun sight, and set the AH alpha slider to about 1/3 (i.e. 2/3's towards the right side.)

Again, hope that helps.   I was able to get about 75% of the way there, but I needed a better tool for managing the palettes than Gimp had to get what I wanted.

<S>
"Curse your sudden (but inevitable!) betrayal!"
Grue

Offline bustr

  • Plutonium Member
  • *******
  • Posts: 12436
Re: custom gunsights alpha
« Reply #5 on: September 07, 2010, 07:01:09 PM »
Excuse me for being dimmm.

All of these years I've never played with the alpha slider till just now after installing your reticle. It acts as a dimmer dial for the bulb in the base of the gunsight. What are you trying to accomplish with an Alpha mask file? That is placing more pixels in the reflector plate you have to look through along with the environmental clutter problems from the ground or the con blending into the ocean. Is it supposed to create an increased lumin contrast effect in some visual environments?

I've found creating the reticles with single white pixel lines and a small amount of blur shows up very well contrast wise over other colors in the game except directly into the sun. Full left aplha slider makes the white lines pop like a full dialed up reostat. Or am I missing something here?
bustr - POTW 1st Wing


This is like the old joke that voters are harsher to their beer brewer if he has an outage, than their politicians after raising their taxes. Death and taxes are certain but, fun and sex is only now.

Offline Ghastly

  • Silver Member
  • ****
  • Posts: 1756
Re: custom gunsights alpha
« Reply #6 on: September 07, 2010, 09:03:35 PM »
Bustr, I was trying to make a truly "luminescent" gunsight, yes. I posted that just as an example of using an alpha bitmap along with the gunsight graphic, mostly so that RTHolmes could examine the color map to see what I meant about having to handcraft the color layout.   That sight is not one I actively use, nor is it really intended for use as is.  It was a failed experiment. 

<S>



"Curse your sudden (but inevitable!) betrayal!"
Grue

Offline bustr

  • Plutonium Member
  • *******
  • Posts: 12436
Re: custom gunsights alpha
« Reply #7 on: September 07, 2010, 11:31:50 PM »
If there is a way to increase the perceived lumin quality of the reticle beyond what the alpha slider provides, I am intrested to learn the technique. Is the result in the relm of how looking directly into the game's sun causes the LCD crystals to go intense bright luminous white? Or does the alpha mask file's pixels have a more intense lumin than the primary lines in the base file fooling you into seeing a glow around your lines?

What are the technical baseic rules for creating the files and how they are supposed to work together?
bustr - POTW 1st Wing


This is like the old joke that voters are harsher to their beer brewer if he has an outage, than their politicians after raising their taxes. Death and taxes are certain but, fun and sex is only now.

Offline Ghastly

  • Silver Member
  • ****
  • Posts: 1756
Re: custom gunsights alpha
« Reply #8 on: September 08, 2010, 05:58:44 AM »
If there is a way to increase the perceived lumin quality of the reticle beyond what the alpha slider provides, I am intrested to learn the technique. Is the result in the relm of how looking directly into the game's sun causes the LCD crystals to go intense bright luminous white? Or does the alpha mask file's pixels have a more intense lumin than the primary lines in the base file fooling you into seeing a glow around your lines?

What are the technical baseic rules for creating the files and how they are supposed to work together?

Dunno. That's why I was experimenting.  What makes it appear luminescent to me is a bit of a fuzzy "glow" around the lines. 

<S>

"Curse your sudden (but inevitable!) betrayal!"
Grue

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: custom gunsights alpha
« Reply #9 on: September 08, 2010, 06:12:14 AM »
I guess I was trying to find a way to partially eliminate the game's builtin alpha effect for the sights, even with the slider at the default 100% the reticule gets really washed out against light backgrounds (goes almost white). I'm trying to nail the right colour for the reticule.

btw trial and error with the sights is a PITA - change the colour, restroke the paths, reapply blur, flatten the image, save as BMP, open in Paint to convert to 256 BMP, back to AH, spawn on runway, taxi to a hangar to check the builtin alpha effect.

just got a Intel mac so my (very) old PPC photoshop doesnt work on it. never really used Gimp before, its very impressive for a GPL app but missing some of the real timesavers from PS (primitives paths, layer effects, 256 BMP export etc.)
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline Stoney

  • Gold Member
  • *****
  • Posts: 3482
Re: custom gunsights alpha
« Reply #10 on: September 08, 2010, 06:38:52 AM »
I guess I was trying to find a way to partially eliminate the game's builtin alpha effect for the sights, even with the slider at the default 100% the reticule gets really washed out against light backgrounds (goes almost white). I'm trying to nail the right colour for the reticule.

btw trial and error with the sights is a PITA - change the colour, restroke the paths, reapply blur, flatten the image, save as BMP, open in Paint to convert to 256 BMP, back to AH, spawn on runway, taxi to a hangar to check the builtin alpha effect.

just got a Intel mac so my (very) old PPC photoshop doesnt work on it. never really used Gimp before, its very impressive for a GPL app but missing some of the real timesavers from PS (primitives paths, layer effects, 256 BMP export etc.)

Don't know about primitives paths (don't know what that is), but the layer effects and 256 .bmp export are possible on GIMP I believe.
"Can we be incorrect at times, absolutely, but I do believe 15 years of experience does deserve a little more credence and respect than you have given from your very first post."

HiTech

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: custom gunsights alpha
« Reply #11 on: September 08, 2010, 07:04:38 AM »
by primitives I mean basic drawing shapes (lines, circles, squares etc and text) which stay as vectors, rather than having to create a selection, convert it to path then "stroke path" which creates a bitmap. I cant find a way to do layer effects (ie. apply gaussian blur as a layer, which effects everything below it). 8bit BMP is the lowest bit export I can see.

it may be I just havent found them yet, being used to the way PS works. :headscratch:
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli

Offline bustr

  • Plutonium Member
  • *******
  • Posts: 12436
Re: custom gunsights alpha
« Reply #12 on: September 08, 2010, 11:52:14 AM »
Try (paint.net) and look into its addons. Everything is free. It does much of what you want.

http://www.getpaint.net/download.html

I still find a single pix white line gaussian blurred with a radial blur to thin the edges to a feather point like with the original Revi reticle show the brightest in the game. Maybe HiTech might be interested in increasing the alpha sliders lumin a few degrees of intensity. Maybe the bulb has gotten old.
bustr - POTW 1st Wing


This is like the old joke that voters are harsher to their beer brewer if he has an outage, than their politicians after raising their taxes. Death and taxes are certain but, fun and sex is only now.

Offline Stoney

  • Gold Member
  • *****
  • Posts: 3482
Re: custom gunsights alpha
« Reply #13 on: September 08, 2010, 01:21:30 PM »
by primitives I mean basic drawing shapes (lines, circles, squares etc and text) which stay as vectors, rather than having to create a selection, convert it to path then "stroke path" which creates a bitmap. I cant find a way to do layer effects (ie. apply gaussian blur as a layer, which effects everything below it). 8bit BMP is the lowest bit export I can see.

it may be I just havent found them yet, being used to the way PS works. :headscratch:

There should be an option to select an entire layer and do a blur.  I've done this on skins to create a sun-faded layer over the "clean" paint, but it wasn't a complete transparent layer, and that might be the rub.  And, perhaps I misunderstand the terminology re: 8 bit versus 256.  

You can use the pixel brush and paint brush tools to draw lines/boxes, but arcs and circles, etc are done with paths.  You merely create the path then select stroke path.  There's also a "stroke selection" tool.
"Can we be incorrect at times, absolutely, but I do believe 15 years of experience does deserve a little more credence and respect than you have given from your very first post."

HiTech

Offline RTHolmes

  • Plutonium Member
  • *******
  • Posts: 8260
Re: custom gunsights alpha
« Reply #14 on: September 08, 2010, 02:12:30 PM »
the difference is that in PS almost everything including vectors and effects remains editable - the effects arent rendered as a bitmap onto the layer they kind of float above it. so if you want to tweak an effect, remove it or add another filter you dont have to start again from scratch.

as far as I can tell the smallest colour space BMP files Gimp generates are 24bit (8bit per R/G/B channel), the AH gunsight files have to be 8bit (256 colours, indexed), hence why I'm using paint to convert em to 8bit.

I guess Ive just got very used to the workflows in PS6.
71 (Eagle) Squadron

What most of us want to do is simply shoot stuff and look good doing it - Chilli