Re: [osg-users] Understanding Transparent Textures with an transparent image with alpha channels

2010-06-30 Thread J.P. Delport

Hi,

did you enable blending in your scene? What format texture are you loading?

jp

On 29/06/10 23:34, Tim Larson wrote:

I am attempting to utilize a transparent image as a texture map.

I can successfully display the transparent image as a texture on a simple 
rectangular geometry.

But, I would like to be able to see through to the background wherever the 
image is transparent.

I've utilized the osgHelp program GeometryTexture as a baseline and I can 
load my image, but the transparent parts of the image show through to the default gray 
material of the underlying geometry.  I see a gray rectangle with my image on top of it.  
Even though my image has many transparent areas.

I would like to be able to see through the transparent areas of the image into 
the background.  i.e. If all I have on the screen is a single rectangular 
geometry with my transparent image, then I'd like to see the blue background 
through the transparent parts of my image.

Can anyone give me a pointer or advise?

Thanks in Advance.

Tim

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=29503#29503





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their support.


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Understanding Transparent Textures with an transparent image with alpha channels

2010-06-30 Thread Trajce (Nick) Nikolov
attach a screenshot of what you are seeing
-Nick


On Wed, Jun 30, 2010 at 6:25 PM, Tim Larson tlar...@hunter.com wrote:

 Thank you.

 I've experimented with enabling blending by calling
 pStateSet-setMode(GL_BLEND) on my geometry.  I've also experimented with
 creating a material for the geometry that has an alpha value.
  Unfortunately, this does not have the desired effect.  Applying an alpha
 value to the material for the geometry makes the entire geometry and image
 partially transparent.  I would like to have the transparency level
 determined by the alpha values within my image.  The image has some areas
 that are completely transparent and some areas that are completely opaque.
  The Image is a TGA image with alpha transparency.

 I can confirm that the transparency of the image is intact, because if I
 change the color of the geometry's material, I can see that color behind
 the image.

 But, my goal is to have the geometry on which the image placed be invisible
 so that all that is seen is the image.  And, the user can see through the
 transparent elements of the image to the background or to other geometries
 that may be behind.

 I've attached the small source file and my actual image.

 Thank you for your assistance.

  Tim


 J.P. Delport wrote:
  Hi,
 
  did you enable blending in your scene? What format texture are you
 loading?
 
  jp
 
  On 29/06/10 23:34, Tim Larson wrote:
 
   I am attempting to utilize a transparent image as a texture map.
  
   I can successfully display the transparent image as a texture on a
 simple rectangular geometry.
  
   But, I would like to be able to see through to the background
 wherever the image is transparent.
  
   I've utilized the osgHelp program GeometryTexture as a baseline and I
 can load my image, but the transparent parts of the image show through to
 the default gray material of the underlying geometry.  I see a gray
 rectangle with my image on top of it.  Even though my image has many
 transparent areas.
  
   I would like to be able to see through the transparent areas of the
 image into the background.  i.e. If all I have on the screen is a single
 rectangular geometry with my transparent image, then I'd like to see the
 blue background through the transparent parts of my image.
  
   Can anyone give me a pointer or advise?
  
   Thanks in Advance.
  
   Tim
  
   --
   Read this topic online here:
   http://forum.openscenegraph.org/viewtopic.php?p=29503#29503
  
  
  
  
  
   ___
   osg-users mailing list
  
  
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
  
  
 
  --
  This message is subject to the CSIR's copyright terms and conditions,
 e-mail legal notice, and implemented Open Document Format (ODF) standard.
  The full disclaimer details can be found at
 http://www.csir.co.za/disclaimer.html.
 
  This message has been scanned for viruses and dangerous content by
 MailScanner,
  and is believed to be clean.  MailScanner thanks Transtec Computers for
 their support.
 
  ___
  osg-users mailing list
 
 
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
 
   --
  Post generated by Mail2Forum


 --
 Read this topic online here:
 http://forum.openscenegraph.org/viewtopic.php?p=29521#29521




 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Understanding Transparent Textures with an transparent image with alpha channels

2010-06-29 Thread Tim Larson
I am attempting to utilize a transparent image as a texture map.

I can successfully display the transparent image as a texture on a simple 
rectangular geometry.

But, I would like to be able to see through to the background wherever the 
image is transparent.

I've utilized the osgHelp program GeometryTexture as a baseline and I can 
load my image, but the transparent parts of the image show through to the 
default gray material of the underlying geometry.  I see a gray rectangle with 
my image on top of it.  Even though my image has many transparent areas.

I would like to be able to see through the transparent areas of the image into 
the background.  i.e. If all I have on the screen is a single rectangular 
geometry with my transparent image, then I'd like to see the blue background 
through the transparent parts of my image.

Can anyone give me a pointer or advise?

Thanks in Advance.

Tim

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=29503#29503





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org