Shadertoy to ISF

Mon Sep 07, 2015 11:07 pm

Many of you have discovered that http://shadertoy.com is a great resource for adding new effects to your Magic projects. Shadertoy-format code is supported natively in Magic via the GLSLShader module, and it works well. But it does have some limitations.

Recent versions of Magic now support the ISF shader format, which is even more versatile than the GLSLShader module, because you can add and rename parameters, directly import texture images, do multi-pass rendering, and more.

Even more importantly, ISF shaders show up as modules in Magic's main menu, allowing you to organize them much more easily.

Syd and I developed a little script that lets you automatically convert Shadertoy shaders to the ISF format. Check it out here:

https://magicmusicvisuals.com/utils/shadertoy_to_isf.php

Try it out a few times, and after you've saved some ISF files to your computer, have a look at this topic: viewtopic.php?f=3&t=412, which will teach you how to get Magic to recognize the files as modules.

Please let me know if you have any questions. And if you haven't checked out http://shadertoy.com yet, head over there with a WebGL-enabled browser (such as the latest version of Chrome) to see some amazing GPU-accelerated graphics and effects.

Have fun,
Eric

p.s.: Please respect the license of each shader. Some of them aren't for commercial use.
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Sun Sep 13, 2015 7:57 am

Thank you for this cool tool!
skarabee
 
Posts: 71
Joined: Fri Aug 28, 2015 3:11 am

Re: Shadertoy to ISF

Wed Sep 16, 2015 6:30 am

This is awesome! Thanks,Eric, it just keeps getting better and better :!:
deskmate
 
Posts: 8
Joined: Wed Jul 22, 2015 2:35 pm

Re: Shadertoy to ISF

Thu Sep 17, 2015 4:30 am

>>Please let me know if you have any questions.

How many am I allowed? :oops:

" License Creative Commons Attribution-NonCommercial-ShareAlike"

What exactly does this mean? I can use it or I can't? Can I use it in a show, or does it mean that I just couldn't sell it ?

And now for the big one....

Msl3Rr

Would you be able to explain in layman's terms how he gets those cubes to react individually?

The links he provided, take me to pages that may as well have been written in Martian Idioma.

X,Y,Z,W for me in magic, only makes all of the cubes move simultaneously.

When it's on shadertoy, it's very cool.
deskmate
 
Posts: 8
Joined: Wed Jul 22, 2015 2:35 pm

Re: Shadertoy to ISF

Thu Sep 17, 2015 5:23 am

" License Creative Commons Attribution-NonCommercial-ShareAlike"

What exactly does this mean? I can use it or I can't? Can I use it in a show, or does it mean that I just couldn't sell it ?

I'm not really an expert in this kind of thing, but personally I wouldn't use anything that says "NonCommercial" in a situation I was profiting from (ticket sales, videos with advertisements, etc.).

Would you be able to explain in layman's terms how he gets those cubes to react individually?

The cubes are reacting to the frequency spectrum of the audio. So you have to provide the spectrum to the shader somehow. In Magic, this is accomplished by using the AudioToImage module, and selecting the "Spectrum" option. Have a look at this post: viewtopic.php?f=3&t=277#p1739 (and you might want to look at the post before it also, for background). In your case, you would set it up exactly like the screenshot with the FFT Spectrogram module, except replace the FFT Spectrogram with your ISF module based on Msl3Rr.

One thing to keep in mind is that he very specifically wrote Msl3Rr to look good with the audio track he provides. Other audio might not work as nicely, due to the frequencies being different. But you can play around with it in Magic and see what happens :).

Another thing is, I think he is smoothing the frequency data. If you want more info, let me know and I can try to guide you through it. It's kind of a strange yet interesting process, because you have to start applying image filters to audio.
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Thu Sep 17, 2015 4:54 pm

This worked, easy fix.

But more amazing is the speed of an answer to my question, thanks :D
deskmate
 
Posts: 8
Joined: Wed Jul 22, 2015 2:35 pm

Re: Shadertoy to ISF

Wed Apr 20, 2016 4:31 am

Hey Eric!! Guyz!!
I just found my "dream shader" on shadertoy but i can't convert it properly into Magic...
Eric, i know that you're now developing update for a new GLSLmodule, could you try smth with this?
This's a very special Shader which we're waiting for the whole life...)
Any help appreciated!!
https://www.shadertoy.com/view/XddSRX
neoz
 
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Re: Shadertoy to ISF

Wed Apr 20, 2016 3:16 pm

Yup, that is a multipass shader -- indicated by the presence of a "Buf A" tab in addition to the "Image" tab. Multipass isn't supported right now, but it will be when I update the GLSLShader module.
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Thu Apr 21, 2016 11:44 am

