Hi Dmitry,

I have followed your instructions and also come across the flipping of the terrain in the Y axis.  I have tried using the png's directly and this also has the problem so the problem isn't related to the data source, and points to a problem in DataSet.

Working with this dataset used to work, at least the 16kx16k datasets did, it was the very first dataset that I started testing osgTerrain on.  It now handles much larger and more complex datasets, but should also still work with the simpler datasets like this.  I have just conducted some other data tests to make sure that conventional (ones with gesopatial coords) datasets work fine and the results all look good.

Since 1.0 there has been the addition of some terrain interpolation code to improve on accuracy of reading terrain data, and disabling this optimization code does fix the problem.  Change line 978 of DataSet.cpp to:

               bool interpolateTerrain = false;

I've done a quick review of the code and can't spot any reason why there should be a difference.  Perhaps the author of this change, Jason Beverage, will be able to spot why this particular dataset doesn't work, while others work perfectly.

Robert.

On 9/16/06, Dmitry Platonov <[EMAIL PROTECTED]> wrote:
I'm using OSG v. 1.2
I'm following
http://www.openscenegraph.org/index.php?page=UserGuides.Osgdem
(exept gdaladdo -r average, which is not working for me).
All is somewhat well (maybe, too slow database
generation), but texture and mesh are misaligned (in fact,
one of them is flipped around Y axis). Data files are OK.
Is there bug in DataSet.cpp?
Steps to reproduce:
1) Download
http://www-static.cc.gatech.edu/data_files/large_models/ps/ps_texture_1k.png
and
http://www-static.cc.gatech.edu/data_files/large_models/ps/ps_height_1k.png
Verify that files are matching.
2)
$ gdal_translate ps_height_1k.png ps_height_1k.tif
$ gdal_translate ps_texture_1k.png ps_texture_1k.tif
3)
$ osgdem -t ps_texture_1k.tif -d ps_height_1k.tif -l 3 -v
0.001 -o puget.ive -a puget.osga
4)
$ osgviewer puget.osga
Playing with t & l keys, it's clearly visible that mapping
does not follows mesh.
---
Professional hosting for everyone - http://www.host.ru
_______________________________________________
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