Transparency not quite transparent

Problems building or running the engine, queries about how to use features etc.
Post Reply
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Transparency not quite transparent

Post 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
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post 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 ;)
Image
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Post 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
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

Uh, you're right. Try removing mipmaps, just to ensure it's not a corrupted mipmap.
Image
Crashy
Google Summer of Code Student
Google Summer of Code Student
Posts: 1005
Joined: Wed Jan 08, 2003 9:15 pm
Location: Lyon, France
x 49
Contact:

Post by Crashy »

Do you have any fog on the scene?
Follow la Moustache on Twitter or on Facebook
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post 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.
Image
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Post by Vectrex »

yes! That was it. Thanks for helping. The little stars gave it away eh? :D
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 2
Contact:

Post by Kencho »

Yup, hehehe :)
Image
Post Reply