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:
- MCG OSM Load Helper
- STL to SKP Bulk Converter
- MCG OSM Helper More
- MCG OSM Helper Blender
- 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
- Download the MCG OSM Load Helper plugin (
MCG3DBuildingHelper
) from the TU Owncloud . - In SketchUp, go to Window > Extension Manager.
- Click the Install Extension button.
- Locate and select the downloaded
MCG3DBuildingHelper.rbz
. - Follow the prompts to install the plugin.
- The MCG OSM Load Helper plugin will appear under the Plugins menu.
Usage
To use the MCG OSM Load Helper plugin, follow these steps:
- Open SketchUp and your project.
- Use the SketchUp viewport to navigate to the area you want to work on.
- From the menu, select Plugins > MCG OSM Load Helper.
- The plugin will retrieve OSM data from the OpenStreetMap API based on your current location in the viewport.
- SketchUp will import building footprints as polygons, representing building outlines.
- You can extrude the polygons to create 3D models of buildings. Adjust the extrusion height as desired.
- Make any necessary changes or additions to the imported buildings.
- 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
- Download the
MCGconverterSTL2SKP.rbz
plugin file from the TU Owncloud . - In SketchUp, go to Window > Extension Manager.
- Click the Install Extension.
- Locate and select the downloaded
MCGconverterSTL2SKP.rbz
file. - Follow the prompts to install the plugin.
- The “MCG - STL to SKP Converter” plugin will be installed and available under the Extensions menu.
Usage
- Open SketchUp and ensure the “MCG - STL to SKP Bulk Converter” plugin is installed and activated.
- Go to Extensions > MCG - STL to SKP Bulk Converter in the SketchUp menu.
- A dialog box will appear, prompting you to select the directory containing the STL files you want to convert.
- Choose the desired directory.
- Another dialog box will appear, asking you to select the directory where you want to save the converted SKP files.
- Select the desired directory.
- Another dialog will ask to write three materials to the model.
- The plugin will automatically convert each STL file in the selected directory to the SKP format.
- The imported models will be scaled to a uniform size.
- Random materials will be assigned to the faces of the converted models.
- The converted SKP files will be saved in the specified SKP directory.
- Progress updates will be displayed during the conversion process.
- 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
Clone the repository or download the source code from GitHub.
Navigate to the package directory:
cd mcgosmhelpernxx
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
- Ensure you have Blender installed on your system.
- Download this repository to your local system.
- Move the Python script file (
mcgosmhelperblend.py
) to your desired directory. - 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:
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.
Once in the scripting workspace, click “Open” to load the script file.
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.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 areax_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.
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:
- Download the add-on script (Python file) to your local machine.
- Open Blender and go to Edit > Preferences.
- In the Preferences window, click on the “Add-ons” tab.
- Click the “Install…” button located at the top right of the Preferences window.
- Locate the downloaded add-on script on your machine and select it.
- Click the “Install Add-on” button to install the add-on.
- Once installed, you should see a checkbox next to the add-on name. Make sure the checkbox is checked to enable the add-on.
- 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:
- Open Blender and switch to the Scripting workspace.
- Click on the “Open” button and locate the add-on script on your machine.
- Open the add-on script in the Scripting Editor.
- Press the “Run Script” button to run the script.
- The add-on should now be available in the View3D > Sidebar > MCG Uncertainty Basic.
Usage
- Launch Blender and make sure the MCG Uncertainty Basic add-on is installed and enabled.
- In the View3D editor, find the sidebar panel labeled “MCG Uncertainty Basic.”
- 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.
- Set the desired values for “T” and “sigma.”
- Click the “Add Noise” button to add noise to the selected object locations for the specified number of keyframes.
- The objects’ locations will be modified with random variations based on the specified standard deviation.
- 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/