Transparency not quite transparent

Problems building or running the engine, queries about how to use features etc.

Transparency not quite transparent

Postby Vectrex » Tue Nov 06, 2007 3:29 pm

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
Vectrex
Ogre Magi
 
Posts: 1266
Kudos: 1
Joined: 12 Aug 2003
Location: Melbourne, Australia

Postby Kencho » Tue Nov 06, 2007 3:55 pm

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
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4011
Kudos: 1
Joined: 19 Sep 2003
Location: Burgos, Spain

Postby Vectrex » Wed Nov 07, 2007 7:21 am

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
Vectrex
Ogre Magi
 
Posts: 1266
Kudos: 1
Joined: 12 Aug 2003
Location: Melbourne, Australia

Postby Kencho » Wed Nov 07, 2007 1:18 pm

Uh, you're right. Try removing mipmaps, just to ensure it's not a corrupted mipmap.
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4011
Kudos: 1
Joined: 19 Sep 2003
Location: Burgos, Spain

Postby Crashy » Wed Nov 07, 2007 1:56 pm

Do you have any fog on the scene?
Follow la Moustache on Twitter or on Facebook
Image
Crashy
Google Summer of Code Student
Google Summer of Code Student
 
Posts: 962
Kudos: 27
Joined: 08 Jan 2003
Location: Lyon, France

Postby Kencho » Wed Nov 07, 2007 2:04 pm

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
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4011
Kudos: 1
Joined: 19 Sep 2003
Location: Burgos, Spain

Postby Vectrex » Wed Nov 07, 2007 2:21 pm

yes! That was it. Thanks for helping. The little stars gave it away eh? :D
Vectrex
Ogre Magi
 
Posts: 1266
Kudos: 1
Joined: 12 Aug 2003
Location: Melbourne, Australia

Postby Kencho » Wed Nov 07, 2007 2:25 pm

Yup, hehehe :)
Image
User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
 
Posts: 4011
Kudos: 1
Joined: 19 Sep 2003
Location: Burgos, Spain


Return to Help

Who is online

Users browsing this forum: No registered users and 9 guests