Skip to content

Table of Contents


Rhino Energy Prediction Plugin

Overview

Rhino Energy Prediction Plugin is designed to support architects in making energy-informed design decisions early in the building process. The plugin enables users to create or modify building models and receive predictions for heating and cooling loads using a machine learning (ML) model. Architects can gauge building energy performance early (concept stage) using the Rhino Energy Prediction Plugin. The plugin embeds a self-contained ONNX runtime directly in Grasshopper.

Features

  • Model Initialization
    Reads an ONNX model file path and sets up an InferenceSession that exposes each input tensor’s name, datatype, and shape.

  • Real-Time Inference
    Packs Grasshopper inputs into dense tensors, executes the ONNX model, and returns the first element of the output array as an energy load estimate.

  • Automatic Feature Extraction
    Companion Python script reads 3D building geometry and computes features such as roof area, window-to-wall ratio, floor area, and number of stories.

  • Pure C# Runtime
    Runs entirely in .NET via Microsoft’s ONNX Runtime—no Python interpreter required at inference time.

Architecture

  1. Component Initialization
    The plugin reads the ONNX model path from the Grasshopper input.
    It then creates an InferenceSession and retrieves input tensor metadata.

  2. Input Packing
    Grasshopper values are loaded into dense tensors that match the ONNX input shapes.

  3. Model Inference
    The plugin runs the ONNX model with the packed inputs and receives an output array.
    The first element of that array is sent to the Grasshopper output.

  4. Feature Extraction Script
    A Python helper extracts building features automatically by classifying layers named Wall, Slab, Window, and Roof.

Installation

  1. Download the VIP_Energy_Plugin folder.
  2. Copy it to your Grasshopper Libraries folder:
    C:\Users\YourUserName\AppData\Roaming\Grasshopper\Libraries
    
  3. Launch Rhino and open Grasshopper.
  4. Drag the VIPPlugin component from the Params tab onto the canvas.
  5. Provide the ONNX model file path to the component input.
  6. View the energy load prediction on the second output parameter.

Workflow

  1. Open Rhino and start Grasshopper.
  2. Place the VIPPlugin component and connect the ONNX model path.
  3. Sketch or import a building mass in Rhino.
  4. Run the feature extraction script to compute geometry parameters.
  5. Grasshopper packs the inputs and runs the ONNX model.
  6. Inspect the real-time energy load estimate.

Requirements

  • Rhino 7+ – Plugin host environment
  • Windows OS – .NET and Rhino SDK compatibility
  • .NET Framework 4.8+ – ONNX Runtime support
  • Python 3.8+ – Feature extraction and model conversion scripts
  • ONNX model file – Trained energy prediction model

Tech Stack

  • Rhino SDK (C#) – Core plugin development and geometry handling
  • Grasshopper (C#) – Dynamic component architecture
  • Microsoft ONNX Runtime – High-performance model inference
  • Python – Building feature extraction and .joblib.onnx conversion
  • scikit-learn / sklearn-onnx – Model training and conversion

Roadmap

  • Real-Time EUI Feedback
    Provide energy use intensity updates as users modify height, WWR, and story count.

  • Flexible Model Inputs
    Detect parameter names and types automatically to support multiple climates and typologies.

  • Multi-Format Support
    Add seamless handling of both .onnx and .joblib models with built-in feature mapping.

  • Map Integration
    Link with an energy prediction map to import existing building geometry and simulate retrofits.


Energy Map

Overview

The energy map provides visualizations of predicted building energy loads (heating and cooling) across an urban environment. Users can click on individual buildings to inspect specific feature details such as building height and estimated energy loads.

Given a GeoJSON file, the application calculates various building features, including height, shape (e.g., L-shaped, H-shaped), number of stories, building type (residential, commercial, etc.), energy code classification, HVAC category, roof area, rotation, wall area, and window area. These extracted features are then fed into a machine learning model, as described here.

Repository Structure

energy map
├─ api 
|  ├─ calculate_building_features # Scripts to calculate building-level features like height, area, rotation 
|  └─ route.ts # API routing configuration for feature calculations
|  
├─ flask-api # Backend Flask server 
|  
├─ node_modules # Dependency libraries (auto-generated)
├─ public # Static public assets
├─ src 
|  ├─ assets # Static files such as icons or images
|  ├─ App.tsx # Main application file
|  ├─ App.css # Application-level styling
|  ├─ index.css # Global styles
|  ├─ main.tsx # Application bootstrap and render entry
|  └─ components # React components for UI (buttons, feature displays, map container, map view) 
|     ├─ ButtonComponent.tsx
|     |  ├─ FeatureDisplay.tsx
|     |  ├─ MapContainer.tsx
|     |  ├─ MapView.tsx
|     └─ utils
|        └─ building.ts # Utility functions for parsing and handling building feature data
└─ ...

Getting Started

Requirements

  1. Run with Python 3.12.5 (otherwise there are issues with the .pkl files)

  2. Install node.js

Set up to run locally

  1. Clone the repository using
    git clone https://github.com/VIP-SMUR/25Sp-EnergyInBuildings-Com.git
    
  2. Navigate to the project folder
    cd energy_map
    
  3. Run front end locally using
    npm run dev
    
  4. To run the flask backend, open a new terminal and navigate to the energy_map/app/flask-api folder. Make sure to have the required python libraries. You can then run app.py without any errors
    pip install -r /path/to/requirements.txt
    
    python app.py
    

Map Information

Datasets

The dataset is derived from the Overture Maps Foundation building footprints, provided in GeoJSON


Extracting Vegetation Data

Overview

We examined various methods of extracting vegetation data for use with the models due to the effect of shading on the heating and cooling load of nearby buildings.

NDVI Analysis

NDVI (Normalized Difference Vegetation Index) is a metric used to quantify the health and density of vegetation from satellite imagery. Seemed promising at first, but does not provide any way of estimating vegetation height, which is likely needed as a metric for the model to be trained on.

TreeCountSegHeight

A recently developed model called TreeCountSegHeight was also examined for potential integration with the model. It seemed to fit our purposes quite well, returning an estimate of tree height from input satellite imagery, but was found to be very computationally intensive. It may have the potential to yield results given sufficient hardware, but this was a stumbling point in the workflow.

Next Steps

Continue searching for a lightweight/efficient way to extract vegetation height from satellite imagery.

Presentation

Team

Name Seniority Major School # Semesters GitHub Handle
Joseph M. Aerathu Masters Architecture (HPB) ARCH 2 jma1999
Anubha Mahajan Senior Computer Science SCS 3 amahajan68
Jessica Hernandez Masters Computer Science SCS 2 jhernandez312
Hang Xu PhD Architecture (HBP) ARCH 2 HangXXXu
Jiayi Li Junior Architecture ARCH 2 jli3307
Kavya Lalith Sophomore Computer Engineering ECE 1 kavya‑oop
Johnny Chen Freshman Computer Science SCS 1 jxchen21
Shivam Patel Junior Computer Science SCS 3 FlippyShivam
Yichao Shi PhD Architecture (DC) ARCH 2 SHIyichao98