• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

need some help adding alpha channels to a texture...

Started by TheJamsh, February 20, 2009, 05:31:39 AM

Previous topic - Next topic

TheJamsh

im trying to make some textures that i can use with the textureBlend setting "srcalpha invsrcalpha modulatealpha"

i have a smoke effect that ive made, with a black background. I add an alpha channel by using 'Colour To Alpha', and selecting the colour black. In, G.I.M.P, the texture looks as it should, (i compared it to some of steeveeo's white smoke textures)

however, i save it as a .tga (without RLE compression), and open it in XnView to check it will open in BZ2 properly, but it just appears solid black and white, like the smoke has been used as a stencil to cut into the black background. ive uploaded some pics to show you what i mean. i think im doing everything right.

it might just be GIMP, i have photoshop 7 if someone could teach me how to do it in there?

here are some images of what it looks like:

in GIMP, with colour to alpha applied


in Xnview after i save it


BZII Expansion Pack Development Leader. Coming Soon.

Zero Angel

Try setting the threshold or whatever its called higher, like to 255 or 100%. Additionally there might be an eraser tool (unless i'm thinking of photoshop) that will erase according to a specific color, just select black as the color and set the tolerance/threshold/whatever to maximum.
QuoteAwareness, Teamwork, Discipline
Constantly apply these principles, and you will succeed in a lot of things, especially BZ2 team strat.
{bac}Zero Angel
Victory through superior aggression

TheJamsh

nope, makes it show up really horrible using the threshold selection


BZII Expansion Pack Development Leader. Coming Soon.

mrtwosheds

I use photoshop 6.
If you just want the black not to show, make sure it is 0 0 0 pure black save without an alpha channel, .tga or .png convert to dxtbz2.
If you want some black or other dark colors to show use an alpha channel mask save as .pic and convert to dxtbz2.
I have found I get the best results using .pic with alpha channels (masks)

Zero Angel

A simple workaround here would be to not use alpha and just use one one modulate to do the transparancy. Most conventional smoke effects use monochrome textures, one one modulate, and then just color the smoke using the color values in the effect.
QuoteAwareness, Teamwork, Discipline
Constantly apply these principles, and you will succeed in a lot of things, especially BZ2 team strat.
{bac}Zero Angel
Victory through superior aggression

TheJamsh

yeh but they can have different effects on the texture. using one one modulate doesn't QUITE work how i want it too.

e.g. look at dirt.tga, it looks like a blank white canvas in Xnview, but it does have an image on it, just a near-transparent one. this allows you to make black dirt in BZ2 (by using color = "0 0 0 255")

one one modulate doesnt let you get the black, instead it just colorizes the texture. try putting "0 0 0 255" into a one one modulate effect, it wont appear.


BZII Expansion Pack Development Leader. Coming Soon.

General BlackDragon




*****General BlackDragon*****

mrtwosheds

dirt.tga uses an alpha channel to mask out some of the texture. your xnview image above is showing you the alpha channel, not the texture. I have not used g.i.m.p so I don't know how good it is at making alpha channels/masks.
In photoshop once I have saved the alpha channel I can modify it as a greyscale image, turning it grey would make the texture transparent, very useful for bz2's glowing textures.

Zero Angel

Quote from: TheJamsh on February 20, 2009, 08:57:23 AM
yeh but they can have different effects on the texture. using one one modulate doesn't QUITE work how i want it too.

e.g. look at dirt.tga, it looks like a blank white canvas in Xnview, but it does have an image on it, just a near-transparent one. this allows you to make black dirt in BZ2 (by using color = "0 0 0 255")

one one modulate doesnt let you get the black, instead it just colorizes the texture. try putting "0 0 0 255" into a one one modulate effect, it wont appear.
Oh yes, you're absolutely right.
QuoteAwareness, Teamwork, Discipline
Constantly apply these principles, and you will succeed in a lot of things, especially BZ2 team strat.
{bac}Zero Angel
Victory through superior aggression

Nielk1

It looks like your alpha might not be in a separate channel or something. I have had that with PNGs. Alpha in a channel, and some not. As a result, some things showed it one way, others another, others yet another.

Pure guess, carry on...

Click on the image...

GSH

I have Photoshop at home and work. It makes dealing with alpha channels easy. I tried the 'GIMP' once years ago. Couldn't figure out a damn thing with its alpha channels -- how to add/edit one. It hit the uninstall bucket quickly.

Maybe it's gotten better over the years, but the GIMP is the worst part of open source -- its people do NOT know how to do a good user interface. Not that I'm any expert (just marginally competent) at UIs, but they're a skill many think they have. And clearly don't.

-- GSH

TheJamsh

i agree with you there, GIMP isnt the easiest to use program and its very limitd in what it CAN do.

ive used it to edit some basic things that XnView cant, but photoshop 7 is also very limited, and i cant understand that UI at all.

i still dont really understand the layering concept of images or masks. this new smoke is part of my mod so i might just send it to someone i can trust and ask them to show me how to do it for future ref...


BZII Expansion Pack Development Leader. Coming Soon.

General BlackDragon

i use photoshop 7, i can talk you through it on msn.



*****General BlackDragon*****

TheJamsh



BZII Expansion Pack Development Leader. Coming Soon.

OvermindDL1

Do note, there are two forms of transparency in the internal file representation.

Alpha - Each color bit of the picture also has an associated alpha (inversed opaqueness).  This is a pretty basic method, and the way BZ2 prefers it as I recall.

Mask - There are effectively two pictures in the picture file.  One is the actual picture, no alpha, the other is a mask, a grayscale image of the transparency values.  This is basically the above Alpha format, but with all the alpha values stripped out into a picture of their own.  I do not think BZ2 likes this.

Both Photoshop and Gimp supports both.  Sadly, they both also make the two formats seem rather identical and you can never really be sure which you are using without looking at some of the deeper information.

I use GIMP just fine, anything I have made with it BZ2 supported just fine.  It is also about as powerful as Photoshop, and its interface make more sense from a Unix standpoint.  Photoshop is a monolithic program, plugins are linked in, etc... and so forth.  GIMP is made in the unix style of lots of tiny little programs.  Every image is a different running program, every time you run a plugin it is actually a standalone program that communicates by named pipes.  This method has advantages in that if anything crashes (like a poorly written plugin) it does not bring down everything else too, like in Photoshops format.  However they translated that same separation into the GUI, so everything is different distinct windows, which can be a boon if you know the quick keys since you can then full screen the image and work on it without *anything* else in the way, but if you do not know the quick keys then you have to flip windows back and forth a lot.

There is a plugin for GIMP on Windows that grabs all the gui window creation and stuffs everything into a single interface, ala PhotoShop, so you can still get that same interface with the GIMP.

Generated by OvermindDL1's Signature Auto-Add Script via GreaseMonkey