[GRASS-user] Control of camera position in NVIZ

Using NVIZ, I have been able to visualize a segment of roadway my research group scanned with LiDAR. The visualization is perfect for what we are looking for, but there are two things we’d like to do next that I am having difficulty with.

  1. We’d like to make an animation of the roadway from a drivers POV. Using the visualization utilities in NVIZ I have been able to manually adjust the viewing perspective of the visualization to a point that looks good, as in it looks like what the driver would see if they were in a vehicle and the vehicle was on the edge of the visualized surface (or very close to it). However is there anyway to advance the camera forward, again as if on a vehicle, as if it’s driving ON the roadway? From what I can tell, the ‘camera’, or POV for viewing the visualized surface, can be anywhere on a radius away from the surface, however I cannot make the camera advance to hover over part of the visualized surface. I can get a good POV shot for a vehicle about to get started on the roadway, but not for driving across it. I’d like to make an animation with frame 1 being what I have now, but frame 2 etc being that exact same orientation, but with the camera having ‘advanced’ down the roadway. I cannot seem to make frames 2 onwards.

  2. In the future we’d like to collect camera images of the driver’s POV looking out the front windshield, so that we’d have an image from the orientation we’d like to see. Right now I am adjusting the angles until it ‘looks good’ - is there anyway to use this out-the-windshield image to EXACTLY align the visualization into that orientation so that the image and the visualization are identically aligned? I am also aware of the orthophoto utilities in GRASS, however without these images I have been unable to play with that. Will orthophoto do this?

I recently found POV-Ray which I will be playing with shortly, but I’m curious as to if anyone else has had these same needs and if so how you worked with it.

Thanks!

Patrick

Hello,
it's possible to control NVIZ from a script. You can export Your road
via v.out.ascii and use the road vertices to set camera position and
the next vertice to set a point where camera points to.

I have been playing around with it some time a go. There might be a
better way now thanks to recent developments in NVIZ scripting
capabilities, still I'm attaching an old TCL script file that I was
using to create animation of fly over a lake while changing a lake
level by loading it from a raster map created by r.lake. If You are
familiar a bit with TCL, You will be able to change that script to
just move camera instead of moving camera and changing raster map too.

Good luck,
Maris.

2012/2/29 Patrick Proffitt <rpp136@psu.edu>:

Using NVIZ, I have been able to visualize a segment of roadway my research
group scanned with LiDAR. The visualization is perfect for what we are
looking for, but there are two things we'd like to do next that I am having
difficulty with.

1) We'd like to make an animation of the roadway from a drivers POV. Using
the visualization utilities in NVIZ I have been able to manually adjust the
viewing perspective of the visualization to a point that looks good, as in
it looks like what the driver would see if they were in a vehicle and the
vehicle was on the edge of the visualized surface (or very close to it).
However is there anyway to advance the camera forward, again as if on a
vehicle, as if it's driving ON the roadway? From what I can tell, the
'camera', or POV for viewing the visualized surface, can be anywhere on a
radius away from the surface, however I cannot make the camera advance to
hover over part of the visualized surface. I can get a good POV shot for a
vehicle about to get started on the roadway, but not for driving across it.
I'd like to make an animation with frame 1 being what I have now, but frame
2 etc being that exact same orientation, but with the camera having
'advanced' down the roadway. I cannot seem to make frames 2 onwards.

2) In the future we'd like to collect camera images of the driver's POV
looking out the front windshield, so that we'd have an image from the
orientation we'd like to see. Right now I am adjusting the angles until it
'looks good' - is there anyway to use this out-the-windshield image to
EXACTLY align the visualization into that orientation so that the image and
the visualization are identically aligned? I am also aware of the
orthophoto utilities in GRASS, however without these images I have been
unable to play with that. Will orthophoto do this?

I recently found POV-Ray which I will be playing with shortly, but I'm
curious as to if anyone else has had these same needs and if so how you
worked with it.

Thanks!

Patrick

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

(attachments)

nviz_fly_script2.txt (4 KB)

Hi,

On Wed, Feb 29, 2012 at 8:07 AM, Maris Nartiss <maris.gis@gmail.com> wrote:

Hello,
it's possible to control NVIZ from a script. You can export Your road
via v.out.ascii and use the road vertices to set camera position and
the next vertice to set a point where camera points to.

I have been playing around with it some time a go. There might be a
better way now thanks to recent developments in NVIZ scripting
capabilities, still I'm attaching an old TCL script file that I was

I suggest you to look at m.nviz.image module [1] and its parameters -
position, height, perspective, focus.
You can also try integrated 3D view in GRASS 6.5 and 7 [2][3], there
is a limited way of creating animation. It is able to generate command
for m.nviz.image too.

Anna

[1] http://grass.osgeo.org/grass70/manuals/html70_user/m.nviz.image.html
[2] http://grass.osgeo.org/wiki/WxNviz
[3] http://grass.osgeo.org/grass65/manuals/html65_user/wxGUI.Nviz.html