[osg-users] [vpb] osgdem, any way to disable all texture compression?

80 views
Skip to first unread message

Ethan Fahy

unread,
Jun 12, 2012, 2:58:54 PM6/12/12
to osg-...@lists.openscenegraph.org
Hello all,

Is there any way to disable all texture compression when using osgdem? I realize this in an unusual request and that my frames per second and model size would go way up, but I was hoping to retrieve the exact original texel values from the textures for lookup table purposes. I thought that the -RGBA flag might do the trick but when I zoom in on the output terrain database and compare it to my source texture I can still see compression artifacts that would prevent me from using a lookup table in my shaders.

Thanks,

-Ethan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48252#48252





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Robert Osfield

unread,
Jun 12, 2012, 3:36:29 PM6/12/12
to osg-...@lists.openscenegraph.org
Hi Ethan,

You'll need to use one of:

--RGB-16 Use 16bit RGB destination imagery.
--RGB-24 Use 24bit RGB destination imagery.
--RGB32F Use 3 channel, 32bit per channel destination imagery.
--RGBA Use 32bit RGBA destination imagery.
--RGBA-16 Use 16bit RGBA destination imagery.

Use osgdem -h to list all the options. Note, -RGBA won't be recognized
as --RGBA.

Robert.

Ethan Fahy

unread,
Jun 13, 2012, 7:18:45 AM6/13/12
to osg-...@lists.openscenegraph.org
Thanks for the reply Robert. To clarify, when you say that I need to use one of --RGB-16, --RGB-24, etc., do you mean that I must use one of those and any of them should give me uncompressed output textures, or do you mean that osgdem does not support uncompressed output textures and I must instead use of one these?

To clarify my position, I have been running osgdem as follows:

osgdem -t texture.tif -d dem.tif --TERRAIN --no-interpolate-imagery --RGBA -l 1000 -o out.ive

I chose an arbitrarily large number for -l because it is my understanding that osgdem will stop creating new levels after it has reached the resolution of the source texture file; in my case that ends up being 6 lod levels. My thinking is that if I zoom way in on the highest level of detail of the out.ive terrain model and compare that to my original texture.tif file that the pixels should be the same and that I should not see signs of compression. I am attaching two images to demonstrate what I mean by signs of compression. I am specifically referring to how the original image will have 4 adjacent pixels of different colors that end up as one large pixel of equal color in the output terrain model.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48271#48271



osgdemModelZoomIn.PNG
originalTextureZoomIn.PNG

Robert Osfield

unread,
Jun 13, 2012, 8:49:07 AM6/13/12
to osg-...@lists.openscenegraph.org
Hi Ethan,

It rather looks like you have an resolution issue with the texture,
it's so low that when the tiles a divided the sampling of the texture
results in the blocks - this is what you'd expect when you switch off
interpolation of the imagery. Please just use the defaults, you'll
tend to get the best all round results. Also have a look at the
source resolution of the imagery and DEM's. The VPB project is
written to scale up to handling terrabytes of source imagery and dems
so through what data you have it.

Robert.

Ethan Fahy

unread,
Jun 13, 2012, 8:54:02 AM6/13/12
to osg-...@lists.openscenegraph.org
Thanks Robert, I appreciate the quick reply. I seem to have it working the way I was hoping by removing the --no-interpolate-terrain flag and by also change the osgdem src code to allow me to use NEAREST min and max filters so that my index colors wouldn't be interpolated.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=48276#48276
Reply all
Reply to author
Forward
0 new messages