GithubHelp home page GithubHelp logo

Comments (14)

OmarEmaraDev avatar OmarEmaraDev commented on July 3, 2024

Only two examples were altered, extra examples were added, significantly more explanation have been introduced. Not sure what you are talking about.

You can find the previous version here:

https://github.com/JacquesLucke/animation_nodes_manual/blob/d70b32170458c34290041704575ab5bd6bef60bc/docs/user_guide/subprograms/loop.rst

from animation_nodes_manual.

RodeyOrg avatar RodeyOrg commented on July 3, 2024

Thanks OmarSquircleArt, it was for example 6, which originally I thought seemed to have been abbreviated, but glad to have the original also now. Thanks for the efforts anyway.

from animation_nodes_manual.

RodeyOrg avatar RodeyOrg commented on July 3, 2024

Only two examples were altered, extra examples were added, significantly more explanation have been introduced. Not sure what you are talking about.

You can find the previous version here:

https://github.com/JacquesLucke/animation_nodes_manual/blob/d70b32170458c34290041704575ab5bd6bef60bc/docs/user_guide/subprograms/loop.rst

Something is not right here IMO

Please, for example, look at example 6 the on your updated Subprograms > Loops page

https://animation-nodes-manual.readthedocs.io/en/latest/user_guide/subprograms/loop.html

And then look at it on the original/previous version which you sent the link to.

https://github.com/JacquesLucke/animation_nodes_manual/blob/d70b32170458c34290041704575ab5bd6bef60bc/docs/user_guide/subprograms/loop.rst

There is on the updated version significant sections of text removed. Not just on that example but several others the whole descriptions are very abbreviated in comparison with original (previous) version.

from animation_nodes_manual.

OmarEmaraDev avatar OmarEmaraDev commented on July 3, 2024

Here is the updated text of Example 6:

In this example, we loop over two integer list and use a generator to append the product of both integers. Notice that the second list have 5 elements while the first only have 4, thus the loop ignores the fifth element of the second list and only executes 4 times. Subsequently, the output list contains only 4 elements.

And here is the original:

The above example multiply two lists, notice that the second list has an 5 elements while the first list has only 4 and subsequently the loop only runs 4 times and the output is a list of four elements.

Where is the abbreviation in that? Please quote the exact paragraph that you think was abbreviated.

from animation_nodes_manual.

RodeyOrg avatar RodeyOrg commented on July 3, 2024

Here is what I had originally as example 6

Example 6

Each iterator has an option Use Iterator As Output which if enabled will just add the input iterator as an output, this option may seem useless but it actually have a specific function which is to define the operation flow, look at the following example.

images/loop_example6.png

Let us assume that we want to hide a group of objects then unhide them again for no good reason. One could make a loop that hide and unhide objects then invoke that loop twice, one for hiding and one for unhiding, and this is what we did in the left setup. However, it doesn't work, my objects are still hidden even though I unhide them using the upper loop, this happens because Animation Nodes doesn't know which loop to execute first so it just executed the hiding loop last and that's why our objects are hidden. So to ensure that a loop will execute before another and since they both take the object list as input. We expose the iterator as an output then use that output for the second loop, this is how it the right setup work.

from animation_nodes_manual.

OmarEmaraDev avatar OmarEmaraDev commented on July 3, 2024

And the updated example (Example 8 in the new page) is as follows:

In this illustrative example, we have two node trees that supposedly does the same thing, that is, hide the objects in a blender group and then show them. The only difference is, in the node tree on the right, we used the iterator as an output and used that output as the iterator of the second loop, while on the left node tree, we used the object list directly for both loops.

loop_example8.png

Those two node trees are actually not the same, the left node tree shouldn’t be used for two reasons:

  • There is no defined order for the loops to execute. Should Animation Nodes execute the upper or the lower loop first? There is no way to know, so Animation Nodes executes them in arbitrary order. This causes unexpected results because if the show loop was executed first, the object will end up hidden because the hide loop will execute second.
  • Even though the object list is not edited, Animation Nodes copy it thinking you wanted two different copies.

The right node tree fixes both problems by:

  • Defining an order for the loops to execute by making the second depend on the output of the first, thus instructing Animation Nodes to execute the dependencies first.
  • The object list is not copied because it is used sequentially, that is, no branching occur.

In conclusion, the right setup should be used at all times.

Moreover, the the Iterator Sockets section include some info on this as well:

