<div dir="ltr">If you feed the TIFF LWZ coder the same 4-bit data as the PNG is made form, I would think it would code about as efficiently, even if the data is stored in an 8-bit representation. Forward-dictionary compression systems work on how many unique symbols are found and if you make a 16m color image with only 256 colors, it'll only take 256 symbol table entries to store.<div><br></div><div>I'm not sure why the TIFF wouldn't be displaying. What is the bit depth of the TIFF? Have you told osgEarth how to scale the elevation from the TIFF file into real world units? If it's an 8-bit TIFF, you are only feeding it up to 256m of elevation which won't look like much for the Andes.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 8, 2019 at 12:32 PM Rodrigo Dias <<a href="mailto:rodrigo1406@gmail.com">rodrigo1406@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Sorry, I didn't post the updated code:<br>
<br>
<br>
Code:<br>
#include <iostream><br>
#include <osg/Camera><br>
#include <osgDB/ReadFile><br>
#include <osgGA/TrackballManipulator><br>
#include <osgViewer/Viewer><br>
#include <osgEarth/ImageLayer><br>
#include <osgEarth/Map><br>
#include <osgEarth/MapNode><br>
#include <osgEarthDrivers/gdal/GDALOptions><br>
<br>
using namespace std;<br>
using namespace osg;<br>
using namespace osgEarth;<br>
using namespace osgEarth::Drivers;<br>
<br>
int main (int argc, char** argv) {<br>
        MapOptions mapOpt;<br>
        mapOpt.coordSysType() = MapOptions::CSTYPE_PROJECTED;<br>
        mapOpt.profile() = ProfileOptions("plate-carre");<br>
        osg::ref_ptr<Map> map = new Map(mapOpt);<br>
        {<br>
                GDALOptions gdal;<br>
                gdal.url() = "br_modified.tif";<br>
                osg::ref_ptr<ImageLayer> layer = new ImageLayer( "BR", gdal );<br>
                map->addLayer( layer );<br>
        }<br>
        {<br>
                GDALOptions gdal;<br>
                gdal.url() = "BRalt.tif";<br>
                osg::ref_ptr<ElevationLayer> layer = new ElevationLayer( "SRTM", gdal );<br>
                map->addLayer( layer );<br>
        }<br>
        osg::ref_ptr<MapNode> mapNode = new MapNode( map );<br>
        osgViewer::Viewer viewer;<br>
        viewer.setSceneData( mapNode.get() );<br>
        viewer.setCameraManipulator( new osgGA::TrackballManipulator );<br>
        while ( !viewer.done() ) {<br>
                viewer.frame();<br>
        }<br>
        return 0;<br>
}<br>
<br>
<br>
<br>
<br>
As you can see, I guess I should be seeing some elevation by now, since my image is a square around Brazil, and it includes a good portion of the Andes mountain range (with higher pixels closer to white, and sea level in black).<br>
<br>
The texture file is 4392x4392 pixels (1.6 MB on PNG/4-bit-depth and 2.6 MB on TIFF/LZW/8-bit-depth, the difference seems due to bit depth, and I'm not sure if I can use a 4-bit TIFF, but that's ok by now; I'll also try tiling later). The elevation file is 588x588 pixels (70 kB). Both TIFFs are GeoTIFFs.<br>
<br>
What I'm trying to accomplish is this: <a href="https://www.youtube.com/watch?v=vVm_qWeB9wg" rel="noreferrer" target="_blank">https://www.youtube.com/watch?v=vVm_qWeB9wg</a><br>
<br>
Thank you!<br>
<br>
Cheers,<br>
Rodrigo<br>
<br>
------------------<br>
Read this topic online here:<br>
<a href="http://forum.openscenegraph.org/viewtopic.php?p=75423#75423" rel="noreferrer" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=75423#75423</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div style="text-align:center">Chris 'Xenon' Hanson, omo sanza lettere. Xenon@AlphaPixel.com <a href="http://www.alphapixel.com/" target="_blank">http://www.alphapixel.com/</a></div><div style="text-align:center">Training • Consulting • Contracting</div><div style="text-align:center">3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL</div><div style="text-align:center"><span style="font-size:12.8px">Legal/IP •</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">Forensics •</span><span style="font-size:12.8px"> </span>Imaging <span style="font-size:12.8px">•</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">UAVs </span><span style="font-size:12.8px">• GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android</span></div><div style="text-align:center"><a href="https://twitter.com/alphapixel" target="_blank">@alphapixel</a> <a href="http://facebook.com/alphapixel" target="_blank">facebook.com/alphapixel</a> (775) 623-PIXL [7495]<br></div></div></div></div></div></div>