|
I found the problem! In osg::Terrain in the file DataSet.cpp starting at line 814 is the
following code:
if (hasAlpha)
{
// only copy over source pixel if
its alpha value is not 0
if
(sourceColumnPtr[3]!=0)
{ The problem is that it skips copying the color values if the alpha is
zero. This is the wrong thing to do because those values may be very
important. Simply commenting out the code fixed my problem.
if (hasAlpha)
{
// only copy over source pixel if
its alpha value is not 0
//if (sourceColumnPtr[3]!=0)
// BDC The values should still be
copied since they may be very important.
{ Cheers, Brad --- RSC BDC > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:osg-users- > [EMAIL PROTECTED] On Behalf Of Brad Colbert > Sent: Tuesday, October 17, 2006 11:25 AM > To: osg users > Subject: [osg-users] OSGDEM database RGB black where alpha < 1.0. > > Hi Folks, > > I know I asked this a few months ago, but I still haven't found the > source of the problem. > > I am generating a database using OSGDEM. The imagery has four > components (Red, Green, Blue, Alpha) but the RGB components are black > wherever the alpha is < 1.0. What would cause this? > > Using a shader to select just the RGB components I get black where the > alpha component is < 1.0. Does the fixed function blending have an > effect on this? > > Or does OSGDEM perform some image translation that could be "applying" > the alpha during database generation? > > For reference I've attached my source image and database. The following > command was used to generate the database: > > osgdem --RGBA -t TestPatch.tif -o TestPatch.ive > > -B > > --- > Renaissance Sciences Corporation > O/M: 480 290-3997 > F: 425 675-8044 |
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
