Infrared - AI-Powered Environmental Simulations
Background

Blog

Find out about new infrared.city features, updates from our community and hands-on guides for climate informed design decisions

author
Sezin
 · 9 min read

Getting started with Connectors: infrared.city in Grasshopper

In this article, you will learn how to integrate infrared.city into your Rhino/ Grasshopper-based workflows. You will install the grasshopper plugin and authenticate, load your project, set up analyses, update geometry, and run simulations. Follow these steps to get started.

In future tutorials we will dive into advanced workflows that use the instant simulation response of infrared.city together with fast-iteration capability of parametric design to enhance your design exploration strategy.

Step 1: Install infrared.city plugin for Grasshopper

You can find and install infrared.city plugin like any other plugin for Grasshopper in Rhino 7 and Rhino 8. The latest version of the plugin is available for one click install through the Rhino Package Manager command. Type PackageManager in the command line, then search for InfraredCity and follow the instructions to install.

On the map, you can orbit by holding the right mouse button and zoom with the scroll wheel or with a double click. In order to navigate efficiently, and use the Pan tool, you need to click the hand icon to pan.

image

For the changes to take effect, you will need to close and restart Rhino after installation.

image


You can also find the plugin on the Food For Rhino website. From here you can install directly through the package manager, or download and add to the Libraries folder of Grasshopper manually here


As the plugin makes a connection to our cloud server, ensuring that you have the latest version installed is critical. Once you already have a working version, the tool will warn you anytime that an update is required.

Step 2: Understanding the tools

Our plugin consists of a small set of tools grouped into 3 panels, enabling you to manage your projects, manage your analyses and run simulations.

image

On the account panel, you can log in and out, load a project from your list of active projects, and update the active project with new geometry or analyses set.

On the Analysis panel, you will find a list of available analyses. While you can simply run any analysis list that you already have saved on the projects created on the web, you can also use the components of this tab to update the set of analyses at any time without going to the web.

On the Simulations panel, you can manage runs and display simulation results. There are two ways in which you can run simulations. Simulate component should be used to run multiple simulations at once. This component computes in the background, allowing you to continue working on your definition while results are being generated. To avoid undesired usage, this component is meant to be used within manual workflows and requires the user to press a button to run simulations. Simulate One component is the method to use for automated workflows, when the rate of update of the Update Project component controls the trigger to Run simulations. This method, allows you to run a single simulation at a time, meaning that you can either use a list item component to select the analysis you wish to run, or, the component will take the first analysis of the list by default.

It is important to note, that by default the Simulation component will not output any visual display. To display the results you will need to connect the Results component to any of the analyses you wish to visualise. This component will generate a colored mesh, as well as an associated value list which you can use for conditional manipulation and computing KPI.

Step 3: Setting up your script

Now that you have an understanding about the components and their function, let’s load our first project.

On the account panel, you will find the component to authenticate with your infrared.city credentials. Let’s add this to the canvas and begin the authentication process by clicking the Refresh button on the component.

