[Obsolete] BZ__Animation (divider for flight path)

[Obsolete] BZ__Animation (divider for flight path)

Postby fredo6 » Fri Jun 26, 2009 7:19 pm

This extension is now included in BezierSpline 1.4

On Pixero's request, in the context of his Animator.rb project, I have quickly developed BZ__Animation, an extension to BezierSpline to divide a Polyline with the following modes, based on a Min and a Max distance given as parameters:
  • Uniform Acceleration, from Min to Max
  • Uniform Deceleration, from Max to Min
  • Acceleration and then Deceleration, Min - Max, Min
  • Deceleration and then Acceleration, Max - Min, Max
There is also a mode for equal segments (either Min or Max).

BZ__Animation Fspline.jpg

In practice, the most common usage is to Convert an existing Polyline or Spline to this type of Animation curve, via the contextual menu.

BZ__Animation Dialog.jpg

Note that Min and Max values are preserved within a Sketchup session.

To install the extension, just do the following:
  • Drop the file BZ__Animation.rb into the BZ_Dir_12 folder
  • Drop the two icon files (PNG) into the BZ_Dir_12/IMAGES_Standard folder

Pixero will give more information on how to utilize the extensions in the context of animations following a flight path.

This extension is integrated in the main release of BezierSpline 1.4. See this this post for download


Fredo
0
Last edited by fredo6 on Fri Apr 22, 2011 8:12 pm, edited 4 times in total.
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby CadFather » Fri Jun 26, 2009 10:14 pm

Thank you Fredo, i remember asking for this last year - a must for animation.. :ecstatic:
0
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby Pixero » Fri Jun 26, 2009 10:27 pm

Here is my tutorial for better animation control in SketchUp.

Anyone who has tried knows how limited SketchUp's animation is.

I found a way of using Fredos Bezier curves with the polyline divider and Rick Wilsons Flightpath
and a couple of other scripts to "bake" animation and control speed.
So I asked Fredo to add some functionality to the divider script and BZ_Animation is the result.
Big thanks to Fredo! :thumb:

