YOUR ACCOUNT

Login or Register to post new topics or replies
TheBeat
Beat
Posts: 165
I need to switch between 24 possible inputs. One switch obviously is not enough.
So two switches (together the required 24 inputs) and 1 controller from 1 - 24.
Here I get lost. I want to use an IntSlider (obvious choice for controlling a switch), but I get a warning that my range (1-24) exceeds the max. Ok, it still works, although it might not be elegant. But then, for the second switch to get its selector input value, I need to Offset its values from the IntSlider with -12 (minus 12). I have checked remapping, but I can only apply positive Offsets. This can't be right. How do I apply negative Offsets?

I also tried with an RGBMath component, 'If'. That does not work either in the way I suspected it to be able to work. In this case I want the if to work as follows :

Input A is the IntSlider (range 1 - 24)
Input B is a fixed value of 12
Statement : if A > B (so 13 -24) then Output Switch 2 (13-24)
ELSE output Switch 1 (1-12).

I noticed that the inputs have to be from 0-1. Can I somehow switch to HDRcolors, so I can just use my numbers (like 12)? And can I output numbers (again also > 1)?

The Subtract component works alike. Only results between 0-1 seem acceptable. I understand that, in view of normal colors (not HDR). But is it not possible in FF to add or subtract 2 numbers < 1?

And is there somewhere more extended information about the RGBmath components than the Help? The otherwise excellent Help pages are very thin about these components.
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail
rachelduim
So Called Tortured Artist

Posts: 2498
Filters: 188
Here is a snippet (For FF7 or FF8) that illustrates what you want using HDR math. Think of the switches as being values 0-11, the If-Then-Else tests for 1-12 (or 13-24 for the else part). Email me if you need more explanation.

24 switch.ffxml
Math meets art meets psychedelia.
  Details E-Mail
TheBeat
Beat
Posts: 165
This is exactly what I was looking for. Great, thanks Rachel. I will study how it works tomorrow, my brain has already gone to bed smile:-)

Cheers, Beat
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail
TheBeat
Beat
Posts: 165
My brain has woken up again and it gets it. I had done the same idea, but not with HDR, so nothing worked. This shows me as well how to use the RGBmath components and do calculations. Pretty simple actually once I've seen it. Great - thanks a lot Rachel smile:-)

I was wondering if there is a monitor component, or a trick, to see what number comes out of a single calculation. Of course this is only possible with a single math operation, not with a math operation performed on a map, which would give a lot of single results and could be monitored with the LookUp component as I understand it.
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail
TheBeat
Beat
Posts: 165
I have made a simple snippet to do all the permutations of 3 or 4 inputs (Colors in this case, but could be anything really). I made one for 3 colors, which gives 6 permutations, of which three are the circular permutations and one for 4 colors.

The number of permutations of n elements is as follows :
Circular permutations (original included) = n
General perms (circular + all the others) = n! (n factorial, which means n!= 1*2*3* ...n-1*n. So 3 elements give you 1*2*3 = 6 permutations. 4 Elements give you 4 circular perms and 24 (1*2*3*4) perms. 5 Elements gives you already 120 , 6 > 720 perms and rapidly rising. So you might understand that I stopped at 4 elements.

I have used the switch solution rachelduim kindly supplied.

Question : I'd like to make the 4 elements perm part into a group. As a group only has 1 output and I need 4 for the 4 colors, how to address that? The input side is ok, also with more than 1 settings controller, but the output is a problem.

## Perm 3 + 4 Group.ffxml
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail
rachelduim
So Called Tortured Artist

Posts: 2498
Filters: 188
Quote
I was wondering if there is a monitor component, or a trick, to see what number comes out of a single calculation. Of course this is only possible with a single math operation, not with a math operation performed on a map, which would give a lot of single results and could be monitored with the LookUp component as I understand it.


You can look at the output for a single component by double clicking the component so that has an "eye" on it (same as Edit / Lock Preview). Then click on the eyedropper tool in the "component" view in the upper left window. Clicking anywhere within the "output" in the upper left window then reveals the RGB values at the place you clicked.

Example attached from the 24 switch snippet with the IntSlider control set to 14.

More on your other questions later.

Math meets art meets psychedelia.
  Details E-Mail
TheBeat
Beat
Posts: 165
Thanks Rachel, I got it. Wonderful. I have created two new Blend Modes and with the eyedropper I could see that there are actually negative values where they should be. I will post them after some more checking and tweaking.

For others : you have to open up the permutation snippet to see whats going on, as there can be only one final output and my snippet gives you 3 or 4 outputs. So look inside smile:-)
The Stone Age did not end because they ran out of stones. Niels Bohr
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,712 Registered Users
+19 new in 30 days!

153,533 Posts
+31 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

23 unregistered users.