Utilities

In this page, we provide some useful utilities (plugins) to work with the 3D scenarios and ray-tracing tools. The currently available utilities are:

  1. MCG OSM Load Helper
  2. STL to SKP Bulk Converter
  3. MCG OSM Helper More
  4. MCG OSM Helper Blender
  5. MCG Uncertainty Blender Triv

MCG OSM Load Helper

Overview

MCG OSM Load Helper is a SketchUp plugin that allows you to load OpenStreetMap (OSM) building data into SketchUp. It aims to reduce the initial time setup of importing building footprints and rendering them into 3D models within SketchUp.

Features

  • Fetches OSM data from the OpenStreetMap API.
  • Imports building footprints as polygons into SketchUp.
  • Extrudes the polygons to create 3D building models (meshed objects).
  • Adjusts the orientation of the buildings based on their surface.

Limitations

  • Only buildings and polygons are loaded: The plugin focuses on loading buildings and polygons from OSM data. Other features like roads, vegetation, or points of interest are not imported.
  • Scaling and conversion: The plugin assumes a default scale for the imported data and may not accurately represent real-world measurements. Users should consider adjusting the imported geometry to match the desired scale and units.
  • Roofs: The plugin currently does not generate roof geometry. It extrudes the building footprints vertically, resulting in flat-topped structures. Users may need to manually add roofs or modify the models as needed.
  • Materials: The plugin does not assign materials to the imported buildings. Users can apply materials manually within SketchUp to enhance the visual appearance.

Installation

  1. Download the MCG OSM Load Helper plugin (MCG3DBuildingHelper) from the TU Owncloud .
  2. In SketchUp, go to Window > Extension Manager.
  3. Click the Install Extension button.
  4. Locate and select the downloaded MCG3DBuildingHelper.rbz.
  5. Follow the prompts to install the plugin.
  6. The MCG OSM Load Helper plugin will appear under the Plugins menu.

Usage

To use the MCG OSM Load Helper plugin, follow these steps:

  1. Open SketchUp and your project.
  2. Use the SketchUp viewport to navigate to the area you want to work on.
  3. From the menu, select Plugins > MCG OSM Load Helper.
  4. The plugin will retrieve OSM data from the OpenStreetMap API based on your current location in the viewport.
  5. SketchUp will import building footprints as polygons, representing building outlines.
  6. You can extrude the polygons to create 3D models of buildings. Adjust the extrusion height as desired.
  7. Make any necessary changes or additions to the imported buildings.
  8. Add materials and textures to improve your models.

License

This plugin is released under the MIT License.


BlendSkp Converter

Overview

MCG STL to SKP Converter is a SketchUp plugin that allows you to convert STL files generated from, e.g., Blender to SKP files for SketchUp. It simplifies the importing of STL files and saving them in the SketchUp-specific SKP file format.

Features

  • Converts STL files to SKP files within SketchUp.
  • Supports batch conversion for all STL files in a selected directory.
  • Scales the imported models uniformly size.
  • Assigns random materials to the faces of the converted models.
  • Provides progress updates during the conversion process.

Limitations

  • STL file format: The plugin is specifically designed to handle STL files and may not work with other file formats.
  • Compatibility: The converted SKP files are intended for use within SketchUp. They may not be compatible with other 3D modeling software or applications.
  • Geometry complexity: Highly complex or problematic STL files may encounter issues during conversion.
  • File size: Each converted SKP file may be larger due to the nature of SketchUp file structure, but this is not specific to the plugin itself. Geometry seems to be intact.

Installation

  1. Download the MCGconverterSTL2SKP.rbz plugin file from the TU Owncloud .
  2. In SketchUp, go to Window > Extension Manager.
  3. Click the Install Extension.
  4. Locate and select the downloaded MCGconverterSTL2SKP.rbz file.
  5. Follow the prompts to install the plugin.
  6. The “MCG - STL to SKP Converter” plugin will be installed and available under the Extensions menu.

Usage

  1. Open SketchUp and ensure the “MCG - STL to SKP Bulk Converter” plugin is installed and activated.
  2. Go to Extensions > MCG - STL to SKP Bulk Converter in the SketchUp menu.
  3. A dialog box will appear, prompting you to select the directory containing the STL files you want to convert.
  4. Choose the desired directory.
  5. Another dialog box will appear, asking you to select the directory where you want to save the converted SKP files.
  6. Select the desired directory.
  7. Another dialog will ask to write three materials to the model.
  8. The plugin will automatically convert each STL file in the selected directory to the SKP format.
  9. The imported models will be scaled to a uniform size.
  10. Random materials will be assigned to the faces of the converted models.
  11. The converted SKP files will be saved in the specified SKP directory.
  12. Progress updates will be displayed during the conversion process.
  13. Once the conversion is complete, you will have the SKP files ready for use within SketchUp.

