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.

USB Microscope + 3d Printed Labyrinth + OpenCV

Experiment with remains of plastic, wood and a modified USB-microscope. Rodolfo and Leonie used Processing and an Open CV library to analyze the image of moody water. They also print a tinny labyrinth for a petri-dish with recycled filament out of a 7up bottle! (Thanks to Andrew for the recycled filament)… Next step is to make a video-game for small creatures.
At night flying ants were landing into the illuminated petri-dish. Unexpected visitors!
here the USB microscope and some Daphnias (small planktonic crustaceans). The code for the Processing program can be found here: https://github.com/rodolfoacostacastro/USBmicroscope_openCV

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

Dreamspace Mural Project

A collaborative project which utilized handmade templates and drawing tools to tell the story of the Dreamspace life cycle. Themes such as environmental sustainability, community engagement, and innovation are explored through graphic imagery along the entry staircase.

Lead by Lashantha (@artist_lashantha), Jasmine (@jasminegutbrod), and Melshan (@melshan_4)

Photo by Jasmine Gutbrod
Photo by Dreamspace Story Lab
Photo by Dreamspace Story Lab

Photo by Dreamspace Story Lab

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