Previous topicNext topic

Particle Audio Visualizer

Suggestions for new features for Magic.
Post Reply
Studio-dbfx
Posts: 37
Joined: Wed Nov 09, 2016 2:46 am

Particle Audio Visualizer

Post by Studio-dbfx »

Hi Eric,

I was looking for a GLSL particle shader, and came across this on Shadertoy. https://www.shadertoy.com/view/Xd3GRX

I'm wondering if the inbuilt spectrum visualizer can be turned into a dot/ball.

Thanks

Trevor :)
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Particle Audio Visualizer

Post by Sadler »

Have a look in the example projects from the help menu and look for the 30 band spectrum. Instead of changing the height of a rectangle change the vertical position of a dot.
Studio-dbfx
Posts: 37
Joined: Wed Nov 09, 2016 2:46 am

Re: Particle Audio Visualizer

Post by Studio-dbfx »

Hi Sadler,

Thanks for your reply. I don't understand what you mean as there's a lot going on in that demo.

The inbuilt spectrum analyser or waveform has the button option to change shape. So I thought instead of having bars, a simple ball or dot shape, could act as particles for one instance, and not a bunch of grouped polygons.
Sadler
Posts: 1139
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Particle Audio Visualizer

Post by Sadler »

No problem, it is difficult to know what knowledge folks come to the table with.

Here are some specific steps to change one bar on the spectrum...

Edit (for example) scene "High - R" in the 30 band example project.
Select everything after the scale nodes and move them to the right to make some space.
In the connector after the first scale, insert a transform node and copy (manually) the "Y" params from the scale to the transform.
At this stage you should see the first bar scale and move to the beat (assuming you have some music playing).
Turn off the automation for the Y on the scale node and adjust the Y scale to match the X scale (e.g. 0.2)
You could leave it there or add a peak modifier to make it more closely match the shader you linked to.

Change the polygon to a point if you like. It is a bit more tricky to get the point to glow like in the shader. Experiment.

In essence, you've just converted the reactive scale on Y to a reactive Y translation. Do the same for the other bars and you'll have a range of dots all bouncing to different frequencies. I think this is what the shader is doing.
Post Reply