Hi Ethan,

You are correct, VPB does texture colour and normal equalization at
tile boundary to avoid the tile boundaries being obvious.  The code is
written specifically for RGB/RGBA data and was never written with the
idea that int data would be used.

In your case one would need to turn off the boundary equalization for
the imagery.

Robert.

On 30 May 2013 15:17, Ethan Fahy <[email protected]> wrote:
> I use osgdem with the --no-interpolate-imagery and --no-mipmap optiosn to 
> wrap geotiff imagery onto my terrain complex.  However, the unsigned int rgb 
> channels contain index values to be used in lookup tables in the shader, not 
> real imagery.  Because of this, it is important that the color values 
> contained in the input geotiffs be carried all the way through the osgdem 
> process without any interpolation.
>
> I modified the src for VPB to force NEAREST for the textures, and use the 
> --no-interpolate-imagery and --no-mipmap options to try to keep any 
> interpolation from happening.  For the most part, everything works and I am 
> able to get the correct index values in my shader.  The exception is at tile 
> boundaries of the osgdem-generated terrain complex.
>
> To test this, I used a geotiff that only had values of 13 and 15 in it and 
> generated an osgdem terrain.  In my shader, I decode those index values and 
> color the terrain grees in the value is either 13 or 15, and red if it's 14.  
> The entire terrain is green except at the tile boundaries where spots of red 
> show up.  This leads me to believe that interpolation is happening at the 
> tile boundaries.  Am I correct in this assumption?  Any thoughts on how I 
> might prevent this from happening?  Thanks.
>
> -Ethan
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=54312#54312
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to