License

This plugin is released under the MIT License.

MCGOsmHelperNXX

Overview

MCGOsmHelperNXX is a Python tool to provide a convinient way to loading geo-data from the OpenStreetMap (OSM) when considering a greater geographical area (e.g. a city). The aim is to simplify the process of obtaining, structuring, and analyzing spatial data to be used for a ray-tracer.

Features

  • Geo Data Retrieval: Fetch data for a specified area based on defined latitude and longitude.
  • Area Segmentation: The tool divides the defined area into a user-specified number of sub-areas.
  • Grid Cell Division: Each sub-area is further divided into grid cells. The center of each cell serves as a point of interest. You can also divide into Voronoi cells.
  • Base Stations: Generate random BS locations in the defined area or import base station coordinates from a JSON file. The number of base stations per area is also customizable.
  • Command Line Interface: Accessible/Adjustable via a command line interface.

Limitations

MCGOsmHelperNXX is only for research purposes and isin development stages. As such, there might be limitations or bugs that have not yet been addressed. It is advised while utilizing the tool for research or large-scale tasks, to investigate the code. Feedback and contributions to improve the functionalities are much appreciated.

Installation

  1. Clone the repository or download the source code from GitHub.

  2. Navigate to the package directory:

    cd mcgosmhelpernxx
    
  3. Install the package and its dependencies using pip in development mode:

    pip install -e .
    

Usage

    cd mcgosmhelpernxx

After installation, you can run the package with:

mcgosmhelpernxx --area_name 'YourAreaName' --x_min min_longitude --x_max max_longitude --y_min min_latitude --y_max max_latitude

Example:

mcgosmhelpernxx --area_name 'Vienna' --x_min 16.2 --x_max 16.5 --y_min 48.1 --y_max 48.3

For detailed information about available command-line:


