3
$\begingroup$

Rotating Monkey

I want to create a translation or a rotation, but with pauses every custom number of frames (Preferable with an interpolation) , like in the GIF. How can I do this?

$\endgroup$
  • $\begingroup$ can you mark one answer as the correct answer, or say why your question isn't solved yet? $\endgroup$ – Jacques Lucke Apr 12 '16 at 16:23
5
$\begingroup$

I'm sure there are many ways to create this effect but here is one relatively simple one:

enter image description here

The essential node here is Mix Euler List. For translation you could use the Mix Vector List node.

The Mix Euler List node takes a list of vectors and a value between 0 and 1 (can be higher when Repeat is enabled). If the factor is 0 it will output the first element, if it's one it will output the last one. All values inbetween will result in an interpolated output. (eg. 0.1 will be something between 0° and 90° in the z-axis).

The downside of this approach is that the time intervalls are always the same, but it seems to work in your case. You can animate the time somehow to change the intervalls using the same approach but this can become messy very quickly so I didn't do it here.

|improve this answer|||||
$\endgroup$
  • $\begingroup$ A very cheap way to show the pause longer is to add the value twice or more in a row in the Create Euler List. $\endgroup$ – clankill3r Apr 11 '16 at 20:42
  • $\begingroup$ Do you think we should expose those Mix XX List nodes to menu? $\endgroup$ – Leon Cheung Apr 11 '16 at 23:43
  • $\begingroup$ Not sure if its worth it to create another 6 menu entries or so... $\endgroup$ – Jacques Lucke Apr 12 '16 at 8:30
  • $\begingroup$ True, but even for me, I actually didn't know these nodes until seeing this answer (shame on me.. :P). So my concern is: Whether or not should we create something without being found by most ppl... As for this specific one, maybe a new "List -> Mix" category is a workround for that. $\endgroup$ – Leon Cheung Apr 13 '16 at 2:12
3
$\begingroup$

Here is a way to achieve this which is easy to adjust. I've separated the parameters as inputs to a group subprogram.

It uses div/mod on the timestep to figure out the whole divisor and remainder portion of the timestep divided by "segment duration". It applies whole segments by multiplying by the supplied "segment rotation", and then applies an interpolation curve to the progress through the current rotation.

This could be adjusted to use a matrix instead of a rotation, allowing a more complex periodic motion to be applied, with pauses between intervals.

enter image description here

|improve this answer|||||
$\endgroup$
2
$\begingroup$

Here is another way:

enter image description here

NOTE: The setup above is for equidifferent result. Actually you can use different Delay, Rotation Increment, Interpolation and/or Duration value by adding new iterator(s) to the same loop, then use list(s) of same length to the iteration amount, for more variations.

|improve this answer|||||
$\endgroup$
  • 1
    $\begingroup$ what is "reassign loop paramater"? I can't find it. Is it depreciated? $\endgroup$ – David Jeske Jun 6 '16 at 18:03
  • $\begingroup$ @DavidJeske the Reassign button can be found in the Advanced Node Settings panel for each Loop Input node with parameter created. See here. $\endgroup$ – Leon Cheung Jun 7 '16 at 7:18
1
$\begingroup$

For the purpose of learning I tried to create another way of doing this. (I also learned time goes really fast doing this :) )

First create an Empty and animate one sequence to your liking using the F-Curve editor. I let the nodetrees speak for itself.

enter image description here

Make sure to set Evaluate F-Curve to Absolute, else it won't repeat. enter image description here

Make sure to set 'Allow negative index' on the [Get list Element] node. enter image description here


Although you could animate the sequence on the target object if you like. I do not recommend this! It will make swapping to a different rotation much harder. Now you could even make an List of Objects and select the object to use depending on the frame for example.

|improve this answer|||||
$\endgroup$
  • 1
    $\begingroup$ good idea. There are two things you can improve in that node tree: 1. use the Combine Euler node instead of Combine Vector. This way you don't need the Vector to Euler node. 2. To get the last element of a list you can use the Index -1. make sure that you enabled Allow Negative Index first (in the advanced settings). $\endgroup$ – Jacques Lucke Apr 12 '16 at 8:28
  • $\begingroup$ @JacquesLucke Thanks for pointing that out. I updated the images. $\endgroup$ – clankill3r Apr 12 '16 at 20:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.