Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Loopable Evolution on Wiggle Nodes (& Noises) #1639

Open
dapa5900 opened this issue Jan 15, 2021 · 17 comments
Open

Proposal: Loopable Evolution on Wiggle Nodes (& Noises) #1639

dapa5900 opened this issue Jan 15, 2021 · 17 comments
Labels
to-do Accepted proposal that needs to be implemented.

Comments

@dapa5900
Copy link

Hi.

A pretty common task in motion graphics is to create seamlessly looping animations (for example for social media posts, that play seamlessly forever or event visuals, etc.). Would it therefor be possible to add such an easy to access option to all nodes that generate animatable random values (eg. everything that has an evolution input like the wiggle nodes)? If so, this functionality should consistent of these 2 things:

  1. A checkbox that turns looping on and off
  2. An input to determine the length of the looping animation

I don't know if this helps but here's an example of someone already came up with an approach how to do this in AN (however this implementation is quite cumbersome und limited imho): https://www.youtube.com/watch?v=AExHc_b8yM0

If this is possible to achieve, it would be great if we could as well have a loopable evolution option for the noises in the noise falloff. In case this is not restricted to Blenders own limitations when it comes to animating and looping noises...?

@dapa5900 dapa5900 changed the title Proposal: Loopable Evolution Proposal: Loopable Evolution on Wiggle Nodes (& Noises) Jan 15, 2021
@OmarEmaraDev
Copy link
Collaborator

OmarEmaraDev commented Jan 15, 2021

The only method of looping noise I know of is done through higher dimensional projection. In order to loop an ND noise you need to evaluate the noise in (N+2)D space. In Animation Node nodes, the maximum dimension we support is 3D so we can only loop 1D noise, that is, Wiggle nodes. If we update our noise library to support 4D, we can loop 2D noise, but that's probably the furthest we can go.

Do other software support looping 3D and 4D noises?

@harisreedhar
Copy link
Contributor

The only method of looping noise I know of is done through higher dimensional projection. In order to loop an ND noise you need to evaluate the noise in (N+2)D space. In Animation Node nodes, the maximum dimension we support is 3D so we can only loop 1D noise, that is, Wiggle nodes. If we update our noise library to support 4D, we can loop 2D noise, but that's probably the furthest we can go.

Do other software support looping 3D and 4D noises?

Cinema 4d have loopable noise

@OmarEmaraDev
Copy link
Collaborator

@harisreedhar Even loopable 4D noise?

@harisreedhar
Copy link
Contributor

@harisreedhar Even loopable 4D noise?

I think it is loopable 2D noise.

@OmarEmaraDev
Copy link
Collaborator

I see. As expected.

@dapa5900
Copy link
Author

dapa5900 commented Jan 15, 2021

@OmarEmaraDev

I'm not sure about the type of noise but I also think it's 2d. Here you can see an example how it works in C4D:

loopNoise.mp4

You first set the speed of the animation and then via "Loop Period" the seconds the loop should take (in this case 3 seconds so when you set the timeline to in my case 74 (3x25-1) frames you get a seamlessly looping animation; you can see the timeline at the bottom of the video). If you leave the duration to 0 it animates but doesn't loop (which could be as well an alternative to having a checkbox for the looping option).

It would be super great if we can get this for AN as well since with loop-able noise you get of course much nicer and art direct-able patterns than with the wiggle nodes..

Thank you!

@OmarEmaraDev
Copy link
Collaborator

As a first step, we can implement looping for Wiggle nodes. Then we can look into updating the noise library and providing looping noises.

@dapa5900
Copy link
Author

@OmarEmaraDev

Awesome! Thanks

@OmarEmaraDev
Copy link
Collaborator

I will probably update to the noise library directly as I don't like the wiggle code we have at the moment and can't work with it.

@genesis2303
Copy link

I will probably update to the noise library directly as I don't like the wiggle code we have at the moment and can't work with it.

If this can help someone already translated loopable wiggle expression from after effects to AN
https://www.youtube.com/watch?v=IJENMB7q6Ug
It even seems to work with anticolision node.

@OmarEmaraDev
Copy link
Collaborator

@genesis2303 It is technically feasible and understandable. We just need to allocate the time and effort to do it as it requires quite a bit of work.

@dapa5900
Copy link
Author

@OmarEmaraDev great. I also wanted to check back how's it going with this project? Can you say something already, what might be a reasonable time frame here? Thanks for your efforts!

@OmarEmaraDev
Copy link
Collaborator

@dapa5900 Currently, we use a library called Fast Noise SIMD to implement noise related nodes. At the same time we have separate code for the wiggle node, which is essentially a 1D noise. Fast Noise SIMD is no longer maintained and a new library Fast Noise 2 is under development. Initially I wanted to update the noise library to be the new one and unify the wiggle code with it, this proved difficult and the library is still not stable enough for us to use anyways, so those efforts went no where.

Now, I am thinking of writing our own noise library from scratch, in Python. Before we do that, we need to make some experiments on the performance loss we can expect, and if that loss will be acceptable. There are some advantages for writing our own library, however. This include allowing more features like looping all noises up to 4D, which is not possible if we use a standard noise function.

So, first step is to do the experiment and see how feasible that is. Then if proved feasible, write the library and incorporate it into Animation Nodes. Then finally implement loopable noise and the like. I am doing my final exams at the moment, so I couldn't work on anything the last couple of weeks, but I will pick up development as soon as I am done. I will keep you updated and provide a time frame when I know more.

@dapa5900
Copy link
Author

@OmarEmaraDev alright. Thanks for the detailed explanation and interesting insights. And first of all good luck to you for your exams!

As a further suggestion, when you write the noises yourself maybe you also want to have a look at the pretty extensive Cinema4D noise library for inspiration.

https://developers.maxon.net/docs/Cinema4DPythonSDK/html/types/noise.html

@OmarEmaraDev
Copy link
Collaborator

@dapa5900 Thanks, I will take a look.

@OmarEmaraDev
Copy link
Collaborator

An update on this. Using Numpy universal functions was a bad idea. Performance was not great and I somehow missed the memory usage implications of such code, so this is a no go as far as I can tell.

I am not sure yet, but I now think the ideal solution is to write the library in ISPC. The one disadvantage is the non trivial dependency we will be introducing to Animation Nodes if we do that. Maybe using precompiled libs would be a good idea here, but lets not worry about that for now.

@OmarEmaraDev OmarEmaraDev added to-do Accepted proposal that needs to be implemented. and removed proposal labels Apr 27, 2021
@stale
Copy link

stale bot commented May 30, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to-do Accepted proposal that needs to be implemented.
Projects
None yet
Development

No branches or pull requests

4 participants