NOTE: depending of your system configuration, you may see the browser redirect to an unfound page ( http://localhost:8080/?code=83…. ). If this happens, but your Grasshopper component does not appear in error mode, the login was completed correctly and you can simply close the browser window.

image

Once you are logged in successfully, the component will output a list of your active projects. If you have already set up a project on the web, you can pick it up here by using the Load Project component.

When adding the Load Project component to a script that has an infrared.city user authenticated, a dropdown list will be added to help you select the project you wish to work on. To continue with a selected project, click the Load button on the component.

image

Once a project is loaded, two internalized data components will be added to your script: A Geometry component, containing any existing editable geometry that is currently stored in your project; and an Analysis component, containing the current set of analyses setup.

Given the explicit history nature of Grasshopper, these two components are necessarily dissociated from the Load Project component to allow the user to update geometry without duplication. Therefore, we recommend that you rename these components, or bake and delete the geometry component from the script to avoid confusion. Generally, the geometry loaded with the project will be considered context geometry, so it’s safe to bake, make any changes required, or completely replace with your existing site geometry if this is available.

image

You can switch projects at any time during your work by selecting a new project and clicking Load again. Please make sure that the project output of the Load Project component is disconnected from any other components when loading a new project.

To use this geometry and simulation setup to run simulations, you can directly add Simulation component. Your analysis will be running in the background, and the command line will show the state of the simulations in process and those completed.

image

In order to view the results, you will need to add a Results component. It provides three outputs: the Mesh, which represents the visual geometry of the analysis; the Data, which contains the numerical values mapped onto the mesh and organized spatially (e.g., in a 1x1 meter grid) for further operations like averaging, filtering, or thresholding; and the Colors, which define the color gradient used to display the data on the mesh.

image

In general, you will need to update aspects of your project before running new analysis. For example, adding a new geometry, can be realized by using the Update Project component.

For instance, you can bake the context geometry (the Geometry output at load project) and remove any unnecessary elements, or make any changes. I will use a Geometry Pipeline component, standard in grasshopper, to load the adjusted context and any new design.

image

In this case, we can use a Geometry Pipeline to reference all meshes from the layer Context, and another pipeline to reference all breps from the layer Design.

image

You can of course use a fully parametric generation method, or simply manually referencing objects from Rhino into relevant components.

image

It is important to note here, that minimal post-processing is required on your geometry. Infrared.city accepts triangulated meshes as geometry input. It is simple to convert brep geometry to the required format by using a Brep to Mesh followed by a Triangulate Mesh component. Most geometries will require no specific setup for the mesh conversion, however more complex geometries may need attention to the settings. The goal is to balance between face efficiency and accuracy of the conversion, so generally a speed-oriented mesh setup works best.

To update the geometry of an infrared.city project, you can use the Update Project component. This takes in a project ID and either a Analysis or a Geometry input. This means that you can use it to setup desired analysis settings for your project, generally needed at the beginning of the project setup; or you can use it to continuously update the geometry on the project. In this case, let’s add the new geometry to the project. The combined context + design geometry are fed into the Update Project component.

image

Note that Update Project component will send data to the cloud to be updated to the root project. This means that, the initial state of a loaded project may differ from the updated version. To ensure project consistency is maintained, and that Rhino/Grasshopper geometry isn’t passed to an unwanted project in case of accidentally clicking the load project button, we recommend that you add a DataDam component to block the flow of the ProjectID.

Once the new geometry is set up, you can click the Update button on the Update Project component to send the new data to the cloud. This process is essentially instant.

You can now use the analysis list directly from the Update Project component to run analysis.

image

While you can also use the Update Project component to change the analysis set, this action is recommended in case multiple settings of the analysis scenarios must be changed. If your goal is to minimize credit use, by running only selected analysis on multiple designs, you can simply use any list management components to filter out the unwanted analysis.

Managing analysis list

At times, you may need to update the analysis list from Grasshopper. This offers several advantages, as you can easily manage parameters, connect to your own data sources, or even iterate to find the right settings.

All the available analyses can be created using components on the analysis panel. You can add a relevant name, and input parameters as required by the component. You can set one or multiple analyses to the project, and will still have the ability to decide which analysis to run according to the exploration focus.

image

Pro tip: At times, you may require to set multiple wind speed analyses distributed across directions according to specific criteria. You can use data generation techniques and create multiple analysis of the same type with a single component. To make these easy to trace, you can use a concatenate text component to append the parameters to the analysis name.

image

Once your new set of analyses is updated to the project, you will be able to see the updated names and run the selected analysis set. Once the project upload is complete, the corresponding analysis results will be available through the outputs of the Simulate component.

image

After clicking Run on the Simulate component, make sure to connect the corresponding Results components to retrieve the simulation outputs. You can add as many Results components as you have analyses listed. Each Results component will provide the simulation mesh, associated data, and corresponding color values. This allows you to visualize and interpret each analysis output directly within your Grasshopper definition.

Check your project on the web

As infrared.city connects your work instantly to our cloud service, your latest design and analysis versions will be available on the web, and your updates can be seen by you or your colleagues in real time.

image

  • Tutorial

Recent Articles

SvN Architects + Planners: Optimizing Urban Wind Comfort through AI-Driven Design

Learn how to post-process wind simulation results from infrared.city. Follow step-by-step instructions to load your project, connect custom geometry, define wind speed thresholds, and visualize performance interactively.