Page 1 of 1

Transparency not quite transparent

Posted: Tue Nov 06, 2007 3:29 pm
by Vectrex
Hi. My sun glare billboard isn't quite transparent (not just against the sky)
Image
The ogre flare.png also does this
The texture doesn't actually have an alpha channel but I'm using the add blend mode and I'm sure the black is black (0,0,0 in photoshop)

Here's my material

Code: Select all

material Sun/Flare
{
	technique
	{
		pass
		{
			lighting off
			scene_blend add
			depth_write off
			depth_check off

			texture_unit
			{
				tex_address_mode clamp
				filtering none
				texture sun_mawbs_medContrast.png
			}
		}
	}
}
thanks

Posted: Tue Nov 06, 2007 3:55 pm
by Kencho
I was having the exact same problem with the flare texture bundled with Ogre. It's really a texture problem. The best way is to open it, go to "Adjust levels", and use the colour picker to pick the "black" colour. You should pick not in a corner, but in the midpoint of any side (and preferrably, a bit inside, not the border itself). Better to waste some texture space than to notice cropped borders ;)

Posted: Wed Nov 07, 2007 7:21 am
by Vectrex
yeah, that's what I thought too, but I'm SURE it's black :D Here's the texture
http://users.on.net/~edan/cam/Ogre/sun_ ... ntrast.png

Posted: Wed Nov 07, 2007 1:18 pm
by Kencho
Uh, you're right. Try removing mipmaps, just to ensure it's not a corrupted mipmap.

Posted: Wed Nov 07, 2007 1:56 pm
by Crashy
Do you have any fog on the scene?

Posted: Wed Nov 07, 2007 2:04 pm
by Kencho
Didn't even notice. He seems to be using Caelum, so I guess it has. Good catch Crashy.

Add fog_override true none to the pass.

Posted: Wed Nov 07, 2007 2:21 pm
by Vectrex
yes! That was it. Thanks for helping. The little stars gave it away eh? :D

Posted: Wed Nov 07, 2007 2:25 pm
by Kencho
Yup, hehehe :)