There will be some math in this tutorial but it's not as difficult as it might first seem.
For the example I will use a framerate of 25 frames per second (PAL).
(NTSC uses 30 frames per second, movie 24 fps and web animation typically use 15 frames per second. So if using any of those the other values of the example will need recalculation but I think you'll get the point.)
I'm also using metric values since I don't know anything about imperial units. Thats for you to figure out if you have to use them.

SketchUp uses scenes for camera positions in time during a animation and makes a linear (even/constant speed) interpolation between scenes.
That makes it very difficult to create smooth animations with accelerating or decelerating camera motion.
Not anymore with BZ_animator and some tricks of mine.

What you will need:

Fredos Bezier splines scripts with BZ_Animator.
A Flightpath script. Preferable the pay-for version by Rick Wilson (http://www.smustard.com) but there is also a more basic free version.
There is also a basic script called flightpathtool by Matt Gorbet.
The weld script also by Rick Wilson.
My little scrip "ChangeTransitionTimes" and finally a scrip Thomthom kindly helped me with which I called "reverseCurve".

Here is the workflow I developed.
It's far from perfect but at least miles ahead of what was possible in SketchUp until today.

First go to Window->Model Info-> Animation and set Scene Transition to 0.04 (PAL 25 fps -> 1/25=0.04).
Make sure Scene Delay is set to 0.

Now make some geometry you want to animate the camera through.

Use any of the Beziercurves to create the animation path and move it to the height you wish the camera to have.
Make sure you use high enough precision to get a nice very smooth curve.
You can draw a three dimentional curve like coming in from above and ending in eye level.
You can even build the path from different curves, straight lines and arcs and weld them together. Doesnt matter.

Now deside how fast you want the camera to move through the animation.

Lets say you want the first part to accellerate from 0 to 5 meters per second and then from 5m/s down to 2m/s and back to 5m/s then go at a steady speed of 5 m/second for the next part
and then decelerate from 5m/s to 0 at the end.

Now use the line tool to cut the curve at these points.

Now is also a good time to use the reverseCurve script (appears under Plugins as Change curve direction) to first "Show curve start" to place a construction point where the curve starts
and if neccesary use "Reverse curve" to change its direction. (SketchUp can sometime mess up the direction when welding together different curves.)

More advanced animation might use a second curve for the focus point but I wont go into that here.

Select the first part of the now divided curve and right click and select: Convert to -> Polyline divider for animation.
You will get a pop up window with Min length, Max length and a choice of interpolation. (See Fredos post above.)

Choose Acceleration min to max and set min to 0mm and max to 200mm. Why?
Well a zero speed obviously give a 0 and a speed of 5m/second will give a speed of 5000mm/25=200mm per frame.
Your curve will be divided with short to longer segments of 200mm at the end.

Now select next section of the curve and rightclick->convert to-> Polyline divider for animation.
Set min length to 80mm. (2000mm/25=80mm)
Max is still 200mm.
Interpolation: Accelerate-Decelerate-Accelerate. (Smoothstep)

For next curve section use settings Use equal step Max.

Finally use Decelerate for the last curve part.
Max 200mm and Min 0mm.


Now use Flightpath script to convert the curves to scenes.
(One scene for every frame of the animation is neccesary to overcome SketchUp's linear interpolation.)
Flightpath sets the translation time between scenes to different values based on the length of each section of the curve to get a constant speed.

That is something we do not want in this case so I wrote a little script called "changeTransitionTimes" that appears under the Camera menu.
What it does is that it sets all scenes transition times based on the framerate we set.
(Once again, in this example for PAL which has 25 frames per second the transition time will be 1/25=0.04 seconds for each frame/scene to be displayed.)

Done. Now you can watch your (hopefully) silky smooth animation or render away with an external renderer.


I hope you understood the process and feel free to ask if anything is still unclear.

Happy animating!

Jan


EDIT: I just realised you cant use a lenght of 0 so use something like 1mm instead.
0
Last edited by Pixero on Sat Jun 27, 2009 7:09 am, edited 2 times in total.
User avatar
Pixero 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby CadFather » Fri Jun 26, 2009 10:35 pm

another awesome Jan, and clearly written.. Cheers! :thumb:
0
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby JClements » Sat Jun 27, 2009 12:58 am

Jan, can you post a couple examples comparing two animations, one using new script v.s. another using a method such flightpath "basic"?
0
John
Illustrator
Beaverton, Oregon
User avatar
JClements 
Premium Member
Premium Member
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby pilou » Sat Jun 27, 2009 2:29 am

Fredo the Leonardo da Sketchup :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby kwistenbiebel » Sat Jun 27, 2009 3:06 am

One could also use SU-animate as a replacement for the FlightPath script.

I used a similar workflow as Pixero mentions above for previous animations I did (without the new Fredo Bezier though), however found it too tedious and time consuming to continue using.
The major culprit is that there is no flexibility to test your animation and to change the course of the bezier curves interactively accordingly. But it still is better than the clunky standard SU animation.

The acceleration Bezier plugin is a nice addition to this workflow though.
Thanks Fredo!
0

kwistenbiebel 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby Pixero » Sat Jun 27, 2009 5:55 am

kwistenbiebel wrote:The major culprit is that there is no flexibility to test your animation and to change the course of the bezier curves interactively accordingly. But it still is better than the clunky standard SU animation.


Thats what I was hoping Animator.rb would be able to solve someday.
See topic: viewtopic.php?f=180&t=19772
0
User avatar
Pixero 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby rspierenburg » Fri Jul 03, 2009 2:35 pm

I used this workflow a couple of days ago and it worked well. But I tried to re-create it today and I cant seem to get the "Polyline divider for animation" choice, just the Polyline choice after I weld it all together. If I go into the Draw - Bezier menu and select the Polyline Divider for Animation is just allows me to create a new path which I dont want. Any ideas?

EDIT:
I found the problem. It was with one of the corners I had filleted. Works fine now thanks.
0

rspierenburg 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby fredo6 » Sun Jul 05, 2009 6:22 pm

Updated version, managing more accurately the rounding of segment length, avoiding the last segment to be too short in some cases. Also, the first segment will respect the given length (but the last one may not).

see http://forums.sketchucation.com/viewtopic.php?f=180&t=20173&p=167919#p167919
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby simon le bon » Sun Jan 10, 2010 3:57 pm

Bonjour Fredo, Hi everybody,

First I have a (probably silly) question.

How can I make that rounded BZ_Animation curve you are showing into the first post??
So far, I'm only able to produce angled polyline..
>>


Secondly, it is for a request. ;)

I have found of a great interest to use this BZ_Animation in conjunction with Chris Fullmer's Component Stringer (and ChrisFullmer's ShapeBender actually to curve the "animation line".

-)But for me It is lacking various possibilities for "acceleration" (from various parabolic curves ... heyhey, my school knowledge is so far now)
------

More often this unique acceleration is too "strong" for my purpose..
> a little study




>> dreaming HelixStairs using in conjunction: Bz_Animation + ComponentStringer + FredoScale =


Sorry dear Fredo to ask you anything: You are already giving so much...

:) simon
0
User avatar
simon le bon 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby massimo » Sun Jan 10, 2010 4:33 pm

