Results 1 to 7 of 7

Thread: How to use Interpolators and Animations

  1. #1
    Join Date
    Feb 2011
    Posts
    3

    How to use Interpolators and Animations

    Let me tell you that I am posting my question on this forum for the first time, so if there are some mistakes, please ignore them. I have checked many threads over here which talks about the software and programming language that are useful for animations. So I thought to post my doubt here and I am expecting some detailed information from you members. I want to know about an interpolators and animations which I want to use with Sandy Flash 3D. I am sure that some members from your side must be knowing about it. Please provide some information sooner, so that I can complete my project. Any more notes would be grateful.

  2. #2
    Join Date
    Nov 2008
    Posts
    240

    Re: How to use Interpolators and Animations

    To create animations and automatic sliding, you can use one (or more) of interpolators available in the library of Sandy. The calculated interpolation points between initial and final values of displacement, rotation or scaling, for example, you can also move one or more object along a curved path. All animations can use the easing methods, which allow you to create linear or non-linear animation.

  3. #3
    Join Date
    May 2008
    Posts
    248

    Re: How to use Interpolators and Animations

    To achieve the desired result for graphic, you can use the event onRenderEvent World3D object, updating each time the position and rotation of the cube, using the function rot() Transform3D object that you pass the new values. As we have said the event onRenderEvent is invoked every time the scene is rendered. In addition, the code may be fine if we assume that the mass did not object to animate and move at the same rate for the entire duration of the animation, but this behavior is very limited. We can create very interesting effects by using the interpolation and the Ease class available in Sandy. The purpose of interpolation is to calculate intermediate values between two values (initial and final) on a number of frames. The interpolators are:
    • PositionInterpolator - used for travel
    • RotationInterpolator - Used for rotations
    • ScaleInterpolator - Used for downsizing
    The values to be passed to these interpolators are easing function (feature movement), the duration of the animation (in frames) and the initial and final values of the animation.

  4. #4
    Join Date
    Nov 2008
    Posts
    52

    Re: How to use Interpolators and Animations

    I would like to provide an example using an automatic motion interpolator, so that you can understand the concept clearly. The structure of the Actionscript file we are using is similar to that used in the examples seen so far. Inside the function init() to position the camera in order to have a better visual fit to make the animation.
    Code:
    // Position the camera 
    cam.setPosition (-100.100, -500); 
    // And point to the origin of the axes 
    cam.lookAt (0,0,0);
    Then associate a function to the button, so you can re-run the move when we want. The function doMove is very simple:
    Code:
    Domov function () { 
    translation.redo () 
    }
    Interpolation, when the animation ends, you can repeat it by simply using the function redo().

  5. #5
    Join Date
    Nov 2008
    Posts
    89

    Re: How to use Interpolators and Animations

    I am adding some more points in the function createScene() we have made a major change: instead of having a Transform3D object, we use a PositionInterpolator.
    Code:
    // Create a TransformGroup and easing 
    var tTrans: TransformGroup = new TransformGroup (); 
    var easing = new Ease (); 
    // Create the interpolator that will run the animation 
    translator = new PositionInterpolator (easing.create (), 100, new Vector (-150,0,0), new Vector (150,0,0)); 
    // The interpolator is inserted into the TransformGroup 
    tTrans.setTransform (translation); 
    // The pyramid is inserted into the translation 
    tTrans.addChild (pyramid); 
    // The TransformGroup is added to the main group 
    bg.addChild (tTrans);
    The interpolator uses the movement of the object created easing, has a duration of 100 frames and provides that the animation starts from the point -150,0,0 and end point 150,0,0. It will therefore be a move in a straight line on the X axis. Note how the interpolator is inserted in the TransformGroup tTrans, so each frame to calculate the new position of the group and its objects.

  6. #6
    Join Date
    Jan 2010
    Posts
    70

    Re: How to use Interpolators and Animations

    A question may arise (to you) which is naturally wonder why the code is not an object Transform3D, which is crucial for the transformation, the reason is very simple: you will automatically interpolating create and operate a Transform3D object. Generally we can translate the word "easing" with "acceleration", understood as a change of speed (and therefore can also be a slowdown, that is negative acceleration). Sandy also has functions that allow you to create the effects of acceleration (of course in 3D) interpolation using the class and Ease. Ease An object can be set to apply a certain effect of movement by the method we can select the type of function used to perform the calculation, while the type establish the type of movement.

  7. #7
    Join Date
    Apr 2009
    Posts
    107

    Re: How to use Interpolators and Animations

    The main types and methods provided by the Ease class are as follows:
    Methods
    • linear()
    • circular()
    • sin()
    • cubicBezier()
    • exponential()

    Types
    • easingIn(a) : Acceleration applied to start animation
    • easingOut(a) : acceleration applied at the end of animation
    • easingInToIn(a,c) : Two successive accelerations by Type
    • easingInToOut(a,c) : Two subsequent accelerations, a type of IN and OUT type
    • easingOutToIn(a,c) : The opposite of the previous
    • easingOutToOut(a,c) : Two successive accelerations of type OUT
    • bounce(b,r,e) : Effect rebound
    • elastic(b,r,e) : Effect of elastic
    The parameter indicates the strength of the acceleration, the default is 1. In the types that require two parameters, c denotes the fraction of the interval, ie when the acceleration changes from the first type to second. "Bounce" and "Elastic" have b as parameters, the number of bounces (the default is 1), r indicates that the reduction of power between a rebound and another, and it is an optional feature that can be used to replace the default.

Similar Threads

  1. XP Animations
    By Rohit Kasle (RK) in forum Customize Desktop
    Replies: 2
    Last Post: 20-06-2011, 11:13 AM
  2. Reloading Animations in Homefront
    By Zathara in forum Video Games
    Replies: 5
    Last Post: 25-03-2011, 10:56 PM
  3. C510 SMS Animations
    By Cordaro in forum Portable Devices
    Replies: 6
    Last Post: 08-05-2010, 10:38 PM
  4. IE8 slows animations
    By GodFather in forum Technology & Internet
    Replies: 6
    Last Post: 14-04-2009, 04:05 PM
  5. What software for animations ?
    By pointreyes in forum Windows Software
    Replies: 4
    Last Post: 09-08-2008, 06:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,895,034.95970 seconds with 17 queries