Previous topicNext topic

Shadertoy to ISF

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

Shadertoy to ISF

Post by Magic »

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/sha ... 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.
skarabee
Posts: 157
Joined: Fri Aug 28, 2015 3:11 am

Re: Shadertoy to ISF

Post by skarabee »

Thank you for this cool tool!
deskmate
Posts: 13
Joined: Wed Jul 22, 2015 2:35 pm

Re: Shadertoy to ISF

Post by deskmate »

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

Re: Shadertoy to ISF

Post by deskmate »

>>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.
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Post by Magic »

" 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.
deskmate
Posts: 13
Joined: Wed Jul 22, 2015 2:35 pm

Re: Shadertoy to ISF

Post by deskmate »

This worked, easy fix.

But more amazing is the speed of an answer to my question, thanks :D
neoz
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Re: Shadertoy to ISF

Post by neoz »

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
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Post by Magic »

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.
neoz
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Re: Shadertoy to ISF

Post by neoz »

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))
borsan
Posts: 3
Joined: Wed Jul 15, 2015 1:54 pm

Re: Shadertoy to ISF

Post by borsan »

Thanks for sharing this tutorial!! having much fun with Magic :)
siobhan
Posts: 2
Joined: Thu Nov 17, 2016 10:18 pm

Re: Shadertoy to ISF

Post by siobhan »

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
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Post by Magic »

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.
neoz
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Re: Shadertoy to ISF

Post by neoz »

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
Sadler
Posts: 1348
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: Shadertoy to ISF

Post by Sadler »

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.
neoz
Posts: 28
Joined: Mon Feb 16, 2015 2:07 pm

Re: Shadertoy to ISF

Post by neoz »

Sky is blue.. Grass is green.. ;)
damstraversaz
Posts: 179
Joined: Tue Aug 26, 2014 11:22 am

Re: Shadertoy to ISF

Post by damstraversaz »

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.
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Post by Magic »

It does seem like Shadertoy changed something. But I think I fixed the problem, so let me know if there are still any issues.
damstraversaz
Posts: 179
Joined: Tue Aug 26, 2014 11:22 am

Re: Shadertoy to ISF

Post by damstraversaz »

it works perfectly, thanks a lot for the fix !
Michael_Z_Freeman
Posts: 5
Joined: Sat May 06, 2017 6:21 pm

Re: Shadertoy to ISF

Post by Michael_Z_Freeman »

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 ?
Magic
Site Admin
Posts: 3676
Joined: Wed Apr 09, 2014 9:28 pm

Re: Shadertoy to ISF

Post by Magic »

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.
Post Reply