Eric wrote:Yup, that is a multipass shader -- indicated by the presence of a "Buf A" tab in addition to the "Image" tab. Multipass isn't supported right now, but it will be when I update the GLSLShader module.

Ohh man... That will be great!! I will pray hard for this))
neoz
 
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Re: Shadertoy to ISF

Thu Jun 23, 2016 8:18 am

Thanks for sharing this tutorial!! having much fun with Magic :)
borsan
 
Posts: 3
Joined: Wed Jul 15, 2015 1:54 pm

Re: Shadertoy to ISF

Fri Dec 09, 2016 3:12 pm

Hey Eric,

knowing that you have been busy with updating MMV - but would you mind letting me know if the GSLS upgrade is something you have still on the plate?

Cheers
Heiko
siobhan
 
Posts: 2
Joined: Thu Nov 17, 2016 10:18 pm

Re: Shadertoy to ISF

Fri Dec 09, 2016 3:56 pm

Yes, definitely :). But it's a bit more of a priority for us to get ISF v2 working first. Hopefully in one of the next two minor releases.
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Mon Dec 19, 2016 3:18 pm

Hey Eric,
First, huge thanx for such a beautiful update v2. DarkUi = superb!!
But i'm still puzzling and can't get into this shader:
https://www.shadertoy.com/view/XddSRX#
Maybe some updates follow?

Cheeerz,
Y
neoz
 
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Re: Shadertoy to ISF

Mon Dec 19, 2016 4:13 pm

That shader uses multiple (in this case only one) buffers to layer effects within the shader. MMV doesn't support buffers yet but it's been on Eric's radar for a while. That's the thing about software - it is fluid so things change around you and sometimes it is hard to keep up, especially as a developer.
Sadler
 
Posts: 510
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Shadertoy to ISF

Mon Jan 02, 2017 7:42 am

Sky is blue.. Grass is green.. ;)
neoz
 
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Re: Shadertoy to ISF

Fri Feb 17, 2017 9:10 am

that's really a nice tool, thanks a lot Eric.
I have an issue with the image: they don't show on the page and I can't download them ( it works before so shadertoys seems to have change something).
Unfortunatly Syd's link to all the textures as a zip download seems to be broken.
damstraversaz
 
Posts: 138
Joined: Tue Aug 26, 2014 11:22 am

Re: Shadertoy to ISF

Fri Feb 17, 2017 3:54 pm

It does seem like Shadertoy changed something. But I think I fixed the problem, so let me know if there are still any issues.
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Fri Feb 17, 2017 8:10 pm

it works perfectly, thanks a lot for the fix !
damstraversaz
 
Posts: 138
Joined: Tue Aug 26, 2014 11:22 am

Re: Shadertoy to ISF

Sat May 06, 2017 6:28 pm

Hi, I'm in the midst of demo'ing your software. I've been using a few GLSL shaders and took me a while to find I could convert to ISF. One thing I wonder after having trouble getting the source textures from the Shadertoy site myself, are you having to use the Shadertoy API to retrieve the textures or are they simply visible in source code of page somewhere ?
Michael_Z_Freeman
 
Posts: 2
Joined: Sat May 06, 2017 6:21 pm

Re: Shadertoy to ISF

Sat May 06, 2017 8:12 pm

Hi Michael, yes the API is necessary to retrieve the textures. That's one of the conveniences provided by my script -- it handles the texture retrieval for you.
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Mon May 08, 2017 12:26 pm

Cheers. saves me puzzling over html/js code of their pages :mrgreen:.
Michael_Z_Freeman
 
Posts: 2
Joined: Sat May 06, 2017 6:21 pm

Re: Shadertoy to ISF

Thu Jul 06, 2017 12:18 pm

Hi Eric,

I just wanted to mention, that you have another soul praying for a multipass support :oops: ....

Lots of epic shaders out there :geek:

Regards,
S.
Slavi
 
Posts: 40
Joined: Thu Mar 31, 2016 7:15 am

Re: Shadertoy to ISF

Sat Sep 30, 2017 5:06 am

Hey, just got Magic and I'm loving it so far. I gave this a try and none of the shaders I tried worked. Is this still working or did I screw up some how? Usually I'm smart ;-)

So here's a couple of the ones I tried, if anyone could give a shot converting them and let me know how it goes or have any ideas what I may be doing wrong.

https://www.shadertoy.com/view/XlsczN
https://www.shadertoy.com/view/MtfSz2
https://www.shadertoy.com/view/Md3SRM

Thanks
Jaysin
 
Posts: 3
Joined: Sat Sep 30, 2017 4:56 am

Re: Shadertoy to ISF

Sat Sep 30, 2017 5:44 pm

Thanks for letting me know. It looks like Shadertoy changed its spec recently, so I just updated my script and it should work with the second two. The first one is multipass so it won't work (yet).
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Sat Sep 30, 2017 7:02 pm