Hi Simon, about your question... From Fredo's first post:
In practice, the most common usage is to Convert an existing Polyline or Spline to this type of Animation curve, via the contextual menu.

Draw a polyline-->select it-->right click and choose "convert to"-->"polyline divider for animation". :)
0
User avatar
massimo 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby simon le bon » Sun Jan 10, 2010 6:05 pm

massimo wrote:Hi Simon, about your question...
Draw a polyline-->select it-->right click and choose "convert to"-->"polyline divider for animation". :)


Hi Massimo :) ,
so simple (and it was written black on white :oops: ), thank you. This is a very good first point. Because I was using a complete Shape Bender process to achieve this until now..

(another picture of my "dreaming stairs" on which you need to start with very small legs and growing up, you get to finish with very tall ones :lol: . Maybe the stairs of life: we always do the same, just incrementing by steps.... OK it's enough. :puke:



;) S.
0
User avatar
simon le bon 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby fredo6 » Sun Jan 10, 2010 9:41 pm

simon le bon wrote:-)But for me It is lacking various possibilities for "acceleration" (from various parabolic curves ... heyhey, my school knowledge is so far now)

You are right, it should be possible to actually to map the variations on other mathematical curve. This would of course require more parameters. The one that springs to mind is the S-curve (also called Logistic curve) which provide slow then growing then slowing down acceleration.

Let me check if I can isolate the formula so that it is easier to try various models of formula without multiplying the number of plugins.

Fred
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby pilou » Mon Jan 11, 2010 12:48 am

Remember my rustic plug where you can cook any formula :mrgreen:

0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby simon le bon » Mon Jan 11, 2010 1:24 am

Fredo6 wrote:Let me check if I can isolate the formula so that it is easier to try various models of formula without multiplying the number of plugins.
Fred

Pilou wrote:Remember my rustic plug where you can cook any formula :mrgreen:


:thumb: ;) Thank you Fredo to listen and to agree ; thank you Pilou to bring your quote..

I feel right in such a good place...
:enlight: simon.
0
User avatar
simon le bon 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby simon le bon » Mon Mar 15, 2010 9:07 pm

0
User avatar
simon le bon 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby simon le bon » Sat Apr 03, 2010 10:50 pm

Hi Sketchy laborers ;)

I want to use again BZ__Animation in conjunction with Component Stringer.

My purpose was to draw an animated straight edges with an exact length. It is silly but I hadn't found how to reach this precise length via the VCB!!

After some tries,I had used two perpendicular guide lines spaced from my length and inferences to draw my animated edge!

Do I have missed something?
*simon
0
User avatar
simon le bon 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby fellanamedlime » Mon Oct 18, 2010 1:02 pm

Pixero wrote:Here is my reverse curve script.


Hi Pixero,

Just to say, your reversecurve.rb script didn't work properly for me (it didn't appear in Sketchup 7). So, with your permission, I dug around in the script and fixed it so it should work for Sketchup 7 users. I've posted it here. Enjoy, and thanks for this script - it's a life saver! (and the only one on the web..)
0

fellanamedlime 
 

Re: [Plugin] BZ__Animation (divider for flight path)

Postby Pixero » Mon Oct 18, 2010 2:34 pm

Hmm...it worked fine for me with SU 7.1.
Are you on a Mac?
0
User avatar
Pixero 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Plugins

Who is online

Users browsing this forum: prasetyajeva and 10 guests

Visit our sponsors: