jit.anim.path - path saving? next/previous?

i.m.klif's icon

I'm doing a patch that uses a lot of jit.anim.path and i have few questions.

1. it seems there is no way to save adited paths to file. i can certainly built the system (using edit, getpoint, insert and delete messages) that saves the path in one way or the other and recreates it every time using append messags to jit.anim.path, but i wonder if there is something else that i'm missing?

2. is there a way to force the object controlled by jit.anim.path to go to the certain index point in the path when it is stopped? next and previous messages do work, but they don't update the position of the object, when play is stopped. the only way to manually control the position is using eval message, but there is no way to know when the object is exactly at index point.

3. i'm not clear on how time of an index point works. is the time between that index and previous point? what does sorttime do if those are just times between points? is tthere an automatic way to get the came speed along the path (i know how to program it, i just wonder if there is a built in feature that i'm missing)?

4. what does timemode do?

i found some errors in reference file:
- it mentiones @lenght @duration @pointcount @position.... but they don't exist

klif

Rob Ramirez's icon

hi klif

1- so jit.anim.path can handle path matrices output from jit.path. therefore you can use jit.path to construct your path (one caveat is it requires the time values to be absolute time rather than relative time), and output it as a matrix to jit.anim.path. you can then use all the jitter-matrix tools to store and recall your paths. perhaps most useful is to use jit.matrixset to write multiple paths to memory, and use the write and read messages to matrixset to write those paths to and from disk.

the example below shows how you can toggle between two jit.anim.path paths using jit.path and jit.matrixset

Max Patch
Copy patch and select New From Clipboard in Max.

2 - i'm getting some strange behavior with the next/prev messages. i'll look into that.

3/4 - the time is either the absolute time in seconds, or the relative time from the previous point, depending on the value of the timemode attribute. sorttime reorders the points based on the time value if they are out of order.

if you want to animate along the path at a constant speed, use the evallength message. send it a value between 0 and the current length of the patch (available via the length attribute). if you linearly interpolate between those values, the speed will remain constant. i can post an example if that's not clear.

thanks for the ref-page notes. i'll get those fixed up.

i.m.klif's icon

thank you rob! everything is perfectly clear, and thanks for the patch :)

i was also getting freezes and crashes ocassionally when i was trying next/previous messages. ( i am not so happy with my computer lately, and i wasn't sure if was max or computer, so i didn't report that)

klif

Sabina's icon

Hello,

In reference to the "prev" and "next" messages. They should make the object move to the next point of the animation path. In the help file patch of jit.anim.path , nothing happens when I send the messages . This is what I do. 1. I activate the rendering engine, 2. I send push over the "next" or "previous" message boxes. Here is the patch. Is something I am missing ? Or how can I make work the prev and next messages ?

Max Patch
Copy patch and select New From Clipboard in Max.