If iterators are presents, an option Use {Iterator} As Output for each of them will be displayed, if enabled for an iterator, the iterator will be available as an output when the loop is invoked. The output will be the same list you input. This is useful to avoid unnecessary data copying by using the output instead of creating another branch from the source iterator which would enforce data copying. Moreover, this also ensures that the loop executes first as a consequence of the series connection. See examples below.

To me, this seems much better in structure, easier to understand, more accurate, and more comprehensive. If you want, I can poke Jacques to have a say in this.

from animation_nodes_manual.

RodeyOrg avatar RodeyOrg commented on July 3, 2024

OK got it, it's the example number changes that initially threw me. Not sure if nudging Jaques is required on this point, your call. Thnx.

from animation_nodes_manual.

RodeyOrg avatar RodeyOrg commented on July 3, 2024

I haven't been through all examples forensically and maybe I missed it but this example is missing in the new version—if so can I ask why?

At the first iteration, the iterator was 16 and it gets assigned to the parameter because of the equal to zero condition, at the second iteration, the iterator was 36 which is larger than the current parameter value which is 16 (assigned from the last iteration), so I reassign the parameter to be 36, at the third iteration, the iterator is -25 which is not larger than the current value of the parameter 36 so we don't assign it. Since we enabled the output option for the parameter, it is available as an output for the subprogram carrying the last assigned value which was 36 which is the largest value.

It could be helpful in explaining difficult the concepts of the loops/node setups etc.

PS I have found some minor typos, how are they best reported?

from animation_nodes_manual.

OmarEmaraDev avatar OmarEmaraDev commented on July 3, 2024

This is Example 9 in the new version. It is true that we omitted the iteration-by-iteration demonstration, but that was intentional, notice that we say:

Since we reassign whenever the integer is larger than the integer stored in the parameter, we end up with the largest integer, why? Take your time to think about it.

This encourages the reader to perform the iteration-by-iteration process oneself, and thus have a better understanding of it. Open Animation Nodes and try those examples yourself.


As for the typos, if you know how to use git/github, you can create a pull request with the fixes yourself. If you are not familiar with the process, you can create an issue pointing out those typos and we will fix it. Thanks in advance !

from animation_nodes_manual.

RodeyOrg avatar RodeyOrg commented on July 3, 2024

This encourages the reader to perform the iteration-by-iteration process oneself, and thus have a better understanding of it. Open Animation Nodes and try those examples yourself.

Thanks, but TBH for a newbie having access to a limited amount of comprehensive tutorials on AN that is somewhat of a steep request IMO. It's fine to challenge but to leave out guidance like this from the only(?) resource available on this exact node leaves little fallback for the reader beginner or otherwise.

*Maybe it might have been better to leave the example (and of course all other info as is poss) and simply challenged reader in another method, using the as much information as a foundation not as a goal.

As you know SUBPROGRAMS > LOOPS is so complex an area, let alone AN itself. Example 10 for instance #latest is so very difficult to even get working because the example doesn't explicitly outline basic steps in detail (for example when to invoke subprogram, order of node creation, as not all not outpiuts show for me).

Re typos got it.

Thanks again

from animation_nodes_manual.

OmarEmaraDev avatar OmarEmaraDev commented on July 3, 2024

Example 9 explains reassigment operator in a simple manner, Example 10 challenges the user in an iteration-by-iteration demonstration. So we did exactly as you said, we explained the reassignment operator it in details in an example (9) and challenged a demystification for it in (10).

As for the missing steps, we already covered that in the Parameters Sockets section. If the reader read that, the reader would be capable of understanding the little steps. Are we expected to explain it in every example? That would be tedious.

from animation_nodes_manual.

RodeyOrg avatar RodeyOrg commented on July 3, 2024

Oops maybe a small misunderstanding but I meant an explcit example from the old version below.

Example 7
(legacy version)

Anyhow I'm happy to leave it here—the manual changes have been made so it's probably more productive that I enquire for more explcit clarifications or use the legacy doc you kindly provided.

Thanks again @OmarSquircleArt

from animation_nodes_manual.

OmarEmaraDev avatar OmarEmaraDev commented on July 3, 2024

We are constantly trying to improve the documentation and your feedback is most welcome. We will rewrite some portions of the documentation on Loops based on your feedback. If you think any other part of the documentation needs improvements, please lets us know and we will improve it in matter of days. Alright?

from animation_nodes_manual.

RodeyOrg avatar RodeyOrg commented on July 3, 2024

We are constantly trying to improve the documentation and your feedback is most welcome. We will rewrite some portions of the documentation on Loops based on your feedback. If you think any other part of the documentation needs improvements, please lets us know and we will improve it in matter of days. Alright?

Perfect.

from animation_nodes_manual.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.