Some fun effects shaders for the GLSLShader module
Some fun effects shaders for the GLSLShader module
EDIT: In Magic 1.6, many of the effects below are now included as standalone modules in the main installation.
---
Here are a few shader effects that work with the GLSLShader module. I created some of them myself, and I edited the others (from http://shadertoy.com and other places).
Make sure you hook up an input to the GLSLShader module to use them.
I'll update this post as I find more good ones. And feel free to add your own!
See post below for ChromaKey instructions.
And there's another (potentially better) ChromaKey later in this topic: http://magicmusicvisuals.com/forums/vie ... rt=10#p805
Also check out my Alpha Mask shader: http://magicmusicvisuals.com/forums/vie ... ?f=3&t=146
And my FadeMix shader: http://magicmusicvisuals.com/forums/vie ... p=711#p711
Sorted newest to oldest:
---
Here are a few shader effects that work with the GLSLShader module. I created some of them myself, and I edited the others (from http://shadertoy.com and other places).
Make sure you hook up an input to the GLSLShader module to use them.
I'll update this post as I find more good ones. And feel free to add your own!
See post below for ChromaKey instructions.
And there's another (potentially better) ChromaKey later in this topic: http://magicmusicvisuals.com/forums/vie ... rt=10#p805
Also check out my Alpha Mask shader: http://magicmusicvisuals.com/forums/vie ... ?f=3&t=146
And my FadeMix shader: http://magicmusicvisuals.com/forums/vie ... p=711#p711
Sorted newest to oldest:
- Attachments
-
- Drawing.txt
- (1.73 KiB) Downloaded 6960 times
-
- Glitch.txt
- (1.58 KiB) Downloaded 6889 times
-
- ArrayX.txt
- (585 Bytes) Downloaded 6870 times
-
- ArrayY.txt
- (585 Bytes) Downloaded 6834 times
-
- Opacity.txt
- (163 Bytes) Downloaded 6784 times
-
- Pixelate.txt
- (353 Bytes) Downloaded 7044 times
-
- Posterize.txt
- (339 Bytes) Downloaded 6635 times
-
- VideoHeight.txt
- (3.67 KiB) Downloaded 6975 times
-
- NoiseBlur.txt
- (294 Bytes) Downloaded 6722 times
-
- Ripple.txt
- (440 Bytes) Downloaded 6609 times
-
- ChromaKey.txt
- (2.38 KiB) Downloaded 7044 times
-
- SmudgeBlur.txt
- (560 Bytes) Downloaded 7186 times
-
- EdgeGlow.txt
- (1.16 KiB) Downloaded 6862 times
-
- WhirlyPool.txt
- (1.26 KiB) Downloaded 6955 times
Re: Some fun effects shaders for the GLSLShader module
Thanks, keep em coming.
Re: Some fun effects shaders for the GLSLShader module
The SmudgeBlur doesn't seem to work for me.
The other two work well though, as do many GLSL shaders I've tried.
The other two work well though, as do many GLSL shaders I've tried.
Re: Some fun effects shaders for the GLSLShader module
Hmm, that's weird. What kind of graphics card do you have? Perhaps try updating the driver?
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Some fun effects shaders for the GLSLShader module
Nor me. Tried two Win 7-64 systems.Sadler wrote:The SmudgeBlur doesn't seem to work for me...
NVIDIA GTX 580 & GT 610 Cards. Drivers 340.52 originally. Update to latest 344.65 made no difference.
Re: Some fun effects shaders for the GLSLShader module
Ok, it might be due to a bug in the original code. Strange. Anyway I fixed it and uploaded it again -- try it and let me know.
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Some fun effects shaders for the GLSLShader module
Fixed!Eric wrote:...-- try it and let me know.
Nice painterly effect when fed from the default shader. Goldwaves shader shows the effect very clearly. Thanks Eric.
Re: Some fun effects shaders for the GLSLShader module
Yes, fixed for me too - assuming this is the intended effect...
Re: Some fun effects shaders for the GLSLShader module
That looks right
. Cool.
Btw, for that shader you can adjust the X Param to change blur amount.
![Smile :)](./images/smilies/icon_e_smile.gif)
Btw, for that shader you can adjust the X Param to change blur amount.
Re: Some fun effects shaders for the GLSLShader module
I just added a Chroma Key shader (download link in first post). The code is based on Brad Larson's framework:
https://github.com/BradLarson/GPUImage/ ... eyFilter.m
He has a bunch of nice ones so I might add more later.
Because the Chroma Key requires an input color, but the GLSLShader module doesn't support one yet, you have to do something a bit convoluted. The second input has to be a solid color which represents the color to remove, such as a Polygon with a Color module : The X Param is "threshold sensitivity" and the Y Param is "smoothing". I recommend you start with values of .2 for each. In the above example you can see that it removes blue from the default shader.
https://github.com/BradLarson/GPUImage/ ... eyFilter.m
He has a bunch of nice ones so I might add more later.
Because the Chroma Key requires an input color, but the GLSLShader module doesn't support one yet, you have to do something a bit convoluted. The second input has to be a solid color which represents the color to remove, such as a Polygon with a Color module : The X Param is "threshold sensitivity" and the Y Param is "smoothing". I recommend you start with values of .2 for each. In the above example you can see that it removes blue from the default shader.
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Some fun effects shaders for the GLSLShader module
Many thanks for looking at Chroma Key Eric. Very useful!
I've just discovered your HueSaturation module with Lightness = 1 seems to work very well for this purpose (with no input needed). Previously I have used Resolume Avenue's AVFFGLSolidColor which again offers hue control.
BTW I seem to get slightly better keying using casty's Shadertoy "Vlahos chroma key" https://www.shadertoy.com/view/MsS3DW. This seems to totally eliminate any green fringing without impacting the brightness of the foreground object.
Regretfully I don't understand the code for either approach, but it would be awesome if you could devise a hybrid.
For green-screen work I find it's easier to be able to tune the hue of the reference color rather than mix RGB.Eric wrote:..Because the Chroma Key requires an input color... you have to do something a bit convoluted. The second input has to be a solid color which represents the color to remove, such as a Polygon with a Color module ...
I've just discovered your HueSaturation module with Lightness = 1 seems to work very well for this purpose (with no input needed). Previously I have used Resolume Avenue's AVFFGLSolidColor which again offers hue control.
BTW I seem to get slightly better keying using casty's Shadertoy "Vlahos chroma key" https://www.shadertoy.com/view/MsS3DW. This seems to totally eliminate any green fringing without impacting the brightness of the foreground object.
Regretfully I don't understand the code for either approach, but it would be awesome if you could devise a hybrid.
Re: Some fun effects shaders for the GLSLShader module
I'll try. Doing a quick test, the Shadertoy one seems to work well with the provided video's green color, but when I use a different video or image, and try to match the color, it doesn't work as well. It might be optimized for that particular green.it would be awesome if you could devise a hybrid.
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Some fun effects shaders for the GLSLShader module
Indeed! Hard codedEric wrote:.. It might be optimized for that particular green.
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
It would benefit greatly from the facilities you provided for your Larson-based shader; a reference color input together with two "tuning" parameters.
From experiment, I think perhaps the reference threshold adjustment can be provided by appropriate choice of hue/sat/brightness of the reference input.
If that was the case then the two tuning parameters could perhaps be "sharpness/smoothing" of the transition, and some "erosion" control of the foreground.
If you compiled your own dedicated shader
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Some fun effects shaders for the GLSLShader module
What I meant is that if even I change the hard-coded settings to make them configurable with inputs and parameters (as I did with one I originally provided), it doesn't seem to work any better. At least with the reference images I'm testing. Can you share something you're testing with?
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Some fun effects shaders for the GLSLShader module
Sorry Eric. I should have anticipated that you would do a thorough re-castingEric wrote:...Can you share something you're testing with?
![Smile :)](./images/smilies/icon_e_smile.gif)
I grabbed a frame from some greenscreen footage I shot for a short film: - compare especially the DJ's hair, bottom centre.
- and here's another I found on the web. Turns out to be a grab from some Shutterstock footage http://stock-clip.com/video/3214525-zebra-chroma-key - very clean outline with casty's keyer, even with this very low-res image.
Having done extensive further tests, I confirm my original findings. Even if your version of casty's keyer works only for green, it would be very useful for greenscreen work! I would welcome the opportunity to try it!
Re: Some fun effects shaders for the GLSLShader module
Ok, thanks Terry. I'll work on this a bit and see what I can come up with.
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Some fun effects shaders for the GLSLShader module
Much appreciated. Many thanks Eric!Eric wrote:I'll work on this a bit and see what I can come up with.
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Some fun effects shaders for the GLSLShader module
Try this Terry. I was able to get it to look pretty good on both the zebra and the DJ.
X Param is adjustable.
X Param is adjustable.
-
- Posts: 712
- Joined: Sun Sep 14, 2014 8:15 am
- Location: UK
- Contact:
Re: Some fun effects shaders for the GLSLShader module
Me too!Eric wrote:... I was able to get it to look pretty good on both the zebra and the DJ..
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Excellent control of transition and despill!
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Works equally well for blue-screen with c.b & c.g interchanged (5 locations total) in the getAlpha & despill subroutines.
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Hugely helpful! Very many thanks Eric!
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Re: Some fun effects shaders for the GLSLShader module
Thanks for these! I had been scratching my head trying to do some kind of chromakey effect with the Resolume plugins without any success.
Re: Some fun effects shaders for the GLSLShader module
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!![Smile :)](./images/smilies/icon_e_smile.gif)
EDIT: I just realized the NoiseBlur shader didn't work properly on some Macs. I think I fixed it.
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!
![Smile :)](./images/smilies/icon_e_smile.gif)
EDIT: I just realized the NoiseBlur shader didn't work properly on some Macs. I think I fixed it.
-
- Posts: 176
- Joined: Tue Aug 26, 2014 11:22 am
Re: Some fun effects shaders for the GLSLShader module
Oh, that's reallt great ! thanks a lot.
Could you share the project of the video ? it could be interesting
Could you share the project of the video ? it could be interesting
Re: Some fun effects shaders for the GLSLShader module
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.
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
![Smile :)](./images/smilies/icon_e_smile.gif)
- Attachments
-
- NoiseRipple.magic
- (1.71 KiB) Downloaded 6555 times
Re: Some fun effects shaders for the GLSLShader module
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!
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!
-
- Posts: 176
- Joined: Tue Aug 26, 2014 11:22 am
Re: Some fun effects shaders for the GLSLShader module
great ! thanks a lot
Re: Some fun effects shaders for the GLSLShader module
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.
Re: Some fun effects shaders for the GLSLShader module
I've added a quick new shader to the original post: Posterize.
The X Param controls the posterization amount.
The X Param controls the posterization amount.
Re: Some fun effects shaders for the GLSLShader module
...and here's another one: Pixelate.
X Param controls the pixelation amount.
X Param controls the pixelation amount.
Re: Some fun effects shaders for the GLSLShader module
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
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
Re: Some fun effects shaders for the GLSLShader module
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.
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: Some fun effects shaders for the GLSLShader module
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.
![Smile :)](./images/smilies/icon_e_smile.gif)
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.
Re: Some fun effects shaders for the GLSLShader module
you're such a tease!..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.
![Laughing :lol:](./images/smilies/icon_lol.gif)
Re: Some fun effects shaders for the GLSLShader module
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!
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!
Re: Some fun effects shaders for the GLSLShader module
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.
For the glitching, make sure you enable the "Audio->iCh." parameter, and set the "iCh. Index" parameter to 1.
Re: Some fun effects shaders for the GLSLShader module
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.
-
- Posts: 31
- Joined: Sat Sep 06, 2014 9:44 pm
Re: Some fun effects shaders for the GLSLShader module
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?
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?
Re: Some fun effects shaders for the GLSLShader module
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?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?
Note: if you happen to be using Chrome, try Safari temporarily instead... Chrome doesn't seem to let me download the new versions.
-
- Posts: 31
- Joined: Sat Sep 06, 2014 9:44 pm
Re: Some fun effects shaders for the GLSLShader module
Thanks Eric, works a treat -bug fixed!