Null Module?

Sat Oct 03, 2020 11:09 pm

Hi! I'm currently using Transparency modules set to 0.0 to route my "roups of modules through and though I don't believe it adds too much additional processing power, something like this may be helpful for grouping modules together by routing them through a module that does nothing other than tidy up the workspace a bit. Cheers!
kid.danger
 
Posts: 14
Joined: Wed May 17, 2017 6:17 pm

Re: Null Module?

Sat Oct 03, 2020 11:18 pm

Sure, but don't use the Transparency module for that. It does require some processing power even when set to 0.

The Transform modules would be better. Scale set to 1, or Translate set to 0, would do nothing to your input. Actually the "lightest" one would be the RotateVector module with the Angle param set to 0.
Eric
Site Admin
 
Posts: 2858
Joined: Wed Apr 09, 2014 9:28 pm

Re: Null Module?

Sun Oct 04, 2020 12:13 am

Awesome! Thanks for pointing that out, Eric.
kid.danger
 
Posts: 14
Joined: Wed May 17, 2017 6:17 pm

Re: Null Module?

Thu Oct 15, 2020 3:30 am

Another thing you can do is make an ISF module called Annotation (or some such) that just passes through the input. The cool thing is you can disable the Show Param For both Bypass and Power, and just have a block with some text:

annotationblock.png
annotationblock.png (8.73 KiB) Viewed 4309 times


I've made a file called :
Annotation.fx

and added the code to just pass through:
Code: Select all
/*{
   "INPUTS": [
      {
         "NAME": "inputImage",
         "TYPE": "image"
      }
   ]
}*/
void main() {
   gl_FragColor = IMG_THIS_PIXEL(inputImage);
}


That goes in your documents in magic > modules or some folder therein. It's attached as well.

EDIT: After discussion with Eric below, if you go this route you should leave bypass showing and check it to minimize processor usage.
Attachments
Annotation.fs
Block for adding annotations, just passes through input
(250 Bytes) Downloaded 7 times
synthmusic
 
Posts: 16
Joined: Wed Sep 02, 2020 6:45 am

Re: Null Module?

Thu Oct 15, 2020 4:21 am

Using an ISF module for that is a waste of processing and memory. Even if the image isn’t being modified, it’s still being copied.
Eric
Site Admin
 
Posts: 2858
Joined: Wed Apr 09, 2014 9:28 pm

Re: Null Module?

Thu Oct 15, 2020 4:32 am

Eric wrote:Using an ISF module for that is a waste of processing and memory. Even if the image isn’t being modified, it’s still being copied.


Hmmm, seen several of these over time, trying to collect all the info. Is this as opposed to the RotateVector module? When seen previously I took away the processing would be minimal for this ISF, perhaps only if bypassed?

Out of curiosity, do the internal modules take very much less resources than the ISFs? Also think in the past you suggested the InputSelector was doing the absolute least amount of work, is that true over the RotateVector? Thanks!
synthmusic
 
Posts: 16
Joined: Wed Sep 02, 2020 6:45 am

Re: Null Module?

Thu Oct 15, 2020 3:21 pm

Bypassing will definitely avoid all processing, no matter the module.

The RotateVector module has minimum processing when it's *not* bypassed, as long as the angle is 0.

The InputSelector also has minimum processing when not bypassed, but it can only pass one input at a time.

Some of Magic's internal modules are ISF, so it isn't about internal vs ISF.
Eric
Site Admin
 
Posts: 2858
Joined: Wed Apr 09, 2014 9:28 pm

Return to Feature Requests

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