usage: mcgosmhelpernxx [-h] [--area_name AREA_NAME] [--x_min X_MIN]
                       [--x_max X_MAX] [--y_min Y_MIN] [--y_max Y_MAX]
                       [--num_areas NUM_AREAS] [--num_cells NUM_CELLS]
                       [--num_base_stations NUM_BASE_STATIONS]
                       [--base_stations_file BASE_STATIONS_FILE]
                       [--output_dir OUTPUT_DIR] [--help_options]```
mcgosmhelpernxx --help_options

License

MCGOsmHelperNXX is licensed under the MIT license.

Check research work

website: https://artansalihu.com/

MCGOsmHelperBlend

Overview

MCGOsmHelperBlend is a Python tool to provide a convinient way to loading geo-data from the OpenStreetMap (OSM) when considering a greater geographical area (e.g. a city). The aim is to simplify the process of obtaining, structuring, and analyzing spatial data to be used for a ray-tracer. The tool must be run from Blender scripting.

Features

  • Geo Data Retrieval: Exports OSM data as STL and Collada (DAE) files (terrain and buildings).
  • Area Segmentation: The tool divides the defined area into a user-specified number of sub-areas.
  • Grid Cell Division: Each sub-area is further divided into grid cells.
  • Command Line Interface: Accessible/Adjustable via a command line interface.
  • Plotting functionality to visualize the sub-areas (optional)

Limitations

  • Some required Python packages may not be pre-installed with Blender.
  • Due to the division of the area into grid cells, some features may be split across multiple files.
  • It relies on Blender OSM addon to load the OSM data.
  • Currently, the script requires manual installation and configuration.

Installation

  1. Ensure you have Blender installed on your system.
  2. Download this repository to your local system.
  3. Move the Python script file (mcgosmhelperblend.py) to your desired directory.
  4. Check the requirements and install the necessary packages.

Usage

The script must be run within Blender’s scripting environment. Here are the steps to do so:

  1. Open Blender and navigate to the scripting workspace. You can find this by clicking on the “Scripting” tab at the top of the Blender user interface.

  2. Once in the scripting workspace, click “Open” to load the script file.

  3. In the text editor window, navigate to the location of your Python script file (script.py) and click “Open Text Block” to load it into the editor.

  4. With the script loaded, you will need to adjust the parameters at the top of the script. Here are the parameters you need to adjust:

    • area_name: Name of the area
    • x_min, x_max, y_min, y_max: Coordinates defining the area of interest.
    • k: Number of sub-areas (bizirks) to divide the area into (kxk).
    • grid_size: Number of grid cells to divide each sub-area into (grid_size x grid_size). The center of each grid cell will be a point of interest.
    • d_file_path: Path to the folder where the STL and DAE files will be saved. If None, the default is ‘C:/Users/Desktop/Results’. You must provide the absolute path. Otherwise, data are stored in the Blender folder.
    • scene_name: Name of the scene in blender. Default is ‘Scene’.
    • help_options: If True, the help options are printed.
  5. Once you have adjusted the argument parameters, you can run the script by clicking the “Run Script” button in Blender.

Note: Make sure Blender’s Python is able to import all the necessary packages. You might need to install some packages manually using pip and blend-osm add-on.

For detailed information about available command-line:


usage: Retrieve a grid of sub-areas and base stations in the area [-h] [--area_name AREA_NAME] [--x_min X_MIN]
                                                                  [--x_max X_MAX] [--y_min Y_MIN] [--y_max Y_MAX] 
                                                                  [--k K]
                                                                  [--grid_size GRID_SIZE] [--d_file_path D_FILE_PATH]
                                                                  [--scene_name SCENE_NAME] [--help_options]

License

MCGOsmHelperBlend is licensed under the MIT license.

Check research work

website: https://artansalihu.com/

MCG Uncertainty Basic

Overview

The MCGUncertaintyBasic add-on is a tool for the non-additive uncertainty system model as in WiT and SWiT. It implements an time-varying model, allowing you to simulate additional statistics in the ‘scattering’ positions over the time. The add-on provides a simple interface to specify the number of keyframes (T) and the standard deviation (sigma) of the noise. You can easily add noise to the object locations for the specified number of keyframes.

Features

  • Add noise to object locations based on a Gaussian noise only for now.
  • Control the number of keyframes (T) for the uncertainty simulation.
  • Adjust the standard deviation (sigma) to control the magnitude of the noise in x-y-z directions.
  • Works with selected objects in the Blender scene.
  • Not yet implemented for the rotation of the objects and imported stl files.

Limitations

  • The add-on does not support other types of uncertainty models or noise distributions.
  • Limited to selectable objects only.

Installation

To install the MCG Uncertainty Basic add-on in Blender, follow these steps:

  1. Download the add-on script (Python file) to your local machine.
  2. Open Blender and go to Edit > Preferences.
  3. In the Preferences window, click on the “Add-ons” tab.
  4. Click the “Install…” button located at the top right of the Preferences window.
  5. Locate the downloaded add-on script on your machine and select it.
  6. Click the “Install Add-on” button to install the add-on.
  7. Once installed, you should see a checkbox next to the add-on name. Make sure the checkbox is checked to enable the add-on.
  8. The add-on should now be available in the View3D > Sidebar > MCG Uncertainty Basic.

Alternatively, if the add-on does not show up in the sidebar after installation, you can run the script directly from the Blender Scripting workspace. Follow these steps:

  1. Open Blender and switch to the Scripting workspace.
  2. Click on the “Open” button and locate the add-on script on your machine.
  3. Open the add-on script in the Scripting Editor.
  4. Press the “Run Script” button to run the script.
  5. The add-on should now be available in the View3D > Sidebar > MCG Uncertainty Basic.

Usage

  1. Launch Blender and make sure the MCG Uncertainty Basic add-on is installed and enabled.
  2. In the View3D editor, find the sidebar panel labeled “MCG Uncertainty Basic.”
  3. Inside the panel, you will find two properties: “T” and “sigma.”
    • “T” represents the number of keyframes for the uncertainty simulation. Adjust this value as desired.
    • “sigma” represents the standard deviation of the Gaussian noise. Higher values result in larger random variations.
  4. Set the desired values for “T” and “sigma.”
  5. Click the “Add Noise” button to add noise to the selected object locations for the specified number of keyframes.
  6. The objects’ locations will be modified with random variations based on the specified standard deviation.
  7. The modified locations will be keyframed at each frame, allowing you to animate the uncertain object positions.

License

MCGUncertaintyBasic is licensed under the MIT license.

Check research work

website: https://artansalihu.com/

Publications






For more research visit [Artan Salihu](https://www.artansalihu.com)
For more research visit Artan Salihu