Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  creating an alpha channel based on darkness  (Read 2308 times)
0 Members and 1 Guest are viewing this topic.
Offline markuskidd

Junior Member


Medals: 1



« Posted 2002-12-05 22:35:09 »

I have a bunch of images that are blended to black that I'd like to convert, if possible, to PNGs that are blended to the alpha channel.

I have access to Photoshop 7 and Paint Shop Pro 7, is there any way for me to do that in either program?
Offline pepe

Junior Member




Nothing unreal exists


« Reply #1 - Posted 2002-12-06 03:10:03 »

look for  a "luma keyer" filter in those or other programs.
They will convert luminosity into alpha.

Home page: http://frederic.barachant.com
------------------------------------------------------
GoSub: java2D gamechmark http://frederic.barachant.com/GoSub/GoSub.jnlp
Offline markuskidd

Junior Member


Medals: 1



« Reply #2 - Posted 2002-12-06 03:31:26 »

Searches through help reveal no information on a built-in luma keyer in either software, though I have googled some sites on plugins you can purchase. Any way to do this with what I've got or can get for free?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #3 - Posted 2002-12-06 07:16:52 »

Psp had be miffed with this one for a while, but its not too tricky when you've got it sussed:
  • For starters, you'll probably be best painting colour and alpha images separately (or copy/paste and use greyscale for an easy alternative).
  • On the colour image, choose Masks->new->from image..
  • Once you've got your mask loaded, choose Masks->save to alpha
  • Finally, delete the mask Do not merge with the current layer though.


Hope that gets you on your way..

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline markuskidd

Junior Member


Medals: 1



« Reply #4 - Posted 2002-12-12 05:51:43 »

Thanks for the help  Cool Trying to get this to work..

Quote

  • For starters, you'll probably be best painting colour and alpha images separately (or copy/paste and use greyscale for an easy alternative).


Hrm... what do you mean by color and alpha images?

Quote

  • On the colour image, choose Masks->new->from image..


I do this, and I get something that looks convincingly like the luminosity (sp?) of the image. Good so far.

Quote

  • Once you've got your mask loaded, choose Masks->save to alpha


Nothing happens at this point, except that I have to name a new selection.

Quote

  • Finally, delete the mask Do not merge with the current layer though.


And.... it goes back to looking just as it did before I started.

Quote
Hope that gets you on your way..


I'm so close... maybe just one more push, eh?  :-/
I was going to take screenshots to illustrate what I'm doing; then I found out that PSP doesn't want to take shots of itself for some reason.
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #5 - Posted 2002-12-12 07:34:22 »

It will go back to looking the same, but the alpha channel is still stored inside the image. You can use the alpha channel in your own apps, and if you're running XP then it'll affect the thumbnail view. You can reload the alpha into a mask again to check that its still there, just don't try and save more than one in a single file, odds are it will pick one randomly and just save that.

By separate colour and alpha, I mean paint a solid, no transparency colour image for the base, and a greyscale image that represents the alpha intensity (full white being solid, black being invisible). This gives you greater control before merging them together as a single image file.

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline markuskidd

Junior Member


Medals: 1



« Reply #6 - Posted 2002-12-12 14:39:31 »

{dons newbie suit}
erm... so how would i go about painting the sperate channels so that the dark portions of my RGB are translucent?
Offline markuskidd

Junior Member


Medals: 1



« Reply #7 - Posted 2002-12-12 14:42:44 »

Troublingly, if I export the PNG (making sure to keep 16.7 colors and using existing alpha transparancy) and then reopen it, when I click on Masks->Load from Alpha Channel it tells me that "No current documents have alpha channels."
Offline Abuse

JGO Coder


Medals: 11


falling into the abyss of reality


« Reply #8 - Posted 2002-12-12 16:26:03 »

urg, giving step by step instructions on how to use psp or photoshop is never gonna be ez.   Huh

I'll just keep it short - it does work, cos i've done it Tongue (in psp7)
(and after loading the png back in, the alpha mask is still there)

silly question, but have you read the help doc  Grin

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline markuskidd

Junior Member


Medals: 1



« Reply #9 - Posted 2002-12-12 20:33:57 »

I've found that if I save it first as a TGA file, and then export *that* as a PNG, I can recover the mask from the PNG.. I've tested both ways half a dozen times and that's what I get each time. I'm not entirely sure *why* whis would be, but it's at least progress. Hopefully I can get it working without the tedious intermediate step eventually

The only thing I guess I need to know is how to paint these PNGs so that I get the correct translucency
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Abuse

JGO Coder


Medals: 11


falling into the abyss of reality


« Reply #10 - Posted 2002-12-12 20:43:49 »

same way as any other  Cheesy

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline markuskidd

Junior Member


Medals: 1



« Reply #11 - Posted 2002-12-13 01:06:04 »

Thanks to all who have pitched in. Final verdict: using PNG export in PSP (rather than Save As and then PNG format) has been eating my alpha channel. Everything seems to be working pretty well at this point.
(Well, my framerate use has gone to sh#t, but that's the fun, right?)
Offline leknor

Junior Member




ROCK!!!


« Reply #12 - Posted 2002-12-13 18:19:46 »

In my experience PhotoShop has had weak PNG support but that was 2+ years ago. I've had better luck with the Gimp which you can get for windows here: http://www.gimp.org/win32/ It's crunchy but whatever, it works.
Offline zparticle

Senior Member




Thick As A Brick


« Reply #13 - Posted 2002-12-13 23:38:38 »

PhotoShop is the only graphics program I use, and I always use PNG format. However I have heard good things about Gimp.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (15 views)
2014-07-29 18:09:19

Riven (10 views)
2014-07-29 18:08:52

Dwinin (10 views)
2014-07-29 10:59:34

E.R. Fleming (28 views)
2014-07-29 03:07:13

E.R. Fleming (10 views)
2014-07-29 03:06:25

pw (40 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (27 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!