[GRASS5] [bug #979] (grass) NVIZ Load / Save 3-D Settings doesn't work

Paul Kelly paul-grass at stjohnspoint.co.uk
Mon Mar 25 13:06:36 EST 2002


On Mon, 25 Mar 2002, Helena Mitasova wrote:

> saving state in NVIZ is much better now that it was for SG3d (it saves also the vectors and sites and lot of other settings
> that SG3d did not save). As I said, this it is not saved in 3dview file but in a separate file - I usually store it in a directory along with
> the images - so it is not stored in GRASS database as 3dview was. Just save one file with your favourite settings and
> then you can modify it manually
> 

Well yes it is the 3dview file (saved in the GRASS database) I am talking
about, not the NVIZ state file (saved in the current working directory). 

My application is, for example: I am standing at a point with known
easting and northing (either from GPS or I just stand beside an easily
recognisable landmark that I can check on a map) and I take a
photograph. I know the roll, pitch and yaw angles (the direction the
camera is pointing) so I can calculate where the centre of view is. The
camera has also been calibrated so I know its field of view. I can then
take all these parameters, manually enter them into a 3dview file and save
it in the 3d.view directory in the GRASS database. When I load this 3dview
file in SG3d it will then draw the landscape as seen by my camera, and I
can compare the real image and GIS 3-D view and do my further analyses as
necessary.

I studied the NVIZ state file format a while ago and I can not see any
easy way of entering the same parameters. As far as I can see all the
values in the NVIZ state file are sort of referenced to the current region
and resolution; the centre of view is specified explicitly and then the
observer position is specified as a distance and direction vector with
respect to the centre of view.

It may be possible to calculate the correct values of these parameters
from the values in the 3dview file but it is beyond me (presumably that is
what the disabled 'Load 3dview' function is supposed to do).


> > Perhaps in a year or so's time I may be in a position to fix the problem 
> > myself, but at the minute I would be out of my depth: beyond the tcl/tk 
> > functions, there are several layers of nested function calls back through 
> > the gsurf library to the low-level G_get_3dview and G_save_3dview that SG3d 
> > and d.3d use.
> 
> This is one thing that bothers me about the NVIZ design. One reason for re-designing SG3d to NVIZ by developing gsurf library
> was to make the development of enhancements, customization and development of various interfaces easier.
> However, it seems the the result is just the opposite. While adding such features as a wide range of possibilities to display sites,
> displaying scale and legends or adding volumes to SG3d was possible and was done relatively quickly, it seems to be
> extremely complex if not next to impossible in the current structure of NVIZ code.
> 

I have been gaining that impression as well so it is good to see somebody
agrees. I have been experimenting with some modifications to SG3d and I
must say it is been very easy and clear to find the relevant pieces of
code, and easy to follow as it is all written in C.

> exact positioning and saving the state is absolutely crucial for GIS applications and it is functional, so please first check
> the version of NVIZ that you are using and then if it is up to date and still does not work it may be an SGI specific issue
> (we can check with Bill Brown whether he has it working as I am not using SGI any more). Or you are trying to load 3dview
> fiel instead of nviz state file.
> 

Yes as said above I am looking to load a 'classic' 3dview file. I am
definitely using 5.0pre3. If there is an easier way of doing this I would
be very grateful to hear about it.

Thank you very much for the reply; your opinion is highly valued

Paul Kelly






More information about the grass-dev mailing list