Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Music Visualizer with Particles

Discussion in 'Made With Unity' started by shaderbytes, Jan 3, 2015.

  1. shaderbytes

    shaderbytes

    Joined:
    Nov 11, 2010
    Posts:
    900
    Happy new year everybody, I decided to start the year off with a quick fun project :

    http://www.shaderbytes.co.za/unity/new_year_music_visualizer/

    It uses 3 particle systems but only one material. I am using both the raw signal as well as the FFT data.

    enjoy.

    (ps the song is by the band "porcupine tree" with the phenomenal Gavin Harrison on drums )
     
  2. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Hey @shaderbytes ! That is looking rather interesting. I'd like to get my hands on this ;) Are you planning on taking this further/sell it via Asset Store?
     
  3. shaderbytes

    shaderbytes

    Joined:
    Nov 11, 2010
    Posts:
    900
    @Thomas Pasieka let me just clean up the project and i will post a link to download or attach it here in the thread ;) Its not very complicated I just experimented with a few ideas until i made something that looked nice.
     
    Thomas-Pasieka likes this.
  4. shaderbytes

    shaderbytes

    Joined:
    Nov 11, 2010
    Posts:
    900
    @Thomas Pasieka ok cleaned up here you go :

    https://drive.google.com/file/d/0B5GQag5iS_vzQkJhY1hyRmR1UTg/view?usp=sharing

    As mentioned It was a quick prototype project ,there is one Gameobject named Waveform which plays the music and stores the samples then there are three GameObjects for each particle system. The particle Component settings for each of these are mostly the same as well as each particle script ( I duplicated them and made small tweaks )

    In a nut shell :

    On the WaveForm GameObject Inspector are 2 global sliders which are scalars for the sample strength of the raw data and the FFT data values. The Particle Scripts have there own individual sample scalars as well.

    Particle1 does the spiral effect
    Particle2 does the broken arcs and fireworks effect
    Particle3 does the oscillating strobe effect

    There are a few scalar settings exposed in the particle script inspectors but playing around with them is not that straight forward because part of what is happening on screen is been produced by Unity via the shuriken system and part by my code for example :

    Particle 2 needs to have the "averagePeakScalar" value somewhere beneath 0.5 to produce the "fireworks" effect because this is what allows some particles to periodically escape the control of my code ( hence then been under control of the Unity Component )

    Particle1 needs to have the "angleScalar " value very low like it currently is at 0.01 to produce those spirals.

    anyway perhaps someday I should make a more robust product but for now this is what it is, I hope you get something out of it.

    cheers
     
  5. Thomas-Pasieka

    Thomas-Pasieka

    Moderator

    Joined:
    Sep 19, 2005
    Posts:
    2,174
    Thanks for the zip mate. Will have a play with this later! :)