YOUR ACCOUNT

Login or Register to post new topics or replies
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Now that the FF 4.0 Beta 2 included the very good, awesome, interesting and useful Loop and iteration component, and having seen that many of you already know well how to use it in many ways and have many ideas about what to do with it I want to ask the following:

Please, could you suggest and give ideas, suggestions and Hints & Tips on how to get the most out of the Loop component?

Quote
(from beta 2 page)

Loop is immensely powerful


As it is very powerful, it would be good to give ideas, sugesttions, hints, tips and comments on how to be able to use the new loop component at its best and what really can be done with it.

Also thought that here could be possible to have some filters examples using the new loop component uploaded to know better and learn how to use it better.

Quote
(from beta 2 page)

However, proceed with caution. At the core of the Loop component lies recursion, a concept adapted from programming languages with all its benefits and hazards (such as potential exponential growth in rendering time). Unlike many other Filter Forge components that produce visible results no matter how you connect them, Loops require a more deliberate approach. That's why we put them into the new Advanced component category, together with Scripts


I also thought to put this thread after reading this text from the beta 2 page, as it is perhaps a "dangerous" things if you do not know well how to use it and to avoid in some way to run into problems

Also as said this component requires more deliberate approach as is not simply connecting components to it, and would be good to know how to use it in the best possible way

LOOP COMPONENT OPTIMIZATION

Would be good to know about how to optimize the process of the iteration so it keeps inside an efficient and good level and don´t go into problems or becomes too slow.

What components would be good to use connected to the loops, and what other components would be perhaps a bad idea to use with this.?
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Let me keep it very simple: Don't over use it, use only when needed. If you know something that renders faster, use that instead. No need to be fancy at all, be clear and simple.

Quote
What components would be good to use connected to the loops, and what other components would be perhaps a bad idea to use with this.?


FilterForge already solved that for you but not letting you use bitmap based components.

Basic filter production rules otherwise apply.
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Loops do add some overhead. As I just tested, on a simple Loop subtree (Free Ellipse + Blend) on 64 iterations the Loop version rendered about 1.5 times longer than the unrolled version.

However, with a heavier subtree, Loop seems to be faster than the unrolled version, about 8% faster for the attached example.

In other words, don't be afraid to use Loops (but watch out for exponential recursions!)

Loop Time.ffxml
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Thanks for the comments

Quote
Vladimir Golovin

Loops do add some overhead. As I just tested, on a simple Loop subtree (Free Ellipse + Blend) on 64 iterations the Loop version rendered about 1.5 times longer than the unrolled version


Good to know, so it seems that not always is good to use the loop component instead of the unrolled (non-loop) version

Quote
Vladimir Golovin

However, with a heavier subtree, Loop seems to be faster than the unrolled version, about 8% faster for the attached example


So, considering this, it is only better to use loop on more complex iterations and not on simple ones, but then where would be the limit between the best way to use the loop component or the unrolled version?

Perhaps I think that the only way would be try and test the render speed of both and see wich one works faster, or there is a number of minimum iterations needed for the loop component to be faster anyway?
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Unless the rendering time is already too long, I'd just use the Loop anyway, as it's more flexible, compact and convenient. Unrolling is ugly.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
Thanks Vladimir

Quote
Vladimir Golovin

Unrolling is ugly


yes smile:D is much better to see the compact version than the unrolled one smile:D you feel overwhelmed with the great amnount of components.

LOTUS PATTERNS FILTER - USE LOOPS INSTEAD?



I have this filter Lotus Patterns by Tim2501 and this would be a great candidate for using the new loops component, BUT, would be useful and better to use the new loop component and would be able to get any better render speed and be more efficient, or would not be good and justified in this specifical case?
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Quote
would be useful and better to use the new loop component and would be able to get any better render speed and be more efficient, or would not be good and justified in this specifical case?


Captain Obvious here: Try it yourself and see if it's better or not.

(I deleted some posts below. Spaceray, please don't clutter up the discussion.)
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Speaking of Unrolling:

Will there be a way to 'bake' a loop's subtree into a corresponding 'unrolled' filter tree? Via an 'Unroll Loop' menu option, perhaps?

I'm asking because this could potentially be a great way for filter authors to debug loops.
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
Vladimir Golovin
Administrator
Posts: 3446
Filters: 55
Dilla, no unrolling is planned. For debugging, you can use the Iteration (Preview) slider.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
I am trying to use this loops more, but I feel I need more advice and instructions on how to use it, as I am trying to combine the different components included with the loops to get a result, but only get weird things.

Until now I have been only able to make very simple things with the loops

This is a great and very good component and it has a huge potential for creating things that before was not possible or was very difficult and/or complex to make

I have already seen the filters available that uses loops but when trying to make my own I still do not know HOW to combine the components in the right way smile:(

The only available help for this is the very well done, helpful and useful The Loop Video Tutorial by Skybase and thanks to this video is that I have been able to make some things with Loops but still simple things.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
My personal advice is this: you're jumping ahead of yourself. Get with the basics. I'm glad that you get the simple things but at the point that you're saying "but only get weird things" or "I still do not know HOW to combine the components in the right way" suggests to me that you're still struggling to understand the basics of FilterForge.

In the Loop Video Tutorial I've assumed a couple things. 1. That you understand FilterForge. In other words: you've made filters from scratch, you know what you're doing or least have a decent grip on the ideas behind FF. That you're capable of creating a filter that you thought of and know what components to deal with to achieve certain aspects. 2. That not everybody's going to be on the same page with that. Some people just watch video tutorials because it's interesting. Some people are beginners... and so on. There are many things that we can assume. But understanding FF is what's key in understanding loops and what you can do with it.

Now ultimately, the most advanced applications will start requiring some level of knowledge in algebra and calculus, programming and so on. But at least by understanding the program from the bottom up, you can get somewhere and that's key.

Over the years I've seen several of your creations. It seems like you do a lot of "cherry picking" groups of components. In other words you're picking out stuff out of other people's filters and making your own stuff. Now as much as people say "don't reinvent the wheel", in FilterForge it should be "reinvent the wheel but your own way" if you truly want to understand it. I'm not saying picking out certain parts is wrong, I'm saying you need to learn why those components do something in your favor and adapt your own solutions. I feel that's another way to understand FF. I guess to some degree you're trying to do that, but I think it needs to be pushed!

Overall in summary here's my advice: 1. Don't jump the gun. Being able to do simple things is perfectly fine but doing more advanced stuff is going to require a lot more thought and understanding. 2. Get with the basics of what FilterForge does and how it behaves. There's an underlying structure to FilterForge and that structure is what you need understanding in. It'll explain why some things behave the way they do.

It's overwhelming but you have a lot of steps to climb still before you reach loops. I can write you instructions and methods but ultimately you're the one who applies these ideas and makes it happen. I basically don't want it to simply become "can somebody show me how to do X" every single thread I see. At some point you gotta figure it out on your own. It sucks but it's how I got over a lot of things.

Good luck.
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
lol on a fun side note I tried to record a video based on what I wrote above. It quickly became a long discussion.
  Details E-Mail
SpaceRay
SpaceRay

Posts: 12302
Filters: 35
WOW!! I love you for all this personal help, and I agree with you in all you have said and is very true, I can 't run before learning to walk, and have to understand well first all the basics about FF before using Loops in a good way, this is why also why it has been put in the Advanced parts of the components
  Details E-Mail

Join Our Community!

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

33,719 Registered Users
+8 new in 7 days!

153,544 Posts
+13 new in 7 days!

15,348 Topics
+71 new in year!

Create an Account

Online Users Last minute:

24 unregistered users.