Jump to content
Search Community

Live record

Rosario Borda test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello Guys,

I'm involved in searching a tool for live record a movement of a sprite in an animation, in GSAP. Like the "Live Record" feature in Core animation, described as:

 

Quote

A new way to quickly add nuanced, organic, and fluid animations in real time. Simply hit record, and then modify a property over time. Also works great for prototyping out timing for complex movements. What could potentially take countless keyframes and iterations, can now be done in a single pass in real time. This powerful tool can add unique life to your projects in a simple intuitive way.

 

Any idea?

 

Many thanks,

Rosario

Link to comment
Share on other sites

That is something that could be quite useful to quickly and easily create organic movements. There is a tool in After Effects that many animators forget about called Motion Sketch which does the same thing as Blake's demo.

https://helpx.adobe.com/after-effects/using/assorted-animation-tools.html

 

I use it quite often in our animated explainer videos. One of my favorite uses is simulating mouse movements on a screen. What better way to simulate a user moving a cursor on a screen than recording a user moving a cursor on a screen? For things like that, it's much faster and more realistic than drawing a motion path and trying to get the speed and easing just right.

:)

  • Like 3
Link to comment
Share on other sites

1 hour ago, PointC said:

I use it quite often in our animated explainer videos. One of my favorite uses is simulating mouse movements on a screen. What better way to simulate a user moving a cursor on a screen than recording a user moving a cursor on a screen? For things like that, it's much faster and more realistic than drawing a motion path and trying to get the speed and easing just right.

:)

 

Ah ha! Thanks for explaining that. I can definitely see how this would be really useful now. Adding speed to a motion path with code is definitely not practical...

See the Pen XXbLer?editors=0010 by osublake (@osublake) on CodePen

 

Can you adjust the speed of different segments after you draw it in After Effects? I'm trying to think of an easy way to implement something like that.

  • Like 2
Link to comment
Share on other sites

You can control the speed of segments to a degree. After you draw, you have a series of keyframes on your timeline. If you draw slowly, you can literally have a keyframe per frame of animation. Quick movements result in far fewer keyframes and manipulating the speed/duration between them is much easier. You can change the time between any of them or increase/decrease the duration of the entire animation. That's via the timeline.

 

The second thing you have after using Motion Sketch is an actual motion path with all the points that correspond to each keyframe. You can add/subtract points or manipulate the bezier handles on any point you like. It results in the same changes as manipulating the keyframes on the timeline, but is sometimes easier to make the changes visually on the actual path.

 

Ideally, you want a nice organic motion during the recording so final tweaks are kept to a minimum. It's not really designed for a massive amount of manipulation after recording. 

:)

 

PS Your fighter jet demo is still one of my all time favorites. Great stuff.

  • Like 1
Link to comment
Share on other sites

Hi Blake,

 

I could imagine something e.g. for a skill test.

 

Kids have to drag an object (a little boy) through a small city scene.

In the review then small hints (popups): to fast, not stopped before

crossing the street or don`t walk on the street ...

 

Mikel

 

Link to comment
Share on other sites

On 7/28/2017 at 2:43 AM, mikel said:

Kids have to drag an object (a little boy) through a small city scene.

In the review then small hints (popups): to fast, not stopped before

crossing the street or don`t walk on the street ...

 

Yep. I was thinking about stuff like that. So it would be a Motion + Speed + Event path.

 

And that reminds me of this post about race cars.

 

Are you trying to do a hitTest on the very last position?

 

22 hours ago, mikel said:

I am not able to integrate a .hitTest() after the for Each (= the last position) in the pen above.

 

Link to comment
Share on other sites

Hi Blake,

 

Yes, i tried it:  

 

See the Pen vJKzVV by mikeK (@mikeK) on CodePen

 

 

But I can not find a solution. On the last position, I would like to include tweens.

And if the hitTest combined with the last position is positive (red circle, id="hit"), another animation should start .

 

Regarding the'kids' I need some time to draft a concept.

 

Kind regards

Mikel

Link to comment
Share on other sites

Hi Blake,

 

The fun is huge:

 

See the Pen vJXNzx by mikeK (@mikeK) on CodePen

 

But, sorry, the hit animation should start after EGON has finished his LiveRecord standing on the jumpboard again.

 

I have found this code snippet, but couldn´t integrate it and so I´m not sure if that is a solution.

 

/*var response = [];
points.forEach(function(data, index) {
    data.asyncFunction(function(result) {
         response.push(result);
         if(response.length  === points.length) {
                 //foreach work done
          TweenMax.to('#theGuy',0,{scale:1})
         }
    });
});  */

 

Ohh, I'm so sick ... to much JS.

 

Best regards

Mikel

 

P.S.:  How does the trick to mention a member highlighted in BLUE (?) ?

  • Like 1
Link to comment
Share on other sites

Not sure where you got that function from. It looks like something for AJAX.

 

To make the hit animation play first, you can add it to the timeline before looping through the points.

See the Pen jLVbaZ?editors=1010 by osublake (@osublake) on CodePen

 

There's a lot of stuff you could do with this. You can even record when a hit happens. Drag the box in and out of the circle to see.

See the Pen 8501e4e214581a39d2158f7731c47c21 by osublake (@osublake) on CodePen

 

 

  • Like 1
Link to comment
Share on other sites

Hi Blake,

 

Thanks for the hints what is feasible.

 

My goal is to use the last point of the recorded record (!?) as starting point for the animation.

 

In your Live record pen (couldn`t fork it) this code could be a solution:

 

function onDragEnd() {
      
  var wasHitting = false;
  var target = this.target;
  var tl = new TimelineMax();
    
  points.forEach(function(point) {
    
    
    tl.to(target, point.duration, {
      x: point.x,
      y: point.y
    });    
  });  
  
  var hit = points.pop();
  if  (!wasHitting && hit.hitting) {
      tl.add(playAnimation);
      wasHitting = true;
    }
}

 

later on I will test this code with EGON.

 

Thanks and best regards

Mikel

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...