YOUR ACCOUNT

Login or Register to post new topics or replies
Arcade Fiction
Posts: 7
Filters: 5
  Details E-Mail
Arcade Fiction
Posts: 7
Filters: 5
Wow, good example of what can be done in Filter Forge. I can't wait to devise something that utilizes this new logic bit. Thanks.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Quote
Morgantao wrote on the filter description

This snippet shows how to setup an automatic switch in your filter. It uses an If component to check for a condition, and routes the render accordingly. No scripts are used.

In this example I show a complete If-Then-Else cycle, by using the same logic switch twice.You can chain as many switches as you want, with one being If-Then, two being If-Then-Else (As in this example), and 3 or more being If-Then-Elseif... and so on.


WOW, this seems to be very interesting and useful, I will see how it works and what can be done with this.

Thanks
  Details E-Mail
Morgantao
Can't script

Posts: 2185
Filters: 20
If you need any help deciphering what's going on, tell me. smile:)
  Details E-Mail
Ghislaine
Ghislaine

Posts: 3142
Filters: 270
Hummm... interesting Morgan smile:)
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Quote
Morgantao wrote:

If you need any help deciphering what's going on, tell me.


I have tried to understand and see HOW you have done this, but my low skills of FF have not let me do it and really need a explanation and a possible mini user guide for this.

How you have used the remapping so it changes the colors at the rotation of 13 and 24 values?

What exactly is involved in the switch of the if-then-else cycle ?

Could you put more examples of how this can be used ?

Thanks very much

Sorry for my basic knowledge of FF smile:blush:
  Details E-Mail
Morgantao
Can't script

Posts: 2185
Filters: 20
For a cool example of what can be done with this logic switch, take a look at the examples posted by Dactilardesign and by me here:
http://www.filterforge.com/forum/read...1&TID=9751
It's near the bottom of page 1 and all of page 2.
In the explosion examples, the logic switch controls when explosion behavior changes, from growing, to fading out and rising.
  Details E-Mail
Morgantao
Can't script

Posts: 2185
Filters: 20
And here I'll try to explain. Brace yourself, it's a long read smile:D
Note that I will explain a bit about how the If components works, and alot about the specific example in the snippet. Once you understand how the If component works for this example, you can use it in many other ways.

In this example I decided to have the IntSlider value go fr om 1 to 36 (each step represents 10 degrees of rotation to the image, 360 degrees total, 1 complete revolution). Also I wanted the tint of the image to change every third of the way.

The rotation part is simple, there's nothing new there. I'll skip that and go right to the logic.

The value on the IntSlider is connected to the source of the If component. Since the IF component is an RGB math component, it's expecting an RGB value. Traditionaly, the RGB values from the IntSlider would be mapped as black to white (0 to 1). If we use the remappeing option on the slider, we can set different values.

The If component has two sources (or values), an operation (a condition between the two sources), and two results (Then and Else). One result is if the condition is true, one if it's false. Once we got a result, our filter splits into two branches. It either goes one way and does ABC, or another way, and does XYZ.

Since I want something to happen after one third of the rotation is complete, I need to check what part of the rotation we're in. As we have 36 steps of rotation, and 36/3=12, we know that each 12 steps are a different third.
So now I want to check what step I'm in. To do that, I set one source of the If component to 13. But how do I set a numeric value to a RGB node?
By using RGB of course smile:)
More specifically, with HDR values. To set the value of Source A to 13, I click on it, and get the color picker. I Check the HDR box, and now my values are not lim ited between 0 and 1. Now I just set the brightness (B) value to what I need, wich is 13, and click OK.
now it's time to set Source B. To do that, we connect the Intslider to source B, and use the remapper to set the minimum value (color) and maximum value. Those values correspond to the values of the IntSlider, or 1 to 36 in this example.
Again, I check the HDR box in the color picker, and set minimum to 1 and maximum to 36.
The Now let's set the results. This is simple. We want one to be white, and one to be black.
The operation is the last thing we need to set in the If component. In this case, we want to make sure we're at step 13 or more. Setting the operation to A>B makes FF ask, is A bigger than B? If the answer is YES, the result is what you set in Then. Otherwise, the result is what you set in Else. In thise case, FF keeps asking: "Is 13 bigger than what the IntSlider value is"? And here comes the split in the filter. If the answer is NO, the result is black color, and if it's YES, we get a white color.

I harnessed the power of a MultiBlend component to decide which of two branches of the split to take. Since in a multiblend we can set the opacity of each layer, the black and white results of the If component play as the transparency mask for the layers. As long as the result of the If is NO, we set one layer mask to white, and the other to black, and as long as the result is YES, we invert the mask colors.

Now we simply duplicate our logic switch, to accommodate for the second and third parts of the image rotation. All we have to do is change the value of Souece A of the If component to 24. That way, we have another split in the filter, and if we're between step 13 and 24, we go one way, and if we're after step 24, we go another way.

Hope this help clear things up. If you still have questions, don't be affraid to ask. smile:)
  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
+18 new in 30 days!

153,537 Posts
+6 new in 7 days!

15,348 Topics
+72 new in year!

Create an Account

Online Users Last minute:

27 unregistered users.