[GRASS-dev] [GRASS GIS] #1771: Map flips horizontally in wxNVIZ

GRASS GIS trac at osgeo.org
Sun Jun 16 19:01:13 PDT 2013

#1771: Map flips horizontally in wxNVIZ
 Reporter:  MilenaN  |       Owner:  grass-dev@…              
     Type:  defect   |      Status:  new                      
 Priority:  normal   |   Milestone:  6.4.3                    
Component:  wxGUI    |     Version:  6.4.3 RCs                
 Keywords:  wxnviz   |    Platform:  All                      
      Cpu:  x86-64   |  
Changes (by hamish):

  * keywords:  => wxnviz


 Anna wrote:
 > As far as I remember nviz has always behaved this way

 yes, you get the same effect in tcl/tk NVIZ and I guess m.nviz.image.

 i.e. when looking up from underneath it flips it:

 # NC dataset
 g.region rast=elev_lid792_1m
 r.univar elev_lid792_1m
 mean: 120.769

 I'm not sure how useful looking from underneath is for DEMs, but it is
 probably of interest when working with 3D raster volumes.

 In tcl/tk nviz I notice with elev_lid792_1m if you do look:[Top], set the
 perspective to 15.0, zexag to 1.0, and height to 7650.01 the image
 disappears. At 7650.00 it reappears. In the wxnviz is does the same but it
 transitions out between 7610 and 7630m viewing height.

 at perspective=15.0 and height=2000.0 you can see it in the process of
 disappearing at zexag=4.00 (actually the perspective doesn't matter), just
 the tops of the hills are visible. (both tcl/tk nviz and wxNviz)

 for m.nviz.image I've been fighting the flip in another way while trying
 to get the viewing height to actually be where you ask it to be. i.e.
 changing the viewing height is all that is needed to flip it.
 (height*2.0/zexag as a correction factor seems to help avoid having the
 z-exag change the viewing height without you asking; correcting that for
 changing perspective value is probably much more math to cancel out), but
 that's when slightly adjusting the viewpoint in top-down view, which is a
 bit like balancing on a pin head. For now I added a -r rotate flag to
 manually flip it if needed in the d.anaglyph addon.
 I think in m.nviz.image the flipping I'm seeing could possibly happen with
 z-exag at the same place as it makes the surface disappear in nviz, but
 I'd have to test that.


Ticket URL: <https://trac.osgeo.org/grass/ticket/1771#comment:2>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list