I'm trying to paint a texture on to a plane and use that texture's alpha
and luminance on the plane while still using the plane's original color.
I load the texture, and then color4f(.5, .2, .2, 1.0), and i want to get a
texture out that is transparent where the texture is transparent and the
color the most intense where the texture is the most intense.
For example, I have a blotch of texture thats only a little more than a
sphere, and I use that as my intensity on my plane, I want the color to
appear most intense on that blotch, and less intense(or even black)
elseware. Moreover, I built a gaussian function for alpha to blend things
away the further they are from the center of the texture. So after I
loaded the image, I tore it apart 32 bit integer by 32 bit integer, pulled
out the alpha, multiplied it by my gaussian function and shoved it back
in. The function works, I've printed out the alpha channel to the console
and it looks veyr much like it should.
My problem is that none of this seems to work. I seem to be able to get
the intensity from my texture, but not the transparency, either my
textures are only about half transparent, or totally opaque, but not
totally transparent. I need these planes to be totally transparent at the
edges to blend better with one another, but right now all I'm getting is a
bunch of half transparent planes that obviously look like planes.
My blending function is (GL_ONE, GL_ONE_MINUS_SRC_ALPHA), and my texturing
functions are
GL_COMBINE_RGB, GL_REPLACE
GL_TEXTURE_ENV_MODE, GL_COMBINE
GL_SOURCE0_RGB, GL_PRIMARY_COLOR
GL_OPERAND0_RGB, GL_SRC_COLOR
GL_COMBINE_ALPHA, GL_REPLACE
GL_SOURCE0_ALPHA, GL_TEXTURE
GL_OPERAND0_ALPHA, GL_SRC_ALPHA
I realize these functions would probably throw out the texture's
intensity, I wasn't using them when I had the intensity working. I just
gave up on everything but getting the alpha to work.
Thanks for anything you can help with,
John
|
|
0
|
|
|
|
Reply
|
AustinWiltshire
|
7/15/2004 4:33:33 PM |
|
"AustinWiltshire" <jgraham1@Bianca.CS.Trinity.Edu> ???
news:Pine.LNX.4.44.0407151119570.4976-100000@Bianca.CS.Trinity.Edu ???...
> I'm trying to paint a texture on to a plane and use that texture's alpha
> and luminance on the plane while still using the plane's original color.
> I load the texture, and then color4f(.5, .2, .2, 1.0), and i want to get a
> texture out that is transparent where the texture is transparent and the
> color the most intense where the texture is the most intense.
What you are trying to do is to edit only the intensity of the texture, is
it ?
I think you should try to use multi texture : texture & light map.
I think you don't need to use the glBlend function, do it in the
multitexture.
Vincent
|
|
0
|
|
|
|
Reply
|
Vincent
|
7/19/2004 3:51:52 PM
|
|
|
1 Replies
214 Views
(page loaded in 0.058 seconds)
Similiar Articles: Alpha with Textures - comp.graphics.api.openglI'm trying to paint a texture on to a plane and use that texture's alpha and luminance on the plane while still using the plane's original color. I... Textures and alpha masking - comp.graphics.api.openglHi all, I'm trying to render a quad using multipass rendering in order to apply two different textures on it. The first texture is a normal 1024x102... Using 3D Textures - the best way - comp.graphics.api.opengl ...Alpha with Textures - comp.graphics.api.opengl I'm trying to paint a texture on to a plane and use that texture's alpha ... Changing a texture - comp.graphics.api.opengl ... Another Transparency Problem using png - comp.graphics.api.opengl ...... texture2); gltexenvi(gl_texture_env, gl_operand1_rgb, gl_src_color); gltexenvi(gl_texture_env, gl_combine_alpha, gl_replace); gltexenvi(gl_texture_env, gl_source0_alpha ... alpha blending of lines on polygons with depth - comp.graphics.api ...Textures and alpha masking - comp.graphics.api.opengl... object with alpha texture disappears at horizon line - Unity ... function, the polygon alpha will ... what is ... Rendering to shadow map with alpha testing on ATI cards - comp ...The non-alpha tested objects are being rendered into the shadow map correctly but the alpha tested ones are not. This is where it gets a bit weird: I am using a texture ... Texture memory usage - comp.graphics.api.openglHow to accurately compute the memory used by a texture ? I do the following (for RGB 2D textures): { GLint red, green, blue, alpha, width, height; g... Anyone using COMPRESSED_RGBA_S3TC_DXT1_EXT? - comp.graphics.api ...OK, I should have asked a different question instead: How common are RGB textures vs. real RGBA textures vs. RGBA textures where 1 Alpha bit is sufficient? volumetric textures - comp.graphics.api.openglFor a game project I want to create a tileable volumetric texture, say 64x64x64 in ... I would stick with PNG -- it compresses very well (lossless) and supports alpha ... GL_POINTS & Textures - comp.graphics.api.openglDynamic overlays, Alpha test, Stencil test - comp.graphics.api ..... up into MSB and LSB 8 bit components and loading these into two 8 bit alpha textures. ... Textures with Alpha Channels (Direct3D 9)There are two ways to encode texture maps that exhibit more complex transparency. Artifice - Making Alpha Textures - Artifice, Inc. - Creative Tools ...Step by step instructions for making your own alpha textures, for creating custom material and rendering effects in DesignWorkshop. 7/20/2012 3:07:04 AM
|