Skip to content

Georeferenced Blender Scene

Vladimir Elistratov edited this page Jan 22, 2015 · 7 revisions

A Blender scene is called georeferenced if it has custom properties latitude and longitude and optionally heading (rotation angle).

The latitude and longitude correspond to the the origin of the Blender global coordinate system.

Python module transverse_mercator can be used to perform conversions between geographical coordinates and coordinates x and y in the Blender global coordinate system:

from transverse_mercator import TransverseMercator

scene = bpy.context.scene
projection = TransverseMercator(lat=scene["latitude"], lon=scene["longitude"])

# converting from the Blender global coordinate system to the geographical coordinates:
(lat, lon) = projection.toGeographic(x, y)

# converting from the geographical coordinates to the Blender global coordinate system:
(x, y) = projection.fromGeographic(lat, lon)