Animator.rb - Call for participation
-
One of the worst things with SketchUp is the lack of working animation control and of all great scripts there are only a handfull that even touches this area.
So I've started working on a script called "Animator.rb" for better animation control and have given quite a lot of thought about workflow and what functionality it should have. It would also "bake" every frame of the animation so it would work with renderers like Vray.
With so many currently involved in the City generator script maybe now is the wrong time to ask but are any of you scripters interested in joining forces to realise it?
Heres what I thought:
(In the text below keyframes and inbetweens are scenes/pages with a attribute tag so they can be identified.)First part deals with controling animation speed.
The script should be able to set "keyframes" (add scene) and tag them as "is_keyframe".
(By using a special "Add scene", different tags could be attributed at the same time.)
The script should be able to create inbetween pages/scenes for every frame of a given framerate to "bake" the animation so it can be rendered with external renderers.
This should be done between each "keyframe" (page/scene) for best control.
(Ex. using smoothstep for the whole animation will cause speed-ups and slow-downs at every keyframe which in most cases isn't desirable.)
There should be different interpolations like linear, ease in, ease out, smoothstep, to control animation speed.
The script should change all pages transition times to match the framerate. (Ex. 0.04 for 25 frames per second (PAL).)
Also the possibility to play at half speed for checking the animation.
When creating inbetweens they should be "tagged" with the attribute "is_tween" so that they can be recognised.
The user should be able to delete all inbetweens for further editing of the animation.
Maybe add an attribute for reverting to the original transition time when deleting inbetweens.
It should be possible to change an inbetween to a keyframe. (With attributes) Maybe also keyframe to inbetween.
The script should also have some kind of speed setting.
It should have the possibility to go to a certain frame. (See my Framechange script.)
Maybe jump 1 or 10 or 100 frames forward or back? (Possible with alt/shift buttons.) Arrowkeys and modifiers.
The speed controls should work together with the path section below.Second part deals with smoothing the animation path. (Now the fun begins)
The script should have a tool to easily manipulate the camera position and rotation to modify the keyframes camera position. Update Keyframe needed.
The placement tool should work by dragging the view in the xy plane and when pressing the alt key it would change z height.
(A bit like the walk around tool but dragging the view instead for better and more precise control.)
Rotation should be like the look around tool but be accessible while using the movecam tool by for example pressing the shift key. Horisontal pan and tilt and roll with modifier keys.
When adding a keyframe the script should create a point at the cameras (eye) position.
It should then create a spline path between these points for a smooth camera path.
There are many different splines that could be used but one that goes through the construction points is desireable.
The best solution for control would be if the user could choose between straight line or spline on different parts of the animation. (Tangents at shifts for smooth animation)
It should also be possible to edit the spline like the bezier tools.
Changes to camera target should be interpolated as a rotation of the camera (One node camera versus two node camera).Workflow:
Position camera. Add keyframe. New position, new keyframe...
Create spline from keyframes for camera path.
Edit the spline or use a camera position tool and update keyframes.
Set speed and interpolations between keyframes and create inbetweens.
Check animation (at full or half speed).
Remove inbetweens for further editing of animation.
Recreate inbetweens.
Save, and render animation.I know there are script that uses paths for camera movement but IMHO the workflow isn't so good and its hard to edit the animation.
I believe my idea for a script would make a easy to use workflow and give the user much better control of animation in SketchUp than currently possible.Anyone interested?
-
I think its a great idea. But I'd guess you would be hard pushed to find people who thought it was a Bad idea!
I've actually kept the bitmap of the control panel you posted some time ago as an aide memoire should I get around to adding stuff like that to LU.
But its a none trivial amount of work.. So don't hold your breath!
Adam
-
My current idea is a panel less implementation since that would make it easier to script.
The keyframe edit panel could always be added later.The important thing is that with attributes added to pages one could differentiate between key-pages and inbetween-pages and be able to delete the inbetweens that are there for "baking" each frame so it will work with different interpolations for easing in or out and with face me components and for renderers like Vray. With attributes it would be possible to keep info for going back to a previous transition time and more.
I believe most of what I wrote in the post above could be done without to much headache. At least if we were a few scripters collaborating.There are so many great modeling additions and I just wish there were more people developing the weakest parts of SU that we actually can do something about.
(High poly support not beeing one of them.)Come on...lets do it!
-
Its not too late to learn Ruby Bruce
I also think its a great effort Jan. I hope it gets support. Probably not from me unfortunately, unless I find myself getting into animation. At this point, animation something I have little skill with, need of, or understanding of. But good luck!
-
I know you are looking for response of people that can help, and I am certainly not capable of scripting, but I just wanted to say that this would be ground breaking for the SU community if you were able to implement controls like you are talking about. I have been one of the many trying to push animation in SU to its fullest and I have had some success with my nightclub animation, but I still felt so limited and had to really on post processing for a lot of tweaking. It would be great to have the things you are talking about. Are you considering any controls for animating objects and such or just to improve the camera? Best of luck and I will be following this one for sure.
-
Very good idea Pixero and definitely something SU needs.
Unfortunately, I haven't got coding skills... -
Jan, I am interested from the selfish perspective of learning as much as possible.
What is the purpose of creating in-between pages just so you can delete them when editing the animation? I can see where scenes at the keyframes are needed to create and edit the animation, but with a simple dialog you could still step through the frames without creating scenes for each in-between.
-
@jim said:
Jan, I am interested from the selfish perspective of learning as much as possible.
What is the purpose of creating in-between pages just so you can delete them when editing the animation? I can see where scenes at the keyframes are needed to create and edit the animation, but with a simple dialog you could still step through the frames without creating scenes for each in-between.
So you can render the animation.
-
SketchUp can only do linear interpolations between scenes. That means no speed changes like slowing in or speeding up.
With every frame "baked" as a scene you can have speed changes and more control.
(Since you/the script will create scenes based on your input. Like smoothstep or ease in/out.)
This is also good when rendering animations with an external renderer like Vray. -
@pixero said:
SketchUp can only do linear interpolations between scenes. That means no speed changes like slowing in or speeding up.
It's OK, but I don't think I get it yet.
You said you would be using your own easing functions between scenes. Scenes are not required to move the camera or change rendering options.
I guess it is the exporter for the renderer that requires the scenes?
-
-
I was looking into this stuff today. It started with making a Group.move_to method, then got factored out into a Group.animate_to method, which again got factored out into an MovableObject.animate(properties, duration, ease_method); which fits right in with this topic.
I don't mean I wrote this today, but was only thinking about a programmer's interface for animations.
SketchUp's Animation appears to support a single animation at a time, so I also was thinking an AnimationManager might be needed if there (and there certainly would be) more than one object being animated concurrently. And also only if SU's animation class was used.
-
@jim said:
I was looking into this stuff today. It started with making a Group.move_to method
Different from the existing Group.move! method? http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/group.html#move!
I see that .move! method for Groups and ComponentInstances create an undoable event. But there's nothing for scale and rotate...
-
Thats interesting. It says it accepts a transformation object, so perhaps any transformation - rotation, scaling, transform(move) will work.
-
Ah! Didn't notice that it took a Transformation object. Didn't read that. Just assumed x,y,z from the name. I can see use for more than animation for this.
What would be interesting with an Animation toolkit was if render software developers had some feedback to what would make things easier for them to make animating objects work. Since I use VfSU I'd like to talk with ASGVis and see if maybe something can be provided that would allow them to implement object animation to a future VfSU version.
-
A free ruby from morisdov.googlepages.com can control each scenes(pages) transition time for animations . and also consider about target point movement.
Thanks for your good idea.
-
Jan,
Have you looked at thefilm and stage plugin? It has some of the features you want, and so may be a good place to look for ideas.
-
Yes I have used it for a long time but it doesnt really help with animation. Very good though.
Also, see the BZ_Animator thread for my tutorial on how to use it with some other scripts for better animation control.
I'll try to write it tonight. Tomorrow at the latest. -
And Jim has made some crazzy animationstests
Advertisement