Hey guys!
Can someone explain how to control shader modul from midi device?
For example, i need to control many effects (ascii, matrix, etc) with midi knob smoothly. 5 effects - 5 knobs and smooth applying...
I tried to do it thru LumaKey modul, but i feel its not correct and there's also fps drop in this case...
Thanks a lot!
Controlling shader effects from midi
Controlling shader effects from midi
- Attachments
-
- ?
- mscr1.jpg (106.95 KiB) Viewed 9656 times
Re: Controlling shader effects from midi
Hmm, I think the issue you're having is that not all shaders respond to their parameters. It depends on every individual shader. Can you give me an example of an effect you're trying to achieve?
Re: Controlling shader effects from midi
Perhaps you're looking to (cross) fade shaders in and out using midi knobs or sliders.
One way that works well for me is to use the RGBA module and link all RGBA to the same control.
One way that works well for me is to use the RGBA module and link all RGBA to the same control.
Re: Controlling shader effects from midi
Eric, i'm trying just to on\off shader with knob, but their parametrs is another story!)Eric wrote:Hmm, I think the issue you're having is that not all shaders respond to their parameters. It depends on every individual shader. Can you give me an example of an effect you're trying to achieve?
I.e. i need to apply the effect on scene smoothly, hold it and get it back...
Re: Controlling shader effects from midi
Sadler, the problem is that [the effect shader] module is still rendering even when its not in use and fps dropdown dramatically - so i have to turn it off everytime and also i cant control module's on\off from the midi!Sadler wrote:Perhaps you're looking to (cross) fade shaders in and out using midi knobs or sliders.
One way that works well for me is to use the RGBA module and link all RGBA to the same control.
- Attachments
-
- 111111111r.jpg (92.25 KiB) Viewed 9633 times
Re: Controlling shader effects from midi
Well I guess that depends on the shaders you're using and the power of your graphics card and your resolution. Yes, shaders keep running when they're not visible but with 4 shaders running in this setup I still get a consistent 90fps on a GTX 570. A frame rate throttle set to 10ms keeps the fan noise down.
In this scene I control the opacity of 4 shaders using midi sliders on ColorRGB. Admittedly not the most complicated setup but enough to create video soup if you're not careful.
One way to compel shaders to (almost) turn off would be to edit (in shader code) a param so that it affected opacity and did nothing when zero. If you want to use a shader that already uses X and Y then give ShaderLoader FFGL a try which adds RGBA params, all of which can be controlled by midi.
Unless you're looking for specific interaction between shaders (e.g. blend modes or texture mapping) you could put your shaders in different scenes and fade between them that way.
In this scene I control the opacity of 4 shaders using midi sliders on ColorRGB. Admittedly not the most complicated setup but enough to create video soup if you're not careful.
One way to compel shaders to (almost) turn off would be to edit (in shader code) a param so that it affected opacity and did nothing when zero. If you want to use a shader that already uses X and Y then give ShaderLoader FFGL a try which adds RGBA params, all of which can be controlled by midi.
Unless you're looking for specific interaction between shaders (e.g. blend modes or texture mapping) you could put your shaders in different scenes and fade between them that way.
Re: Controlling shader effects from midi
Sadler, thanx for such detailed answer!!
My problem is in working shaders, they need to be inactive while not in use...
I've got ati m5100 firepro - it's not so bad, but in complicated scenes i have 30-40 fps, while without this - all ok 60fps...
So maybe there's a way to apply midi on module on\off button?))
I've got no more idea...
My problem is in working shaders, they need to be inactive while not in use...
I've got ati m5100 firepro - it's not so bad, but in complicated scenes i have 30-40 fps, while without this - all ok 60fps...
So maybe there's a way to apply midi on module on\off button?))
I've got no more idea...
Re: Controlling shader effects from midi
Ah, I see what you're saying now. Well, it just so happens that the next version of Magic (1.55 - coming very soon) will have the ability to control the module on/off via MIDI. So it should definitely improve your fps .
Re: Controlling shader effects from midi
Oh man... You made my day!