From: <pat...@lm...> - 2003-03-31 20:45:15
|
Microsoft Mail Internet Headers Version 2.0 Message-ID: <3E8...@lm...> Date: Mon, 31 Mar 2003 15:45:02 -0500 From: Mark Montana <pat...@lm...> X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: gl4...@li... CC: Pepijn Van Eeckhoudt <pep...@lu...> Subject: FYI...Solved my dark texture problem References: <3E8...@lu...> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-Path: pat...@lm... X-OriginalArrivalTime: 31 Mar 2003 20:45:04.0485 (UTC) FILETIME=[6846C950:01C2F7C6] In case anyone has this texturing problem in the future, here was my solution... I reverted back to using GL_BLEND mode for the texturing. The equation that OpenGL uses in this mode (for an RGB texture) is: C = Cf(1-Ct) + Cc*Ct where Cf = the existing fragment color (underlying polygon color) Ct = the texel color (texture image in that position) Cc = is a blend color you can set for texturing At first I set Cf and Cc to pure white (hoping to get the brightening effect I wanted). However, I got no texture, only pure white polygons. From the equation above, I could have predicted this, since the Ct components completely cancel out when Cf = Cc. Therefore, I was only left with Cf in the equation. As a solution, I set Cf (the polygon color) to (0.15, 0.15, 0.15, 1.0), and I set Cc (the blend color) to (1.0, 1.0, 1.0, 1.0). This gave me nice results with the lightening I was looking for. Thanks again for the feedback I received. This mailing list is a great resource. -Mark Pepijn Van Eeckhoudt wrote: > > (4) Back to the textures being too dark. I am currently using MODULATE, and > > the underlying color is pure white (again, 2D, no lighting, no normals). The > > texture is still too dark. The same texture looks good in our Java3D display, > > because we are using a Java3D mechanism related to combining fragments and > > anisotropic filtering. In the GL4Java side, I decided to give the BLEND > > texture mode a try. When I use that, I only get the pure blend color (no > > texture). I enabled blending and I used glBlendFunc() to play with the > > blending methods. (I would supply some sample code here, but I already > > deleted that failed attempt.) > > > > What happens when you use REPLACE? And if you disable the texture, is > the polygon pure white? > > Pepijn > > > Thanks again for any advice. > > -Mark > > > > > > ------------------------------------------------------------ > Name: file:///C|/DOCUME%7E1/PEPIJN/LOCALS%7E1/TEMP/nsmail.tmp > file:///C|/DOCUME%7E1/PEPIJN/LOCALS%7E1/TEMP/nsmail.tmp Type: application/pgp-signature > Encoding: base64 > > Part 1.2Type: application/pgp-signature |