Announcement: Be excellent to each other.


Caravel Forum : Caravel Boards : General : Transparency
New Topic New Poll Post Reply
Poster Message
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Transparency (0)  
Quick question - am doing a custom sprite for my hold. How do I make parts of it transparent, i.e. round the edges, I don't want my creation to be a square :P Is there a specific input colour that DROD sees as transparent? Or does the file have to be of a specific time and include transparency?

____________________________
My Holds
Click here to view the secret text

08-26-2007 at 02:50 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Dex Stewart
Level: Smiter
Rank Points: 355
Registered: 01-19-2007
IP: Logged
icon Re: Transparency (0)  
I think it was something with a .png file and an alpha layer... but I could be wrong.

Most games use magenta though.
08-26-2007 at 03:00 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Transparency (0)  
Dex Stewart wrote:
I think it was something with a .png file and an alpha layer... but I could be wrong.

Most games use magenta though.
Just tried out magenta - it's not that.

Sorry, thought it was grey, due to having Iceworks theme! It looked right! It's actually just having transparency in the PNG.

____________________________
My Holds
Click here to view the secret text


[Last edited by calamarain at 08-26-2007 05:19 PM]
08-26-2007 at 03:06 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Monkey
Level: Master Delver
Avatar
Rank Points: 190
Registered: 03-21-2006
IP: Logged
icon Re: Transparency (+1)  
Use RGB 192,192,192.

____________________________
lurking
08-26-2007 at 06:45 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Briareos
Level: Smitemaster
Avatar
Rank Points: 3516
Registered: 08-07-2005
IP: Logged
icon Re: Transparency (0)  
I believe it only makes #c0c0c0 the transparency color if one of the corners (Top left? Or was it one of the others?) is set to #c0c0c0...

np: Radiohead - The National Anthem (Kid A)

____________________________
"I'm not anti-anything, I'm anti-everything, it fits better." - Sole
R.I.P. Robert Feldhoff (1962-2009) :(
08-26-2007 at 07:04 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5124
Registered: 02-04-2003
IP: Logged
icon Re: Transparency (0)  
Briareos wrote:
I believe it only makes #c0c0c0 the transparency color if one of the corners (Top left? Or was it one of the others?) is set to #c0c0c0...
I think this was the case in 2.0, but was changed in 3.0 so the 192-gray color may be anywhere in the sprite.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
08-26-2007 at 07:09 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Kwakstur
Level: Smiter
Avatar
Rank Points: 385
Registered: 05-05-2006
IP: Logged
icon Re: Transparency (+1)  
Briareos wrote:
I believe it only makes #c0c0c0 the transparency color if one of the corners (Top left? Or was it one of the others?) is set to #c0c0c0...

np: Radiohead - The National Anthem (Kid A)
I think it was only if any corner was that color.

Using the color Transparent (use a program that can put Transparent in a PNG) will make no change to the current graphics. As in, if you make some 22x22 squares be Transparent and make it be a mod for Tar, then Tar will look exactly the same.

Using the color 192x192x192 will make nothing display to overwrite the current color of said pixel displayed on the monitor. As in, if you make some 22x22 squares be 192x192x192 and make it be a mod for Tar, then you won't be able to see Tar at all, because instead of changing some pixels blue, the pixels will stay gray or green for the ground it's on.

Of course, these are exaggerations. Nobody would want to make a 22x22 square be entirely 192x192x192 or Transparent; you'd only want certain pixels to be those colors.

____________________________
Also known as ExpHP everywhere else.

[Last edited by Kwakstur at 08-26-2007 08:13 PM]
08-26-2007 at 08:13 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
Kevin_P86
Level: Smitemaster
Avatar
Rank Points: 535
Registered: 06-28-2005
IP: Logged
icon Re: Transparency (+1)  
Kwakstur wrote:
I think it was only if any corner was that color.
As Mr. Imer pointed out in the previous post, this was the case in 2.0 but is no longer the case in 3.0. In 3.0, it is not necessary to make one or more corner pixels #c0c0c0 to "enable" transparency in that tile.

____________________________
+++++[>+++++<-]>[>+++>++++>+++++<<<-]>.>+.>-------.<++++.+++++.
08-26-2007 at 08:50 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Transparency (+1)  
Kevin_P86 wrote:
Kwakstur wrote:
I think it was only if any corner was that color.
As Mr. Imer pointed out in the previous post, this was the case in 2.0 but is no longer the case in 3.0. In 3.0, it is not necessary to make one or more corner pixels #c0c0c0 to "enable" transparency in that tile.
Yeah, I've managed to get my custom sprite working with transparency where it should be. No need to use the grey. Yay, I've invented a new creature to battle! A semi-genuinely new one, no other creature in the game moves quite like it.

____________________________
My Holds
Click here to view the secret text


[Last edited by calamarain at 08-27-2007 07:08 PM]
08-27-2007 at 01:25 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
schep
Level: Smitemaster
Avatar
Rank Points: 865
Registered: 03-01-2005
IP: Logged
icon Re: Transparency (+1)  
I believe using grey #c0c0c0 is the officially supported way to do transparency in imported DROD tiles, though. I thought I'd heard of some cases where using PNG transparency seems to work but ends up producing buggy behavior with certain combinations of factors.
08-31-2007 at 01:20 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Transparency (0)  
schep wrote:
I believe using grey #c0c0c0 is the officially supported way to do transparency in imported DROD tiles, though. I thought I'd heard of some cases where using PNG transparency seems to work but ends up producing buggy behavior with certain combinations of factors.
How precisely should one use grey #c0c0c0? I've used PNG transparency in 3.0.0 and it works perfectly in all rooms that I've tried it in so far.

____________________________
My Holds
Click here to view the secret text

08-31-2007 at 01:58 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Monkey
Level: Master Delver
Avatar
Rank Points: 190
Registered: 03-21-2006
IP: Logged
icon Re: Transparency (0)  
Huh. When I use tranparency, I get black. I'm using Paint.Net for transparency, BTW.

____________________________
lurking

[Last edited by Monkey at 08-31-2007 02:04 AM]
08-31-2007 at 02:04 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Transparency (0)  
Monkey wrote:
Huh. When I use tranparency, I get black. I'm using Paint.Net for transparency, BTW.
I was using the GIMP (Gnu Image Manipulation Program, basically open source Photoshop) and it worked fine.

____________________________
My Holds
Click here to view the secret text

08-31-2007 at 02:17 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
coppro
Level: Smitemaster
Rank Points: 1309
Registered: 11-24-2005
IP: Logged
icon Re: Transparency (0)  
Monkey wrote:
Huh. When I use tranparency, I get black. I'm using Paint.Net for transparency, BTW.
Based on your history, I feel it's safe to ask whether or not you are using JPEG? You have to use PNG; JPEG doesn't support transparency.
08-31-2007 at 03:47 AM
View Profile Show all user's posts Quote Reply
Monkey
Level: Master Delver
Avatar
Rank Points: 190
Registered: 03-21-2006
IP: Logged
icon Re: Transparency (0)  
PNG.

____________________________
lurking
08-31-2007 at 04:00 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
coppro
Level: Smitemaster
Rank Points: 1309
Registered: 11-24-2005
IP: Logged
icon Re: Transparency (+1)  
Well, then I don't know what it is. In some programs you need to make sure that you have transparency enabled on the image; I haven't used Paint.NET because there isn't a Mono version (and I don't have Mono installed anyway) and I'm too lazy to compile it myself.