Thanks for the quick reply and the quick fix, works now. Guess I'll start saving a list of all the multi-pass shaders in anticipation :-)
Jaysin
 
Posts: 3
Joined: Sat Sep 30, 2017 4:56 am

Re: Shadertoy to ISF

Tue Feb 06, 2018 4:17 pm

Hi,

Is it possible to use Magic with this shader:
https://www.shadertoy.com/view/4sB3WV

I don't want to use textures, but Magic generated content. I tried to do it the "tutorial way" but it gives me a "one way" module:, that doesn't have an input.
Thank you!

Regards,
S.
Slavi
 
Posts: 40
Joined: Thu Mar 31, 2016 7:15 am

Re: Shadertoy to ISF

Wed Feb 07, 2018 3:40 pm

If you want to use Magic images as inputs instead of the Shadertoy textures, click the checkbox that says "Don't use IMPORTED images (advanced)".
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Sat Feb 17, 2018 12:29 pm

I'm not 100% per cent sure if I've done this correctly because a lot of this is new to me.

I didnt know how to get the shadertoy content so it would work in Magic, so I googled it a bit and found this converter. I converted it, then copied and pasted it into a text file, and deleted .txt at the end and replaced it with .fs . Is that correct ?

If I've done that right, do I just link to a folder anywhere with those .fs files in it, or will it work more fluidly if that folder is placed in a specific place within the magic installation folder ??

Apologies for noob questions. I excel at audio DAWs, but this is all new to me and i'd never even heard of a shader until yesterday and thought it was simply a tool to make gradients of a colour so that red could become lighter red or blue becomes lighter blue etc....so imagine my surprise when I tried the shaders and found not shaders, but FX !!

Very cool. I see the potential for awesomeness, but feeling very green
Carbinax
 
Posts: 8
Joined: Sat Feb 17, 2018 11:45 am
Location: Northern Ireland

Re: Shadertoy to ISF

Sat Feb 17, 2018 4:05 pm

Try this tutorial: viewtopic.php?f=3&t=412
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Sun Feb 18, 2018 5:15 pm

thanks eric. I had a look at that and it seems easy enough.

Having problems with shadertoy though. I can see 1 page and the video is moving but i click to the next page, they take an age to load, and then get a message about webGL being disabled, so i went into firefoxes config page ( the here be dragoons page ) and went down to webGL.disable.angle or something like that and changed it from true to false, or vice versa ( cant remember ), and it worked for a few minutes and screwed up again. I tried this several times, changing back and forth from true to false, but firefox wont play the videos now.
Without the videos, the code doesn't appear either, so I can't copy / paste and do the .fs thing without it.

Any ideas ?? :D
Carbinax
 
Posts: 8
Joined: Sat Feb 17, 2018 11:45 am
Location: Northern Ireland

Re: Shadertoy to ISF

Sun Feb 18, 2018 5:36 pm

Hmm... well I can't say I'm an expert on Firefox or WebGL or Shadertoy itself... but I might suggest trying a different browser, such as Chrome...
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Sun Feb 18, 2018 5:56 pm

yeah I tried Chrome, and its just a little bit better, but does the same thing. Im new to graphics so a lot of it is double dutch to me, and was hoping you might know. Thanks anyway :D
Carbinax
 
Posts: 8
Joined: Sat Feb 17, 2018 11:45 am
Location: Northern Ireland

Re: Shadertoy to ISF

Tue Jul 03, 2018 1:36 am

Hey everyone!

I am trying to get a pixel sorting type shader for live performances. I have been trying one with no success in Magic and then read that you can't use ones with multiple buffers. I found this one (https://www.shadertoy.com/view/MstyDl) but the program still closes every time I try to use it. I am very new to uploading these myself so any help on how to get them into Magic would be much appreciated.
mulherje
 
Posts: 4
Joined: Wed Apr 25, 2018 2:38 am

Re: Shadertoy to ISF

Tue Jul 03, 2018 4:38 pm

When you say that the program closes, do you mean that Magic crashes? If so, you may want to try updating your graphics drivers...
Eric
Site Admin
 
Posts: 2379
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Sun Oct 21, 2018 9:40 pm

Thanks Eric,

Very useful indeed. :-)

If you are considering any updates to the conversion script, I've needed to manually add the following line:

float iFrame = FRAMEINDEX;

to the converted code for shaders that use the iFrame variable (similar to the way the code handles iTime). Not sure how common this is, but might be worth adding at some point if you are making any other changes.
IslandGhost
 
Posts: 2
Joined: Sun Oct 21, 2018 9:32 pm

Return to Tutorials, etc.

© 2019 Color & Music, LLC • This web site is mobile-friendly