[GRASS-dev] [GRASS GIS] #2381: lighting/shading for vector objects backward in nviz

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Tcl/Tk NVIZ | Version: svn-trunk
Keywords: | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
I just tried to display a map with an overlay of vector points and they
all looked black, regardless of the color I chose. Turns out that when the
view is from the SE and the light is also from the SE (both defaults), the
vector spheres are in shadow. If I switch the light to the NW, the face of
the spheres are lit--but of course the shadows on the surface are going
the other way. This reversal also applies to light height. When the light
is low, a sphere is lit from the top; when the light is high, there is
very oblique lighting--again reversed from the surface. So there is a
flipped variable somewhere.

I've attached a screenshot of a surface and points with a view from the SE
and lighting from the SE. The shadows on the surface are to the NW
(correct), but the spheres in completely in shadow (incorrect).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Keywords: wxnviz | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by annakrat):

  * keywords: => wxnviz
  * component: Tcl/Tk NVIZ => wxGUI

Comment:

I don't have such problem. Are you looking at the surface from top? No
idea what could cause this...

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Keywords: wxnviz | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Did you look at the screenshot? I tried this again with the nc_08 data, to
make sure it was not something in my files, and have the same results
(displaying elevation and firestations). The telling thing is to make the
sphere's fairly large (e.g., 500) and watch the light model as you move
the puck in the appearance pane.

For example, set the view to the west (observer puck in the east). Switch
to the appearance pane and move the lighting puck from east to west. The
"light model" sphere will go from light to dark. But the vector point
spheres will go from dark to light. Height is harder to figure out because
it is also affected by the direction of the light. Height may in fact be
OK once the horizontal direction is reversed.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Keywords: wxnviz | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by annakrat):

I can see it now but only on Mac. I feel like I've seen it before but I
don't remember. Do you have any idea when was the last time it worked?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Keywords: wxnviz | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

It works fine with GRASS 7.0 beta 1, compiled 3 April 2014.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Keywords: wxnviz | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

Replying to [comment:4 cmbarton]:
> It works fine with GRASS 7.0 beta 1, compiled 3 April 2014.

It is reversed on GRASS 7.0 beta 2 svn, compiled 14 July.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Keywords: wxnviz | Platform: MacOSX
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by annakrat):

  * platform: Unspecified => MacOSX

Comment:

That's helpful to know. I assume the wxPython version is the same. There
were a few changes in nviz gui done by hcho 4 weeks ago so we could start
investigating there. BTW, there are no problems on Windows.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-------------------------+--------------------------------------------------
Reporter: cmbarton | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Keywords: wxnviz | Platform: MacOSX
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by cmbarton):

I made no change in wxPython versions (that I remember) over that short
time frame.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-----------------------+----------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: wxnviz
  Platform: MacOSX | Cpu: Unspecified
-----------------------+----------------------------------------------------
Changes (by annakrat):

  * status: new => closed
  * resolution: => fixed

Comment:

Should be fixed and backported in r61477, r61478. It was related to #2339.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#2381: lighting/shading for vector objects backward in nviz
-----------------------+----------------------------------------------------
  Reporter: cmbarton | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 7.1.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: wxnviz
  Platform: MacOSX | Cpu: Unspecified
-----------------------+----------------------------------------------------

Comment(by cmbarton):

Great. Thanks.

Michael

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2381#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>