Results 1 to 1 of 1
  1. #1

    [SCRIPT][WIP] Render Online Orthographic Tiles for Leaflet

    Hi,
    demo here:
    http://opendimension.org/projects/online_tiles_addon/

    WHAT DOES THIS DO?
    This script renders 256*256 pixel tiles that can be used with Leaflet or OpenLayers.
    In addition, it writes index.html for you so this is a sort of one-click solution. It uses a hosted version of Leaflet, so you don't have to download anything extra.

    TESTING:
    You can easily test the script by downloading the example blend file from here:
    http://opendimension.org/projects/on...e_render.blend
    NOTE: You'll see some library errors when you open the file. Just ignore them.

    There is a simple city model. Just move cursor to the script window and press Alt-P. This should render tiles and then popup your default browser in order to view the result.


    USAGE and SETTINGS:
    First you must set your camera. Set it to ortographic and adjust the Ortogrphic scale so that you can see your whole model through the camera (see the example blend)
    camera_settings.png

    Setting must be done in the script file.

    defaultLevel = 2 # default level in browser
    maxLevel = 2 # starting from zero
    tilesDir = 'tiles' # the name of the tiles directory

    DefaultLevel is the default zoom, when the page is opened.
    MaxLevel is the maximum zoom level.

    ABORTING THE SCRIPT:
    The script can run hours if you use large maxLevel (> 7). Therefore script can be terminated with Ctrl-C in the terminal window. So make sure you start Blender from command line if you need this feature.

    DOWNLOAD:
    http://opendimension.org/projects/on...iles_script.py

    MORE INFO:
    http://www.opendimension.org/render-...hograpic-tiles

    It would be nice if some Mac and Windows users could test the script. It should work on those platforms also but I can't test it myself.

    PLANS:
    I planning to convert this to a proper addon, but just now I don't have time. I'll also add support for markers so that you can easily set markers for objects.

    This was written for my own purposes but I hope that it would be useful for some else too.


    Regards,
    Ari
    Last edited by Ubuntuist; 06-Apr-14 at 08:38. Reason: corrected some typos
    -o)
    /\\\\ Message void if penguin violated
    _\\_V Don\'t mess with the penguin
    www.opendimension.org



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •