Skip to content

InesaDiamond/CreativeCodingGalaxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

CreativeCodingGalaxy

Overview

A processing sketch of a galaxy visualising the music I listened to


Key

  • Each star is a song
  • The glow colour represents the genre of the song
    • Pop: Purple
    • Rock: Red
    • Indie: Yellow
    • Electronic: Teal
  • The nebula colour represents the time of day I listened to the song
    • Morning: Pink
    • Afternoon: Orange
    • Evening: Green
    • Night: Blue

Data collected

  • Song I listened to
  • Genre of the song
  • Date and time I listened to it

Data Collection

I collected my data using lastFM to track the songs I listened to and what time I listened to them

I wrote a small python script to grab the song title, artist, and time listened, and put the data into a csv

There were a lot of songs so I put the songs and artists into chat GPT to get the genre for each one - This is the only place I used AI

Then I updated the csv manually


File explanations

Galaxy

  • Loads data
  • Calls visualise data, create nebula, and nebula texture
  • Generates constant random positions for for the decorative stars
  • Displays the galaxy

CreateNebula

  • Draws each nebula using a series of quads
  • Adds a verticle wobble to each quad within the nebulas
  • Rotates the nebulas around the the z axis at their centre
  • Changes the quad size to make them appear to move forwards/backwards
  • Creates a colour gradient from front to back for each nebula
  • Uses NebulaTexture to texture each quad
  • Uses billboarding to make sure the nebulas always face the camera as the camera rotates to avoid weird visuals

NubulaTexture

  • Creates a PGraphics texture for the nebulas
  • Uses perlin noise to make a cloudy texture
  • Uses a mask to fade out the edges

VisualiseSongs

  • Positions song's stars within the nebula corresponding to the time of day I listened to the song
  • Colours the song's star based on genre
  • Draws the stars as diamond shapes
  • Shrinks and expands each star to make it look like it's twinkling
  • Uses billboarding again to make sure the stars always face the camera since they're 2D shapes

Inspiration

Some of the procedural techniques in this project were inspired by Daniel Shiffman’s Coding Train videos, especially the explanations of Perlin noise. I used these concepts as a foundation, then adapted them into a 3D galaxy system with my own:

  • nebula texture generator
  • layered quad rendering
  • spherical star distribution
  • time-of-day clustering
  • genre-based colouring
  • camera-aligned billboards

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors