/home

Visualizing parametric architectural models in Virtual Reality, generated with Grasshopper

tldr: cool VR visualization of architecture: source

The toolbox of a modern architect contains software which surpasses the technique of extruding elemental shapes. It allows the creation of organic and programmatic architecture. Examples of such work can be found in Frank Gehry’s Guggenheim Museum, built with the help of custom aerospace design software, Santiago Calatrava’s bridges and train stations, Renzo Piani’s Kansai airport and many more.

Examples of organic architecture Source: wikimedia

The CAD software Rhino3d and especially its plugin Grasshopper, provide tools to create such “parametric” architecture. Here basic geometry is processed through a custom node-based programming language which, given input parameters alters them through a directed acyclic graph of nodes.

How Grasshopper looks Source: grasshopper3d.com

The goal of my project is to provide a tool which enables architects to tighten the feedback loop between design and immersive visualization using the grasshopper parametric design tool, without the need to construct intermediate physical model for each small modification in parameters.

Building on the StereoKit framework for XR applications allowed me to quickly create a working prototype. The framework is built on top of OpenXR, which allows me to develop a single application able to run on VR devices (such as the Oculus), MR devices (such as the Hololens 2) as well as smartphones. To integrate it with Grasshopper I created 2 new nodes for its graphical programming language. These provide respectively an input “slider” having from, to and step parameters responding to user actions (a pinch or grab gesture result in change of the output) as well as a “send” node, which takes the geometry generated through the graph, and passes it via a TCP network connection to any connected XR clients.

Small example of components assembled together The two new components in a small example graph: The slider (top left) outputs the value 5, which is then multiplied by a constant 10 (by the multiplication block). This gets passed as an input to a mesh generator, which sends its output to any connected client

Communication between the different components works as follows: When one of my newly created grasshopper components gets added to a design graph it starts a new TCP server, listening for requests. When a client application (running for instance on a Virtual Reality headset) starts it initially sends a series of UDP pings onto the local network (currently communication only works between devices on the same LAN). The previously started Grasshopper server then responds to these pings, letting the client know where to connect. When this is done a new TCP connection is initiated by the client. Whenever an update to the geometry generated by Grasshopper occurs it gets serialized in JSON format and sent to all connected clients (yep, there can be multiple clients connected at once =D ). The opposite process occurs whenever a client registers an action by an user (such as pinching or grabbing). This action gets sent back to the Grasshopper server, which then makes it available to the slider parameter.

How Grasshopper looks Bringing all together, on the right Rhino3d generates a complex model, on the other side a VR emulator shows its result