Not sure if I should create a new topic for QGIS everytime - let me know.
Just tried to send a raster layer to spk. Worked great! This is coming from an .asc file and was wondering if you were considering generating a mesh out of it as well - differentiated with the height values (I am assuming this feature doesn’t exist, if it does… )
FYI I then tried to send that over to Rhino and the latter crashed
Hey @pauldotnet, I moved it to a new topic for simplicity.
So that raster layer crashes Rhino every single time? Could you send us either the original raster, or share the stream you sent it to?
Finally got it working, I guess the first try Rhino didn’t like it
Also managed to process it as a 3D mesh but there are some inconsistencies with image flip/vertices ordering - one of the issues I found is that the vertices count is not the same for Band 1_values (z values) and the display value mesh. Attached you will find the GH def.
Stream is the following : e29df9ca43
unnamed2.gh (19.5 KB)
PS : this raster asc file is close to the sea, explaining the big mesh gap at the bottom
Oh thanks for getting back with this! I’ll add this to my todo list
I opened issues for this in both QGIS and speckle-sharp bc I suspect it may need changes in both sides
Pinging @Kateryna too on this!
Hi Paul! Generating a 3d mesh with the values from 1 of the bands is entirely feasible! The data is there, color values are being assigned point by point, so adding an extra z-value wouldn’t be hard:) The bigger issue is that, to my knowledge, Speckle connectors are not really doing any geometry transformations in native software, just sending and receiving. So the best guest for solving this, is to advance the connector for QGIS mesh support - the meshes have very straightforward 3d configuration and the export in 3d should be straightforward as well:
And regarding the misplaced values: technically the idea was to have the mesh as a direct representation of Raster from QGIS, and the rest of parameters as well, to be able to recreate the mesh (e.g. in Grasshopper) with any modifications. So you can recreate it as in the screenshot below. The values need to be flipped once though, because QGIS is recording band values horizontally, and Grasshopper is creating grid rows ordered vertically:
Disclaimer about this method: if your selected projection distorts the raster so it’s not orthogonal anymore, it might require a different approach to recreate it in Gh.
Disclaimer #2: “resolution X and Y” parameters of raster are being recorded in the units of selected CRS (by default, meters). But Rhino project can be set to different units, and the “resolution” parameter wouldn’t “know” about it. So you might need to add a scale factor to the resolution. Yes, this is not super convenient approach by now
uuuuh nice I was missing that one , thanks!
Your method allows for the grid rectangles to be adjusted according to the height - I thought the height values were corresponding the to vertices and not the quad - so I got their centroids to generate a mesh from points. And got the respective colors following this method.
The path mapper allows to flip the matrix for multiple tree branches so that it can work for multiple tiles at once:
Zooming closer to a zone between two tiles, we notice a gap, because I used the quad centroids to move according to the height value. Not sure how to do it better, if you have any tips…!
The quickest could be merging rasters in QGIS:) Or creating an extra “bonding” mesh from the border rows of both