Blender to QGIS: georeferencing not working

Hello there,

We have succesfully imported different shapefiles into Blender, along with other geospatial data (DEM, Google Satellite’s clip, …). Then, we have modified the shapefiles by adding some 3D and BIM information. When sending these shapefiles to a Speckle stream and then importing them to QGIS, it seems that georeferencing information gets lost. We have tried sending both the original shapefiles and the modified ones.
Within QGIS we have tried setting different (projected) SRs before importing the stream, but the imported coordinates seem to get stuck to the Blender’s Cartesian Coordinate System.

Anyone with the same task/problem?
Do we need to set any particular configuration in Blender for the SR, other than the GIS plugin preferences?

Thank you!

Wow, you are the first I have heard of using this workflow - nice attempt.

Are you able to share a stream with me? This is something we’d like to see if we can support.

Hi @jonathon,

this is the link to the stream:

https://speckle.xyz/streams/acdb8e490b/branches/main

In general, does Speckle support any geographic or projected Coordinate Reference System? We would like to know if we can share streams preserving this information.

Thank you for your reply!

1 Like

Thanks @nick_tolio

I’ll look at this asap, we’re in the thick of testing the 2.14 release of all the connectors right now, so It maybe next week or if I get bored of Eurovision, during that :smiley: :woman_singer: :eu:

I couldn’t wait - I’m looking at the data sent from Blender and don’t see where a CRS is specified on any objects.

Can you share the source file? I can share it with the Blender team to see what we might do to preserve it wherever it is being set in a way that makes sense for the GIS connectors.

That’s excellent info.

I’ll pass it to the Blender team to review what data we aren’t sending or sending incorrectly.

At the minute, I have seen a fair amount of matrix transforms being applied to the geometry you shared. Still, there are no explicit references to a CRS that could be interpreted by GIS connectors, or perhaps the GIS connectors haven’t implemented instance transforms on receive.

1 Like

Hello @jonathon,

Sorry for deleting our latest post but there were some errors in the attachments previously shared.
Here we repost all the information.
------------------------------------------------------------------------------------------------------------
Our objective is the following:

  1. Set a projected CRS to any object in Blender. It’s ok both starting from a shapefile imported by the Blender’s GIS Add-on (as we did) or even by drawing a simple curve directly in Blender.

Here we provide a sample linear shapefile:
geo_line_sample.zip (1.2 KB)

Below is a screenshot of the parameters of our CRS set to the curve (we are using WGS84 / UTM 32N - EPSG: 32632). The object we are dealing with is the white tube displayed within a Google Satellite image clip (both georeferenced and imported with the Blender’s GIS Add-on).

Post_Speckle_Blender
Post_Speckle_Blender1920×1202 153 KB

  1. Send this georeferenced curve to a Speckle stream and import it correctly into QGIS, preserving the CRS information.

We are not understanding if we are doing something wrong in Blender or with the Speckle properties. We would really appreciate a hint from the Blender team. Can you provide any correct sample of objects with projected CRS in a Speckle stream (like the screenshot you sent us)?

Thank you for your help!

1 Like

No problem at all. We have a good scope to review here. We’re polishing 2.14 right now and there’s a willing team to look at this workflow for the coming release(s)

Hi! I took a quick look at the case, these are the starting points:

  • Shapefile is opening perfectly in QGIS in a proper location
  • Current Blender scene is not being exported (and not received) in a correct geographic location

I have not used Blender GIS plugin before and will do so in more details asap. Some things I noticed: Georeferencing settings are set at the Scene level, therefore modifying the relative position of the Shapefile objects. For example, the point circled in blue in the specified Coordinate System has the coordinates displayed in the bottom panel.

When passed through Blender GIS importer, the location of the line changed to the following coordinate range:

It means, that the Georeferencing Scene settings in Blender are not locating geometry itself according to the specified CRS, but specifies the settings on how to position the geometry according to the CRS (I assume that Map Conversion and Blender Offset are the key parameters telling how far North/East the object have been moved to fit nicely into the Blender scene).
image

There are some missing steps in this workflow that would allow Speckle to send and interpret Blender-originated georeferencing schema. This is a very interesting case which we should look more closely, I would be keen on prioritizing this development, thanks for bringing this up!

Meanwhile, this is an example of how Speckle is currently handling QGIS and ArcGIS-originated data, by attaching a CRS object and having geometry location respect the specified CRS without additional modifications (yet):

P.S. QGIS can receive geometry without CRS property, just before receiving, the Project CRS settings should be set to the CRS you are using for writing object coordinates. If Blender GIS plugin allows to create the scene using original CRS with no modifications, it should be transferred to QGIS flawlessly

So, here is a quick solution for you:

  1. Check the CRS in which the shapefile is written, in this case it’s EPSG:4326
    image

  2. When importing through Blender GIS plugin, make sure to specify Shapefile CRS:
    image

  3. Set the CRS of the Blender Scene, e.g. EPSG: 32632:
    image

  4. Make sure Origin lat and lon (both for Geo and Proj) are set to 0.0, so there is no custom offset (needs to be done at importing stage, I assume that changing these values in the Scene AFTERWARDS will not bring the geometry back to the correct location):
    image

Now the scene settings are following:
image

And the scale of the object is clearly in the correct units and far away from origin (which seems legit for the chosen CRS):

  1. This specific shapefile is not being imported in Blender correctly (interpreted as Mesh), so it needs to be manually converted to Curve with right-click on the object (thanks to @Jedd for figuring it out):
    image

  2. Send to Speckle
    image

  3. Set QGIS Project CRS to the same as Scene settings in Blender:

  4. Receive commit in QGIS (original shapefile is in pink, and the received line is in white):

Success!

This takes a bit of tweaking, we will see what we can do to make the process more automated for the coming releases!

4 Likes

Hi everyone!!

@nick_tolio and I work in the same team, and we are following together the development of this task.
I just wanted to personally say a massive thank you to you all, for your precious help. You guys are AWESOME!!

@Kateryna this workflow is EXACTLY what we needed to do. We were well aware of the CRS properties in QGIS and how to deal with them (we work as geospatial data scientists), but didn’t quite know how to properly set them in Blender, especially when sending the object to Speckle (we made lots of unsuccessful tries while playing with Map Conversion and Blender Offset options).
You just enlightened us!!

Furthermore, after successfully repeating your latest instructions, we tried adding some (very simple) 3D information to the object, therefore reconverting it to a Mesh, and also saving and exporting it to an IFC project (BIM open standard format). Then sent it to Speckle and imported to QGIS. We even used a different CRS (EPSG:3857). Everything works as expected!!!


Thank you!!!

5 Likes