Hi Robert,

Is OSG setting the alpha of the low-res to 0 in areas of hi-res imagery,
or does it build a deeper LOD pyramid at those locations.  Just curious.

A switch would work just fine, thank you.  I can help out with that if
you like.

BTW, just being laz... er... efficient (yeah that's it) but how does
osg::Terrain handle single channel (luminance/intensity/monochromatic)
images?  I've built a database or two with one and noticed that there
appears to be some artifacts when rendered (the colors varied slightly
instead of being all equal).  Could compression be sneaking in?

Thanks tons,
Brad

---
RSC
BDC

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:osg-users-
> [EMAIL PROTECTED] On Behalf Of Robert Osfield
> Sent: Wednesday, October 18, 2006 11:42 PM
> To: osg users
> Subject: Re: [osg-users] Re: [osg-submissions] Fix for
> osg::Terraindropingcolor values of texture when alpha == 0
> 
> HI Brad,
> 
> The compositing happens when you overlay high res layers over the top
> of low res layers.  It is prefectly normal to use the alpha value
> clipping to prevent empty areas oblitering real values below.  There
> are users that use this feature.
> 
> What is unusual is that fact that you are using RGBA to encode non
> RGBA data.  This is fine, but is well off the road when it comes to
> the what osgTerrain expects.  However, despite the unusual nature I'm
> still open to adding a switch to control osgTerrain default behavior
> on how it handles alpha.
> 
> Robert.
> 
> On 10/18/06, Brad Colbert <[EMAIL PROTECTED]> wrote:
> > Robert,
> >
> > But where does this compositing happen?  In osg::Terrain or on the
> > graphics hardware during rendering?
> >
> > I can't imagine an instance where if the alpha is 0 that you
wouldn't
> > just copy the RGB values anyway.  If the alpha value is being
respected,
> > then it will prevent the RGB values from having any effect.
> >
> > I also would argue that osg::Terrain shouldn't be doing the
compositing.
> > That the hardware should do it during runtime or the user should do
it
> > before the dbase build with other image tools.
> >
> > Just my $0.02.
> >
> > Thanks,
> > Brad
> >
> > ---
> > RSC
> > BDC
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:osg-users-
> > > [EMAIL PROTECTED] On Behalf Of Robert Osfield
> > > Sent: Tuesday, October 17, 2006 11:54 PM
> > > To: osg users
> > > Subject: [osg-users] Re: [osg-submissions] Fix for osg::Terrain
> > > dropingcolor values of texture when alpha == 0
> > >
> > > Hi Brad,
> > >
> > > The ideal of this line of code is to allow compositing of layers
of
> > > imagery such that the alpha'd out imagery doesn't have any effect,
> > > this is the usual way to tackle things.
> > >
> > > I'm you case you seem to have data that has an alpha of 0, but you
> > > still want it to have an effect.  Perhaps we could have an option
to
> > > set the value or not when the alpha value of 0, but just disabling
> > > this line of code is certainly wrrong.
> > >
> > > Robert.
> > >
> > > On 10/18/06, Brad Colbert <[EMAIL PROTECTED]> wrote:
> > > > 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
> > > >
> > > >
> > > > ---
> > > > Renaissance Sciences Corporation
> > > > O/M: 480 290-3997
> > > > F:   425 675-8044
> > > >
> > > > _______________________________________________
> > > > osg-submissions mailing list
> > > > [EMAIL PROTECTED]
> > > > http://openscenegraph.net/mailman/listinfo/osg-submissions
> > > >
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > http://www.openscenegraph.org/
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to