Boids Demo in Bevy

Jay Bond

I went into Dinacon 2022 with the notion that I would make an animal-themed videogame of some sort. It was a very vague goal which quickly became overshadowed by my desire to learn new tools, as I abandoned the fully-featured game engine and programming language I knew well in favour of an engine in its infancy and a language utterly new to me.

The result is a simple tech demo rather than a game, but I learned a great deal in the process and do not regret the choice.

The House Crow

Sri Lanka is home to a wide variety of fascinating wildlife, so the choice of a common house crow as the subject for my project may seem odd. However, I’ve always been attracted to creatures with unique relationships with human populations, and the crows certainly feature prominently in everyday Batticaloa. Their population size may be linked to human waste management problems. We regularly witnessed them stealing food from the endangered sea eagles who were nesting nearby, suggesting that in turn that population size can have an impact on other wildlife as well.

So I began my project with a simple 3D model of a crow, based roughly on photographs I took myself or collected from generous colleagues. I’m not an experienced modeller or animator, so it’s a little rough but suited my purposes.

Boids

As I discussed my interests with colleagues at Dinacon many ambitious ideas arose, such as modelling the social hierarchy of the crows, their interactions with other species, and how their population tracks with human waste management patterns.

However, I settled on modelling flocking behaviour, in part because it is something I always wanted to model in a game engine. I was also surprised to learn from biologists in attendance that the algorithms they used to model flocking behaviours were very similar to those I had heard of used in videogames. It should be said, however, that although we witnessed crows in large groups often I don’t believe this demo to be very accurate to the way those groups move about.

The Boids algorithm was developed in 1986 and has applications in simulations and videogames. It’s also very commonly the subject of tech demos such as this one! The gist of the algorithm is the balancing of three goals for each “boid”: separation, alignment and cohesion. All are based on each boid knowing the nearest bunch of neighbours in the flock. Separation is the goal in which each boid wishes to push away from any other boid that is too close. That is, it keeps them from bumping into each other. Alignment is the goal in which each boid attempts to face the same direction as its neighbours. Cohesion is the goal in which each boid attempts to get near the average position of its neighbours. This condenses larger groups into smaller ones, while separation functions as a counter-balance to keep a minimum distance between them. At each timestep in the simulation, every boid recalculates where it wants to go according to these three goals, and steers accordingly. The results of this very simple algorithm are surprisingly natural and varied.

The basic goals of the Boids algorithm, swiped shamelessly from Wikipedia.

In the demo, each of these goals is exposed as a weight with a slider. You can adjust them individually and observe the resulting change in the flocking behaviour. It sometimes takes a minute for the effects of changes to become obvious, but by varying these weights you can create larger or smaller flocks in tight or loose formations.

Bevy & Rust

The game engine I chose for this project, aptly named Bevy, is still quite early in its development. What attracted me to it was its open-source nature, cross-platform support, and its use of modern programming paradigms. It’s also programmed in Rust, a very new, low-level language which has rapidly gained popularity in the FOSS community.

