[GRASS-user] Help with DEM, Raster and Vector export to VTK / Paraview / Blender

David Wright david.a.wright at bigpond.com
Tue Mar 8 02:26:25 PST 2016


Hi Vincent

 

Thank you for your considered reply. I really appreciate it. I agree with your penultimate comment - if I can get it into Blender and visualise different layers then I will surely be able to output them to Dae.

 

Regarding Google Earth that is correct. I am seeking to use Grass and Paraview and / or Blender to output DEMs with draped raster's and vectors that I can ultimately visualise in 3D in Google Earth.  This is the final step, hopefully I wont need help on that part.

 

Thank you also for pointing out the issues with Blender with high values cartesian coordinates and for the modified grass / blender script which I will look at with interest. Especially given its ability to specify dx, dy, dz, scale values and also to produce a tin file. I will try the Blender GIS add on, that looks very useful as well.

 

So back to "getting it into Blender" (or Paraview). That is where I have been stuck. Maybe I am missing a step - As mentioned I am using a DEM clipped from an Aster DEM tile in the original Geographic WGS84 projection. In order to produce a 3d vector to output to blender using v.out.blend : 

 

1.                   Can I go straight from my Aster Geographic WGS84 DEM to producing a vector point cloud using r.to.vect?; or

2.                   Do I need to first convert the DEM from a raster to a 3D Dem using r.to.rast3 and then use r.to. vect?, or alternatively

3.                   Do I need to convert the DEM from a 2.5D to a 3D raster using r.to.rast3elev and then use r.to.vect?

 

Between the different options and the optional parameters with these 3 scenarios, if I get past errors in Grass, all I am getting in Paraview (if I can get it to display anything at) all is a straight line instead of a DEM. I will try Blender using your script but I would be grateful to clarify the above 3 points first. Am wondering if this is my sticking point?

 

One other observation, I know that to use v.out.blend the DEM needs to be converted to a point cloud first ie :

 

a)                  Start with a surface (ie a dem – question are above 3 points relevant here?) 

b)                  Use it to create a point cloud;  and then 

c)                   Recreate the surface in Blender on which to drape rasters and vectors.

 

If one already has a lidar or other point cloud, this would save a step. However when starting with a DEM, not only does the recreation of a point cloud seem to be a recursive step, creating the point cloud is taking a very long time. I am wondering if there is a way in Grass to output the DEM to a surface format that Blender can read and create a surface from immediately without having to create the point cloud. (Maybe the Blender add-on might provide such a solution).

 

Anyway thank you again Vincent. Am off to bed and will try reviewing the material further and tackling it all again in the morning.

 

Kind regards

 

 

David

 

 

 

 

 

 

 

 

-----Original Message-----

From: Vincent Bain [mailto:bain at toraval.fr] 

Sent: Tuesday, 8 March 2016 6:45 PM

To: David Wright <david.a.wright at bigpond.com>

Cc: grass-user at lists.osgeo.org

Subject: Re: [GRASS-user] Help with DEM, Raster and Vector export to VTK / Paraview

 

Hi David,

 

(besides your latest private message, I post a reply on the mailing

list)

 

If I understand correctly, your concern is about extracting vector and raster data from GRASS in order to add them to a Google Earth 3d view (I'm not familiar with the latter, sorry).

 

I guess my very rough addon v.out.blend can only be of little help for you, except that you may explore its content, the code is quite well commented; the main issue for you is that the script performs a

shrinkage+translation to output so it can fit blender units system

(blender has a weir behavior when working with high values cartesian coordinates). If you need to preserve original coordinates, you can run the attached modified script, where it is possible to specify dx, dy, dz, scale values.

 

On the other hand what may be interesting for you is the ability of the script to turn a 3d point cloud (e.g. extracted from your DEM) to a TIN.

The script performs it via pvpython, but there are multiple alternatives...

 

Another thing I would suggest you is to have a try at the blenderGIS blender addon:

https://github.com/domlysz/BlenderGIS

 

If you are already familiar with blender, it surely will be much easier and faster to compose your different scenes (layered raster/vector data) from within blender then export results as .dae files.

 

Hope this helps,

Vincent.

 

 

Le lundi 07 mars 2016 à 07:43 +1100, David Wright a écrit :

> Hi

> 

>  

> 

> I would be grateful for some tips on the steps to export a DEM with, 

> raster and vector layers to the vtk format for visualization in 3D 

> Paraview.

> 

>  

> 

> My ultimate objective once in paraview is to export the model into a 

> file format that can be converted into a dae file format so it can be 

> loaded as a 3D model in google earth.

> 

>  

> 

> Specifically I wish to drape different images on a dem  and visualise 

> them in google earth above the surface of the area concerned. There 

> may be a better method to achieving this from Grass however output to 

> VTK seems to be the best option as a starting point.

> 

>  

> 

> My datasets include a clipped area taken from an Aster DEM, matching 

> aerial image rasters and vectors (ie clipped to the same shapefile) 

> that are using the Geographic Projection EPSG code 4326.

> 

>  

> 

> I have been able to import these into Grass and visualise them using 

> NVIZ no problems.

> 

>  

> 

> I have searched extensively for help on the steps to export rasters  

> to vtk and attempted exporting rasters using both r.out.vtk and 

> r3.out.vtk but in Paraview I either get a blank window or a single 

> line I Paraview that can be rotated in 3d.

> 

>  

> 

> If someone could advise the steps or point me to some online resources 

> setting out the steps, I would be most grateful.

> 

>  

> 

> I wonder if my Aster DEM is in the correct format as it is. Or does it 

> need converting to a different format first – ie 1 3D voxel format.

> 

>  

> 

> Any help would be very much appreciated.

> 

>  

> 

> Regards

> 

>  

> 

> David

> 

> 

> _______________________________________________

> grass-user mailing list

> grass-user at lists.osgeo.org

> http://lists.osgeo.org/mailman/listinfo/grass-user

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160308/9421d3d9/attachment-0001.html>


More information about the grass-user mailing list