Nifflas' Support Forum

Level Editing Support => Knytt Stories Level Editing Support => Topic started by: Hmpf on July 31, 2009, 16:56:27

Title: Mysterious transparency
Post by: Hmpf on July 31, 2009, 16:56:27
Help!  :S I have this tile that seems to have a transparent line along the edge that I can't remove, no matter what I do in my graphics program (which tells me there is no transparency there, arrgh.) I have no idea how it got to be transparent in the first place, as I made it exacly the same way I made its 'mirror' image (the other side of the house) - which does *not* have this mysterious transparent line! But what's more important, everything I've tried to remove the transparency has failed, and I really need that line to be black, not transparent!

I'm attaching the tile to this post; maybe someone can take a look at it in their graphics program, and possibly even fix this?
Title: Re: Mysterious transparency
Post by: googoogjoob on July 31, 2009, 17:12:52
There is no transparent line.

Incidentally, if this involves a custom object thing, you probably ought to know that with custom objects, pure black becomes transparent when the object is in-game.
Title: Re: Mysterious transparency
Post by: Hmpf on July 31, 2009, 17:32:07
There is no transparent line.

Incidentally, if this involves a custom object thing, you probably ought to know that with custom objects, pure black becomes transparent when the object is in-game.

Ahhhh. That explains it.

Still, that makes it even stranger that this problem only occurs with this one tile, since nearly *all* of the wall/window COs I've made from that tileset have that black line along the edge, and yet only in this one does it show up as transparent in the game.  o.O

I suppose it's possible the black of that particular tile is 'purer' than that of the others... I'll try to replace it with a very dark grey...
Title: Re: Mysterious transparency
Post by: Hmpf on July 31, 2009, 17:45:35
Right, after some more testing, I have more data:

The right half of the wall actually *does* have the transparency as well. However, the window tiles, both left and right, don't - although they also have a black line along the edge. But that doesn't show up as transparent in the game. Whatever I did different with these window tiles I need to do with the wall tiles, too... Anybody has any idea what it may have been? Because I don't *remember* doing anything different. :sad:

I'm attaching the window tiles and the right-side wall tile here, if anyone would like to take a look in a graphics program or in KS or something...
Title: Re: Mysterious transparency
Post by: googoogjoob on July 31, 2009, 18:19:09
Maybe, since the windows have actual transparency in them, it doesn't treat the black as transparent.
Title: Re: Mysterious transparency
Post by: BloxMaster on July 31, 2009, 18:50:44
The wall may have indexed colors. That might happen because it doesn't have real transparency. MMF2 would therefore treat the black as the transparent color because a real one doesn't exist (in contrast, the windows have real transparency so MMF2 uses that instead of black- it's confusing). I guess the easiest suggestion is to resave it as a non-indexed image (which may or not cause this effect, I'm only guessing) or, turn the 'black' to nearly black (just one value off of black would work, even, and no one but you would ever know).
Title: Re: Mysterious transparency
Post by: Purple Pineapple on July 31, 2009, 21:20:30
Speaking from experience, the CO in KS must have 0,0,0 as transparency. If you import an object with a 0,0,0 part of it, therefore, it will become transparent. Unless, you have alpha channel, in which case every color is visible, even the transparent parts. You can't see them, because their opacity is so high.
Title: Re: Mysterious transparency
Post by: Mr. Monkey on July 31, 2009, 21:38:31
...which is basically what BloxMaster said. 9_9
Title: Re: Mysterious transparency
Post by: Purple Pineapple on July 31, 2009, 22:01:43
With a different proposed solution..
Title: Re: Mysterious transparency
Post by: Hmpf on July 31, 2009, 22:07:56
Tried the replacement thing, and it worked. :-)
Title: Re: Mysterious transparency
Post by: Bored2death on July 31, 2009, 22:47:40
Tried the replacement thing, and it worked. :-)

You're not supposed to tell anyone... now everyone knows, making this statement false:

I guess the easiest suggestion is to resave it as a non-indexed image (which may or not cause this effect, I'm only guessing) or, turn the 'black' to nearly black (just one value off of black would work, even, and no one but you would ever know).
Title: Re: Mysterious transparency
Post by: Purple Pineapple on August 01, 2009, 02:39:30
I happen to know Nifflas used a lot of "nearly black" in probably half his sprites.
Title: Re: Mysterious transparency
Post by: Shawnachu on August 01, 2009, 20:30:40
Like 1,1,1 black?
Title: Re: Mysterious transparency
Post by: Dandelion on August 01, 2009, 20:34:49
No, more of a reddish-black.
Title: Re: Mysterious transparency
Post by: Purple Pineapple on August 01, 2009, 21:18:02
You can clearly see the 8,0,0 (default MMF black) if you put one of these sprites on a pure black background.
Title: Re: Mysterious transparency
Post by: Pick Yer Poison on August 01, 2009, 22:20:20
If you look at the black water in the liquids bank while in-game, you'll notice that it actually is a very dark blue (0,0,8 or something). It becomes very obvious when you compare it to (0,0,0) black.
Title: Re: Mysterious transparency
Post by: Hmpf on August 05, 2009, 01:01:06
Right, I'm in good company then.  C)p