It stands in stark contrast with Unity, the game engine I have used both as a hobbyist and professionally for more than a decade. Unity is rich with features, but is owned by a large private company and is married to paradigms and a language (C#) which are falling out of fashion. Moreover, Unity’s business practises include a cozy relationship with the US military — something that doesn’t sit well with me, personally. While I cannot avoid it at my day job, I was determined to learn something new at Dinacon, and have enjoyed my experience so far with Bevy.

Downloads

The demo, including full source code and crow asset, can be found at:

https://github.com/HulloImJay/bevy_boids_demo

Intro to Unity Class @ Dreamspace Hive

Jay Bond

In collaboration with Dreamspace Academy’s Software Lab, we ran a 2-day workshop introducing game development using the Unity game engine.

Despite technical woes along the way an amazing group of participants learned to assemble 3D scenes and to create game logic through visual scripting.

SolFM

SolFM

The goal of this project was to build a solar-powered short-range analog FM transmitter from scavenged parts taken out of broken AM and FM transistor radios, to equip it with a simple microphone, and to place it where it could listen to the “natural” environment but also to the people moving around that environment. It would broadcast that sonic landscape to any person tuned to the right signal on an FM receiver. The idea was to highlight the fact that human presence affects the world in both sensed and unsensed ways, and the presence of a body affects the functioning of an antenna as much as it affects the soundscape. The radio functions as a sort of artificial organism, beholden to the sun for energy to continue “living” and carrying out its daily activities (listening and transmitting what it hears) and serves as a stand-in for non-human biological organisms that we interfere with, for better or worse, everywhere we go.

I gave myself the constraint of using as little gear as possible to scavenge for parts from the old boards (just solder braid, an iron and basic pliers, no ovens or blowers like I would use in my lab) but I also gave myself a backup in the form of kit boards that were the same circuit I intended to build, in case of some misfortune. 

What ended up happening was a sort of 3-fold project: a still-in-progress field guide to minimalist scavenging of useful parts from broken tech, the intended solar-powered FM transmitter, and an ad-hoc collaborative performance between myself and William’s solar powered analog bird. 


The three parts:

  1. Working to dissassemble the boards with minimal gear proved challenging, mostly because of power outages and multiple broken soldering irons. But that difficulty just spurred the idea to create the field guide zine. 

The title page is here: 

Learning to determine what is and isn’t useful from a piece of broken tech is an important skill in a world that increasingly requires all of us to consider use and re-use carefully, and learning to remove it safely is equally if not more important. Some of the useful parts separated from the radios: 

The field guide will be in ongoing development with the Media Archaeology Lab, and will be tested with volunteers and students for usability before publishing. 

  1. I assembled the kits I brought along as a backup because of the difficulties with disassembly – here’s a dissassembly in progress and me being slightly exasperated:

Once the kits were put together I got the circuit running off of solar cells – fortunately straightforward. I scavenged those mostly from solar powered garden lights and fountain pumps, so they’re pretty ideal for areas with unforgiving climates. Scavenging usable parts from discarded consumer tech is an extremely cost-effective way to get not only parts but also fully functioning circuits that can be integrated into projects – often with less effort and better results than building things fully from scratch. 

Once the kits were assembled and tweaked to appropriately take power from solar rather than a DC power supply or battery, they worked beautifully. Here I am finishing up the kit:

The signal strength was even more dependent on the strength of the sun than expected, which was an excellent discovery and really added to the overall feeling of tenuous aliveness that the radio had. Here it is perched on a coconut in the courtyard: 

And me tweaking the signal: 

  1. The performance with William came about when we were both toying with our solar-powered projects and realized that we could make them talk to eachother. William’s project’s speaker was placed directly beside the transmitter’s microphone and we were able to pick up that transmission on the receiver from a pretty significant distance – inside the building at DreamHive from across the yard. The projects were shown together perched on a plumeria in the yard for the open house. Here we are tinkering: 


And here are some better shots of both the bird and the transmitter:

Ultimately a really fun way to play with the attributes of both projects. 

Technical details: 

The circuit diagram I worked from was published in Radio Is My Bomb and has been published on Tetsuo Kogawa’s website along with instructions and parts lists. The analog circuit kits I adjusted for use follow the same basic circuit as Kogawa’s simplest FM transmitter, and required only adjustments to the power jack to work well with the solar panels. I did swap out a resistor for a lower value in the power line but that was probably ultimately unnecessary. 

Trash to Paper

The Trash to Paper project utilized local waste to form sheets of paper. Fiber was sourced from cardboard rolls, bottle labels, and scrap documents from recycling bins. We gathered leaves and grasses from burn piles around Riviera Resort and Sid collected fallen coconut husk from the coconut graveyard. The fibers were sorted and blended into a slurry during our papermaking workshops. Participants pulled their own sheets and explored other potential ingredients that could be upcycled into paper with a focus on redefining waste as a raw material.

By Dinacon 2022 and Dreamspace Collective:  Daphne U-đổ led coptic bookbinding workshops, Sid Drmay co-hosted the papermaking workshops, Dinoj Mahendranathan sourced drying boards, Afkar Subair sourced mosquito netting, Jathujan Mahendran and Jerushan Sritharan and Jeremy Nguyen fabricated additional mould + deckles, and Amrutha Fernando prepared fiber for pulping.

Supply List: Sponge/Towel, Storage Tub, Blender, Mould + Deckle, Fiber (e.g. plants, rags, scrap paper, cotton, linen, banana peels, newspaper, flowers, denim, magazines, corn husk, envelopes, seaweed, yarn)

my favorite destination to procure ‘Cool Water’ branded bottle labels

scraps were shredded and torn

pulp dream team

the lid of the blender was broken, this is not my usual blending posture

a “mould and deckle frame” is dipped into a tub filled with water and pulp at a 45˚ angle

the sheet of paper is then transferred to another surface and pressed

and left to dry in the sun

a fruitful plating

paper with embedded petals <3

a DIY coptic sewing workshop

bringing to life a library of miniature journals

Thank you for reading ☆ much love,

Daphne U-đổ  ( @daphneudo )

P.S. Thank you Andy for organizing The Digital Naturalism Conference 2022, Sid for co-hosting a papermaking workshop with me, and literally everyone at Dinacon and Dreamspace Collective for the opportunity to work on this project ´· ᴗ ·`

Eye-Tracked Drawings

Hannen Wolfe collected data on where over 20 “dinosaurs”, volunteers, and DreamSpace Hive “bees” looked while they were drawing for a generative art project.  They used eye-tracking glasses with 3 cameras to record where the artists were looking (world view) and each eye’s movement.  The videos were then analyzed to calculate where the artist was looking.  Small black and white images (fiducial markers) are on the edge of the artist’s page so that the computer could track changes to the drawing or painting.  A video scan of the objects was used to register when the artist looked at the object they were drawing.  Currently they are working on cleaning the data to account for errors in data collection and exploring different ways to visualize the data.  Once the data has been processed, they will create a generative digital artwork based on the data.

Below are heat maps of where people looked when they were drawing. Each session produces 2 heat maps that are overlaid on the drawing and a photograph of the object(s).

MiniSolarPonics

by Fritz Francisco

The main idea was to create a small, sustainable recirculatory water system that enables plants to be watered and fertilized by combining a water system and a plant/soil system, as is commonly done in an aquaponics setup. The aquatic system serves as water reservoir and nutrient source for the soil system, as it eventually would contain water organisms such as fish, molluscs or crustaceans which produce detritus and biological waste products. The water in return is filtered by running over soil and plants which take up the nutrients and assist in clearifying the water. Given that these systems can be difficult to initialize, where the ecosystem must be carefully set up, the project was intended to be modular and extendable to accommodate larger systems as well and be easily scalable.

MiniSolarPonics
## Parts List
- Arduino Uno
- Motor Controller 
- MOSFET
- Electric Air Pump 3.7V
- Diode
- Capacitor
- Solar Panel 12-20V
- Lithium Battery
- Charge Controller (Charge/Discharge)
- Air Tubing
- T-connection for Air Tubing
- Water container
- Soil/Plant container
- Connection wire
- Coconut Husk

## Source Code
https://github.com/fritzfrancisco/MiniSolarPonics

Ethological Observations

seed

by Fritz Francisco

Arriving as a graduate student in the last year of my PhD, the mind is used to focusing on specifics, not to be distracted or to waste precious time. Therefore providing an initial project based on my previous work seemed most promising, goal oriented and efficient. The idea was to implement object detection and automation to design an object/artifact with which animals could interact with. The goal was to study these interactions of animals with a novel object which could be manipulated.
After arriving in a place very distant from my research confinement some aspects already seemed less promising. Electricity was not readily available and internet access was not at all continuous, resulting in limited ability to test and research problems when these were encountered. Therefore, before getting frustrated about something as trivial as internet access the only sensible thing to do was spend time in the more rewarding ocean close by and, more importantly, doing this with others that could get equally excited about finding stuff on the beach or by sticking your head underwater. After seeing what amazing opportunities nature in the direct vicinity had to offer these outings became more regular with daily beach visits and nightly observations in the lagoon.   Being trained in aquatic biology and having worked as a scientific diver it is important to me to get close to nature and experience it directly in person. This lead to a transition from the initial idea to implement a project in which an object/artifact is created which was merely constructed from my previous experience and of interest to me solemnly to something more holistic. It was more important for me to participate in the community and assist where needs could be met, which is why I decided to give swimming and snorkeling lessons, which were further improved by assistance from other fellow experienced Dinosaurs and which was a ton of fun.
I think it is important to make things but also reflect on why we are making these things and what implementations these may have. Teaching is a form of making which can be hard to quantify or document but is as rewarding as any other. Therefore, my project turned from "I have an idea, I want to do this" into "let's swim better and stare at things for a little bit".

Each one, teach one

Fig, Ficus, Fighouse!

Introduction

Fighouse was my project at Dinacon. I attended the conference for the second half of July.

Our objective is to research fig trees as a construction material in Batticaloa and other regions of similar subtropical climate. Planted on a scaffold, fig trees let down aerial roots, which are directed over an inhabitable structure. Once the roots anchor into the ground, the trees gain access to water and nutrients. Mechanically, the roots secure the structure against forces of nature. As the individuums inosculate, they form one organism. In contrast to a structure from dead wood, which rots in humid climate, a living structure is able to fend of pathogens. It adapts to the environment and grows stronger over time.

With the scaffold in place, the structure has use from day one. After years of growth, the scaffold is not needed anymore. It may be removed or left to rot. What remains is a self-sufficient living house. If regularly pruned and properly maintained, it will keep its purpose. Otherwise, it will go back to nature. In either case, not only have we helped remove carbon from the atmosphere, we have also created a small ecosystem.

Inspiration is drawn from the living root bridges in India’s Meghalaya region and from recent research, especially in the field of Baubotanik.

Shape

For Dinacon, a structure was needed that is simple to set up, and that is easy to maintain and possibly to replicate and improve upon. With bamboo readily available, and with experience of lashing, we decided on a tent like structure in the shape of tetrahedron. It provides shade for sitting inside.

Model

On July 27, using small bamboo sticks and left-overs of metal wire, a simple model was made to get a feel for the structure and how it would be assembled.

Bio Lab workshop

On July 22, Felix organized a workshop at the Bio Lab. First we obtained cuttings and seeds. Afterwards, under the guidance of the Bio Lab’s guardian Cris, and with advice from Subair, we prepared the collected material in jars with diluted coconut water. On July 28, Cris swapped out the water because it started to ferment. The cuttings and seeds are under observation. So far, they have not been used for construction.

Photogrammetry

The trunks of two trees were digitized using photogrammetry:

iNaturalist

After an introduction during Ricardo’s July 20 Bioblitz workshop, Dinasaurs uploaded observations to iNaturalist. All fig trees used in the project appear to be of the species Indian banyan, also known by it’s scientific name ficus benghalensis. Observations by tree location:

Material

Figs and cuttings were obtained from fig trees in and around the DreamSpace Hive, including the Ganesha temple just outside the gate. Bamboo was provided by Thava, the owner of the adjacent Riviera Resort, home of Dinasaurs. Asides from coconut rope, we recycled PET strings cut from bottles. Andy showed how these can be used to create tight lashings when shrunk with a heat gun.

Realization

The site is across the dirt road from DreamSpace Hive. On July 29, we dug holes using a spade, then cut the bamboo with a jig saw. A tetrahedral base structure was erected and lashed with expertise from Ana, Dashan, and Kiri. The next morning, we started by preparing pieces of bamboo to be used as planters. Jeroushan drilled holes, one for each set of trees. Once the planters were in place, T. Janson, the DreamSpace gardener, filled each hole with a mix of soil and sand. We inserted fresh cuttings as well as a few ripe figs. To guide the roots to form a wall-like structure, we strung ropes and strings of recycled PET on two sides of the structure. The third side remains open for entry.

Outlook

(photo by Michael Ang)

Already on the same day, use has been found for the structure. Michael Ang set up one of the data pods, he and Tegan had created at Dinacon. Sensors are connected to the fig leaves. A sound scape emerges from a speaker.

If all goes well, in a few years, the bamboo scaffold is overgrown by figs. The little house provides shelter for members and guests of DreamSpace Academy, and for the many animals visiting every day.

If it fails, then we will learn from mistakes! Perhaps the plants need a better controlled environment, they need more maintenance, or the structure is not strong enough to withstand winds, cows, and ants.

In any case, we should think about where to go from here. For example, how can plants provide sufficient cooling for us to better enjoy the indoors? Can we use the nearby ocean for cooling? What about Mangroves, could they be used instead of figs?

Eventually, we may find ways to transform and create ecosystems to give us a comfortable and modern life, without destroying nature. Let’s experiment!

Reading

Smart Farming with LoRaWAN: Lakshantha

Project Description

After scouting through the surroundings of DreamSpace Hive, I came across a Luffa farm and decided to make it ‘IoT-enabled” by hooking up several environmental sensors such as a temperature/ humidity sensor, soil moisture, and a light sensor to an Arduino-based microcontroller (Wio Terminal). Then came the challenge of sending this sensor data to the cloud for visualization. Since communicating via WiFi means you have to deploy the sensors within somewhat close proximity to a WiFi router, the other option was to use GSM. However, I went with using LoRa because it enables communication over very long distances. The sensor data from the sensors were sent to the cloud via a LoRaWAN gateway and the data was visualized on a dashboard. Also, the entire outdoor system was powered by solar.

I set up a SenseCAP M2 LoRaWAN Gateway inside the DreamSpace Hive and was able to receive enough signal strength for the sensors that were set up in the Luffa farm which was located a little bit far away from the gateway. Also, this meant anyone at Dinacon was able to experiment with their own LoRa nodes by connecting with this gateway.

Making Process

First of all, I had to make my project powered on all day long but there was no power outlet near the Luffa farm. So the only option to power it continuously was to use solar. So I hooked up 6 small solar panels (5V/100mA each)

All the solar panels were connected in parallel to obtain a total power of 5v/600mA

After that, I prepared a simple circuit with a TP4056 battery charger, a 18650 battery, and an MT3608 DC-DC Step-Up Converter. The idea was to connect the 18650 Lithium-ion battery to the TP4056 battery charger and connect the solar panel to the TP0456 so that the solar panel will be able to charge the 18650 battery. Also, an MT3608 DC-DC Step-Up Converter was used to keep the output voltage at 5V because the goal was to power the Wio Terminal using a regulated 5V input supply. After testing, I found out that even if the input to this converter changes from 2.7V – 4.2V, the output stayed at 5V. 2.7V is the voltage at which the TP4056 will cut off the battery from discharging and 4.2V is the fully charged state of the battery.

After soldering all the connections, I had a finished circuit. However, I thought of having an enclosure for this as well since it will be exposed outside. So I designed a simple box with a cover using Fusion 360 and 3D printed it!

Also, I had to 3D print a small hanging structure for the Wio Terminal to hang from the wooden plank.

After the box was printed, I placed my connected circuit inside the box. Also, the inbuilt charge indicator LED on the TP4056 board was replaced by a bigger LED which is exposed outside to clearly check the charging status of the battery.

The battery was installed afterward

The regulated 5V output from the circuit above was connected to the 5V pin of the Wio Terminal

Then the connected output from the MT3608 was connected to a Wio Terminal which was also connected to a temperature and humidity sensor, LoRa transceiver, and a soil moisture sensor. After doing a little bit of programming, the entire system was deployed at the Luffa farm.

Finally, all the data from sensors were sent to the LoRaWAN gateway setup at DreamSpace and then that data was pushed to the Helium LoRaWAN network server. After that, the data was sent to Azure IoT Central to easily visualize on graphs!

LoRaWAN with Arduino Workshop

I also conducted a workshop to teach about how to use a microcontroller, connect environmental sensors, code using Arduino and send sensor data to a LoRaWAN gateway!

For this workshop, I used a SenseCap LoRaWAN Dev Kit in combination with a SenseCap M2 LoRaWAN gateway and taught the attendees how to use the Wio Terminal (Arduino-based microcontroller) to view the data from a connected temperature and humidity sensor on the in-built LCD, send the obtained data to the SenseCAP M2 LoRaWAN gateway and then to the Helium LoRaWAN network sever to visualize the data on dashboards!

Mushroom-Mushroom Lamp – Cris Silva

Mushroom-mushroom Lamp was a part of the Dreamfungi project which is a  grassroots innovation project to locally research, develop and produce a biocomposite material using mycelium as an alternative sustainable material for packaging, construction, apparel and accessories industries.

Mushroom-mushroom lamp

Mushroom made out of mushroom (mycelium) material was just a thought that came out from delegates Dinacon 2022 at DreamSpace BioLab.  By the time this idea came in Cris and Pramo already figured out how to make mycelium biocomposites with locally available biomass and fungi. 

Contributors: Cristian Silva (Cris), Pramodya Saumyamali (Pramo), Brian Huang and Tali

How did we make a Lamp?

Making molds for the lamp

Tali and Pramo wanted to make the molds quickly with coconut shells (the cap of the mushroom) and cardboard roll (the stem of the mushroom). A PVC pipe was put inside the cardboard roll to make space for light and wire to go inside the mushroom stem. 

Bio fabrication of mushroom lamp

Cris did the mycelium fabrication of the lamp with molds made by Pramo and Tali. He used Ganoderma fungi to make mushroom lamps with sawdust. After 5 days he took mycelium material out of the molds and let it grow for another few days in a growth chamber. After leaving the mushroom lamp in the growth container it got the distinct colour and texture of mycelium material.

The lamp is growing in the growth chamber

Adding the lights for the lamp

Brian made and gave one of his LED lights from the AnyLamp project. The light was set up at the bottom of the mushroom stem. 

The mushroom-mushroom with AnyLamp

The Fluffynator – side project

Contributors – Cristian Silva (Cris), Brian Huang, Saad Chinoy, Marc Juul

Fluffynator is an old aroma therapy humidifier turned into an automated humidifier for making mushroom objects like the mushroom-mushroom lamp. It facilitates mycelium mat growth on top of the biomass once it is taken out of the mold and placed in the growth chamber.  Arduino Uno, a temperature and humidity sensor (DHT11), LED screen and a switch were used to make the whole hack works with an old humidifier.

work in progress
Fluffynator

How it works: 

The humidifier has five modes and the last mode is the off mode.  The humidifier previously had a touch sensor which was damaged and rusted. It used to be the switch that turns off the humidifier or the change modes. We removed the rusted sensor and connect it to Arduino with a wire. Arduino can change the modes with electric pulses to the IC of the old humidifier. We then add a new switch to Arduino to change the mode to off mode before Arduino Uno and the humidity sensor starts taking measure measurements (every time when we turn on the humidifier by giving it power, we have to press the switch and make sure the humidifier is off (then everything is in synch!).  When humidity is above 70% Arduino sends 5 eclectic pulses to the humidifier to shift through different modes and finally to the off mode. Once humidity is below 70% it again gives a pulse to turn the humidifier on. In this way, fluffynator maintains the humidity inside the mycelium material growth chamber without manual interventions.