GithubHelp home page GithubHelp logo

vvoovv / blender-terrain Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 12.0 34 KB

Terrain import is now a part of the blender-osm addon. Get it for free at https://gumroad.com/l/blender-osm

License: GNU General Public License v3.0

Python 100.00%
addon blender import srtm terrain

blender-terrain's People

Contributors

vvoovv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blender-terrain's Issues

Mercator projection

In case someone needs the conventional Mercator projection, here it is:

import math

see conversion formulas at

http://en.wikipedia.org/wiki/Transverse_Mercator_projection

and

http://mathworld.wolfram.com/MercatorProjection.html

class Mercator:
radius = 6378137

def __init__(self, **kwargs):
    # setting default values
    self.lat = 0 # in degrees
    self.lon = 0 # in degrees
    self.k = 1 # scale factor
    
    for attr in kwargs:
        setattr(self, attr, kwargs[attr])
    self.latInRadians = math.radians(self.lat)

def fromGeographic(self, lat, lon):
    lat = math.radians(lat - self.lat)
    lon = math.radians(lon - self.lon)
    x = self.k * self.radius * lon
    y = self.k * self.radius * math.log( math.tan(lat) + (1 / math.cos(lat)))
    return (x,y)

def toGeographic(self, x, y):
    x = x/(self.k * self.radius)
    y = y/(self.k * self.radius)

    lat = math.degrees(lat)
    lon = self.lon + math.degrees(lon)
    return (lat, lon)

.hgt invisible

Hello!
I installed the addon and tried to open the ".hgt" file. But the ".hgt" file is invisible in the blender. How to fix this?

import not showing up after install

When I install the addon it says its installed but it is not showing up under file import
I have closed and reopened blender a couple of times but its still not showing up
Any Ideas

Cheers

blender report error

-Windows 10
-Blender 2.78
Running the addon produced the following error message in the console:

Read new prefs: C:\Users\Nnamdi\AppData\Roaming\Blender Foundation\Blender\2.78\config\userpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender\2.78\python
add_window: added to phytonpath
window: Imported multifiles
Downloading the file from https://s3.amazonaws.com/elevation-tiles-prod/skadi/S03/S03E036.hgt.gz...
Saving the file to C:\Users\Nnamdi\Google Drive2\Oath to the Ancestors\Shrine of Ancestral Divinity\Terrain\S04E037.hgt\S03E036.hgt.gz... Done.
Downloading the file from https://s3.amazonaws.com/elevation-tiles-prod/skadi/S03/S03E037.hgt.gz...
Saving the file to C:\Users\Nnamdi\Google Drive2\Oath to the Ancestors\Shrine of Ancestral Divinity\Terrain\S04E037.hgt\S03E037.hgt.gz... Done.
Downloading the file from https://s3.amazonaws.com/elevation-tiles-prod/skadi/S03/S03E038.hgt.gz...
Saving the file to C:\Users\Nnamdi\Google Drive2\Oath to the Ancestors\Shrine of Ancestral Divinity\Terrain\S04E037.hgt\S03E038.hgt.gz... Done.
Downloading the file from https://s3.amazonaws.com/elevation-tiles-prod/skadi/S04/S04E036.hgt.gz...
Saving the file to C:\Users\Nnamdi\Google Drive2\Oath to the Ancestors\Shrine of Ancestral Divinity\Terrain\S04E037.hgt\S04E036.hgt.gz... Done.
Downloading the file from https://s3.amazonaws.com/elevation-tiles-prod/skadi/S04/S04E038.hgt.gz...
Saving the file to C:\Users\Nnamdi\Google Drive2\Oath to the Ancestors\Shrine of Ancestral Divinity\Terrain\S04E037.hgt\S04E038.hgt.gz... Done.
Traceback (most recent call last):
File "C:\Users\Nnamdi\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender-terrain-master_init_.py", line 205, in execute
srtm.build(verts, indices)
File "C:\Users\Nnamdi\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender-terrain-master_init_.py", line 338, in build
z = struct.unpack('>h', buf)[0]
struct.error: unpack requires a bytes object of length 2

location: :-1

location: :-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.