Skip to content

Commit add6f1a

Browse files
committed
Init
0 parents  commit add6f1a

15 files changed

+2678
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
TODO*
2+
__pycache__

LICENSE.md

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# FDSVisual repository
2+
3+
## About
4+
*FDSVisual* is an open user interface for VR-Visualization of simulations from the [NIST Fire Dynamics Simulator (FDS)](https://pages.nist.gov/fds-smv/). It's main purpose is to read the simulated FDS-data and to facilitate the visualization of fire and smoke with volumetric data (VDB files) - especially when you are going to use Virtual Reality (VR) in the 3D graphic software *Blender*.
5+
6+
7+
## Installation
8+
### Blender installation
9+
To install the addon, simply download the latest stable version of this repository as a zip file (Click on '<> Code' and then on 'Download ZIP').
10+
Then go to Blender -> Edit -> Preferences and click onto the tab 'Add-ons' on the left hand side.
11+
In the top-right corner you'll find the 'Install an add-on'-button. Select the path to the currently downloaded zip file and click on the 'Install Add-on'-button.
12+
13+
14+
### Further required addons
15+
For basic usage, no additional add-ons are required.
16+
However, if an application for VR is planned, then the built-in add-on '3D View: VR Scene Inspection' is needed.
17+
To activate this, follow the same steps as described earlier for accessing the 'Add-ons' menu.
18+
Instead of clicking on 'Install Add-on'-button, type the name in the search bar.
19+
Then simply activate the add-on by checking the box
20+
21+
## Panel Features
22+
### Simulation Setup
23+
**Define FDS Path:** To start the addon, you need to define a simulation path.
24+
It is recommended to specify the path to the simulation folder.
25+
Alternatively, the path to the Smokeview file in this folder can also be determined.
26+
27+
**Define VDB Path:** For the export and import of VDB sequences, another path needs to be provided.
28+
The path must be identical for both export and import.
29+
Within this path, the program searches for a folder named 'VDB_Sequence [CHID]'.
30+
If this folder is not found during the export of the VDB files, the addon will create it along with additional subfolders for each mesh automatically. During import, the program also autonomously searches for this folder structure.
31+
32+
**Load simulation data:** In the next step, the simulation data needs to be loaded.
33+
To do this, click on the 'Setup Simulation' button.
34+
The program will then load all the important parameters of the simulation and configure the Blender scene settings.
35+
To review the simulation parameters, a menu window will open below after the setup with the key parameters.
36+
37+
**[Elective] Select Mesh-ID for custom mesh operations:** If you don't want to work with the entire simulation data later on, but only with data from specific meshes, you can select the respective ID of the mesh from the dropdown list.
38+
This will be queried by the program in subsequent functions.
39+
For custom mesh operations, the respective operation is always performed for only one mesh at a time.
40+
If you want to use it for multiple meshes, you need to perform the operation for each one individually.
41+
42+
### FDS geometry
43+
**Import and delete FDS-Geometry:** In this menu, you can import the FDS geometry from the simulation or delete it from the Blender scene.
44+
Both operators are available for the entire simulation data as well as custom operations.
45+
During the import process, the program automatically creates a corresponding collection (either one for all objects or one for each mesh) and adds the relevant elements to it.
46+
47+
**RGBA Values:** If you have assigned an RGBA value directly to the obstacles (OBST) before the simulation, the program recognizes this and displays the objects as in your FDS simulation.
48+
Currently, it is not possible to read the RGBA value for an OBST from an assigned Surf_ID with an RGB and transparency value. A solution to this problem is still being worked on.
49+
50+
### VDBs
51+
**Write and import VDB-Sequences:** The main function of this addon is the generation of volumetric data for visualizing fire and smoke.
52+
You can both read the simulation data and export it as a VDB sequence, as well as import such sequences.
53+
Similar to the geometry operators, there is the option to work with the simulation data from all meshes or only from each individual mesh.
54+
When importing the VDB sequence, the program automatically creates its own collection, where each sequence for a mesh is located.
55+
56+
### Surface Materials
57+
**Predefined materials:** For a partially higher-quality visualization, the program automatically creates some procedural materials (similar to Surf_IDs from FDS) during the simulation setup.
58+
Currently, these include:
59+
- Fire and Smoke
60+
- Smokeview
61+
- Glass
62+
- Concrete
63+
- Steel
64+
- Wood Light
65+
- Wood Dark
66+
- Classical Bricks
67+
- Sand-Lime Bricks
68+
To assign such a material to an object, simply select the desired objects and then execute the operator.
69+
This assigns the appropriate material to the elements.
70+
71+
If you want to remove an existing material from an object, you can use the 'Remove (unlink)' operator.
72+
This removes the first assigned material for all selected objects.
73+
It only deletes the link between them and does not remove the material itself.
74+
75+
***
76+
77+
The algorithms developed in this addon are based on the workflow outlined in the master's thesis titled [Entwicklung einer Schnittstelle zur Visualisierung von Brandsimulationen im virtuellen Raum](https://katalog.bib.htwk-leipzig.de/permalink/49LEIP_HTWK/1eq81pt/alma991023807002586).

__init__.py

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# SPDX-License-Identifier: GPL-3.0-or-later
2+
3+
# FDSVisual, an open tool for the NIST Fire Dynamics Simulator
4+
# Copyright (C) 2024 Toni Nabrotzky
5+
#
6+
# This program is free software; you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation; either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful, but
12+
# WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
# General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
19+
20+
bl_info = {
21+
#Equivalent of __init__ for python modules
22+
# Guideline: https://wiki.blender.org/wiki/Process/Addons/Guidelines/metainfo
23+
"name" : "FDSVisual main",
24+
"author" : "Toni Nabrotzky",
25+
"e-mail" : "[email protected]",
26+
"description" : "Visualization of FDS-Simulation results with VDB-files",
27+
"version" : (1,0,0),
28+
"blender" : (3, 5, 1),
29+
"location" : "View3d > Tool",
30+
"category" : "Import-Export", #https://docs.blender.org/manual/en/latest/addons/index.html
31+
"warning" : "", #used for warning icon and text in addons panel
32+
"support" : "COMMUNITY", #OFFICIAL, COMMUNITY, TESTING
33+
"github_url" : "",
34+
}
35+
36+
## To view output: In Windows go to "Window -> Toggle System Console"
37+
38+
#Import built-in packages
39+
import logging
40+
41+
#Import local packages
42+
from . import bl
43+
44+
45+
logging.basicConfig(level=logging.INFO) #Info or Debug
46+
log = logging.getLogger(__name__)
47+
48+
49+
# Automatic registering/deregistering of Blender entities
50+
def register():
51+
log.info("Registering FDSVision...")
52+
bl.register()
53+
54+
55+
def unregister():
56+
log.info("Unregistering FDSVision...")
57+
bl.unregister()

0 commit comments

Comments
 (0)