Previous topicNext topic

Some fun effects shaders for the GLSLShader module

Tutorials, FAQs, resources, and examples for using Magic.
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

I just added two new shaders to the original post: Ripple and NoiseBlur.

Ripple responds to both X and Y params.

NoiseBlur (didn't know what else to call it) responds to X.

Here's a video I made with both effects. Watch in fullscreen mode at 720p to see the NoiseBlur details especially. Of course, in Magic it looks much better! Damn YouTube! :)
EDIT: I just realized the NoiseBlur shader didn't work properly on some Macs. I think I fixed it.
damstraversaz
Posts: 179
Joined: Tue Aug 26, 2014 11:22 am

Re: Some fun effects shaders for the GLSLShader module

Post by damstraversaz »

Oh, that's reallt great ! thanks a lot.
Could you share the project of the video ? it could be interesting
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

Sure, here you go.

Make sure to put the NoiseBlur.txt and Ripple.txt files in the same folder as the project.

Also, the project requires version 1.53, which is not released yet :), but the Beta will work.
Attachments
NoiseRipple.magic
(1.71 KiB) Downloaded 10389 times
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

Ok, I'm having fun with shaders at the moment, so I just added yet another new one to the original post: VideoHeight.txt.

It creates a 3D height map based on the input brightness. X and Y params control the rotation; set them both to .5 to make the image face the camera. Pretty cool!
damstraversaz
Posts: 179
Joined: Tue Aug 26, 2014 11:22 am

Re: Some fun effects shaders for the GLSLShader module

Post by damstraversaz »

great ! thanks a lot
Sadler
Posts: 1348
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Some fun effects shaders for the GLSLShader module

Post by Sadler »

The video height shader is great when it is mixed with its source. I've tried it with two different sources which gives a mysteriously unsettling effect which can be subtle or blatant. The ripple is also great when its mixed back in with its source.
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

I've added a quick new shader to the original post: Posterize.

The X Param controls the posterization amount.
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

...and here's another one: Pixelate.

X Param controls the pixelation amount.
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

And here's yet another very simple one: Opacity.

X param controls the opacity level.

I should say that it's MUCH more computationally efficient to manage opacity with the Alpha parameters in the ColorRGB/ColorHSB modules, but it's a little more complicated since you have to do a bit of math. See this tutorial for details: http://magicmusicvisuals.com/forums/vie ... p?f=3&t=28
blackdot
Posts: 528
Joined: Sun Jul 06, 2014 10:18 pm

Re: Some fun effects shaders for the GLSLShader module

Post by blackdot »

hey thanks a lot eric. opacity is really useful. theyre all quite useful actually. no idea if this is way too much to ask or really simple (or you if you even do take requests ^^), but can you do bloom? :) (as in this: https://udn.epicgames.com/Three/Bloom.html ). x could influence the intensity, and y the distance.
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

I'll see what I can do :).

I'm also planning on improving and extending shader support for Magic 1.6, which will enable even more third-party effects to be used.
hazardman
Posts: 74
Joined: Sat Nov 08, 2014 1:33 am

Re: Some fun effects shaders for the GLSLShader module

Post by hazardman »

Eric wrote: I'm also planning on improving and extending shader support for Magic 1.6, which will enable even more third-party effects to be used.
you're such a tease!.. :lol:
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

Two more shaders added: ArrayX and ArrayY.

These create copies of the image along the X and Y axes, respectively. I separated them because it's more computationally efficient.

X Param controls the number of copies. Beware that values closer to 1 can make your frame rate drop significantly!
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

I just added a neat little shader called Glitch.txt which glitches the video using audio input. It also has a nice CRT TV effect.

For the glitching, make sure you enable the "Audio->iCh." parameter, and set the "iCh. Index" parameter to 1.
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

Another one just added: a nice effect called Drawing.txt which simulates the look of pencil on paper. Cool when used with videos or live cameras.
spacedoctor
Posts: 31
Joined: Sat Sep 06, 2014 9:44 pm

Re: Some fun effects shaders for the GLSLShader module

Post by spacedoctor »

That drawing shader is great. And VideoHeight too - have a bunch of grey height maps from terrain models of Australia and New Zealand that will get some use now! Should be able to get the height synced to the beat; cool.
Can't work out how to get the Array X and Y working though - any suggestions? Have tried with .png, should it just be a shape/colour with mask?
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Some fun effects shaders for the GLSLShader module

Post by Magic »

Can't work out how to get the Array X and Y working though - any suggestions? Have tried with .png, should it just be a shape/colour with mask?
Oops, sorry about that. You're a Mac user right? It looks like there was a tiny little bug that prevented those from working on certain Macs. Can you try them again?

Note: if you happen to be using Chrome, try Safari temporarily instead... Chrome doesn't seem to let me download the new versions.
spacedoctor
Posts: 31
Joined: Sat Sep 06, 2014 9:44 pm

Re: Some fun effects shaders for the GLSLShader module

Post by spacedoctor »

Thanks Eric, works a treat -bug fixed!
Post Reply