On an unrelated note, I've been looking for something to do, and so I'm compiling Paint.NET under Mono on my computer :P
08-31-2007 at 04:07 AM
View Profile Show all user's posts Quote Reply
kyevan
Level: Disabled
Rank Points: 54
Registered: 08-29-2007
IP: Logged
icon Re: Transparency (0)  
You shouldn't have to recompile. I think the problem is heavy use of p/invoke and such, anyway.
08-31-2007 at 05:47 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
coppro
Level: Smitemaster
Rank Points: 1309
Registered: 11-24-2005
IP: Logged
icon Re: Transparency (0)  
Well, so far I've discovered that I can't get the installer to work under either Mono or Wine (without getting .NET for wine).

And the only working copy of the actual Paint.NET requires me to download the SVN versions of Mono and MonoDevelop.
08-31-2007 at 07:20 PM
View Profile Show all user's posts Quote Reply
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Transparency (0)  
coppro wrote:
Well, so far I've discovered that I can't get the installer to work under either Mono or Wine (without getting .NET for wine).

And the only working copy of the actual Paint.NET requires me to download the SVN versions of Mono and MonoDevelop.
Just install the GIMP :P

____________________________
My Holds
Click here to view the secret text

09-01-2007 at 12:16 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
coppro
Level: Smitemaster
Rank Points: 1309
Registered: 11-24-2005
IP: Logged
icon Re: Transparency (+1)  
You make the unfair assumption that I don't have it installed. I suffere the same desire as many other advanced computer users - the desire to have more programs than could possibly be nessecary for a particular task.
09-03-2007 at 02:12 AM
View Profile Show all user's posts Quote Reply
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Transparency (0)  
coppro wrote:
You make the unfair assumption that I don't have it installed. I suffere the same desire as many other advanced computer users - the desire to have more programs than could possibly be nessecary for a particular task.
Oooooh, that one. Yeah, I know it well.

____________________________
My Holds
Click here to view the secret text

09-03-2007 at 03:20 AM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
schep
Level: Smitemaster
Avatar
Rank Points: 865
Registered: 03-01-2005
IP: Logged
icon Re: Transparency (0)  
VIPCOOL wrote:
I have a question. How exactly do you make a monster transparent with paint.net? I have made it 192 RGB and saved it as a PNG file. Is there anything else I have to do?
That sounds good. What happens when you import that file from the Character Management screen?
09-03-2007 at 06:46 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
Jason
Level: Smitemaster
Rank Points: 1076
Registered: 05-05-2006
IP: Logged
icon Re: Transparency (0)  
If you post it here, I'll correct it for you.

____________________________
Play my holds?
09-03-2007 at 07:11 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
schep
Level: Smitemaster
Avatar
Rank Points: 865
Registered: 03-01-2005
IP: Logged
icon Re: Transparency (0)  
Huh. That file has an alpha (transparency) channel. Removing the alpha channel made it work. Now I really wonder what DROD is doing here.

09-03-2007 at 07:33 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
schep
Level: Smitemaster
Avatar
Rank Points: 865
Registered: 03-01-2005
IP: Logged

File: dynamiteroach-noalpha.png (6.9 KB)
Downloaded 46 times.
License: Public Domain
icon Re: Transparency (+2)  
VIPCOOL wrote:
How do I do that?
Sorry, I don't know, since I use the GIMP, not Paint.net. But here's the changed file, anyway.

09-03-2007 at 07:53 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : Caravel Boards : General : Transparency
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.