[Plugin] SketchUp Animation using mover.rb

[Plugin] SketchUp Animation using mover.rb

Postby cmd » Thu Mar 12, 2009 5:49 pm

I was digging through some old files and I came across an old ruby that some of you might find useful.
The UI could be improved but it is pretty simple to use.
I did not write the mover.rb ruby but I am sure some of the ruby masters here in this forum can help with the code.

FEEL FREE TO HACK AWAY!!

For examples of the mover.rb in action, take a look at this video - http://www.youtube.com/watch?v=05tvPV4ePHY

How To Use:
- Place the mover.rb and the mover_extensions folder into the Plugins directory
- The position of the components (position and orientation of the component axis) are tied to the scene.

1) Create your scenes
2) Engage the 1st SketchUp Scene where you want the animation to start
3) Select your component/s you want to animate and place them in the needed position and orientation. While they are selected go to Plugins > "Remember Position of Selection"
The position of the selected components will now be tied to that specific scene.
4) Repeat Step 2 for the following scene.

When you are finished, when you click on each scene, the models will automatically transition.

Note:
* If you scale the component, you may see some strange animation transitions. Be sure to "scale definition" to correct the problem.
* You will not be able to export this animation through SketchUp. If you try, the components will remain stationary.

I hope some of you find this script useful. Again, modify it as you wish.

Cheers,
CMD
5
Last edited by thomthom on Tue Dec 08, 2009 9:48 pm, edited 1 time in total.
Reason: Just cleaning up and organizing the Plugin forum. Correcting [Plugin] tag
- CMD
User avatar
cmd 
SketchUp Team
SketchUp Team
 

Re: SketchUp Animation using mover.rb

Postby Ecuadorian » Thu Mar 12, 2009 6:01 pm

Cool! Time to create some animated sketchy LOLcats...
0

Ecuadorian 
 

Re: SketchUp Animation using mover.rb

Postby alexschreyer » Thu Mar 12, 2009 6:29 pm

Thanks for finding this one. Works perfectly and is immensely intuitive!
1
Author of "Architectural Design with SketchUp":
http://sketchupfordesign.com/
User avatar
alexschreyer 
PluginStore Author
PluginStore Author
 

Re: SketchUp Animation using mover.rb

Postby pilou » Thu Mar 12, 2009 7:36 pm

Seems like Proper animation by Morisdov ;)

Seems a little more easy for select a position but you must go to the scene itself ! :enlight:

Else you can use the Set Transition Times by Morisdov with mover.rv ;)
0
Last edited by pilou on Sat Feb 12, 2011 4:46 pm, edited 1 time in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchUp Animation using mover.rb

Postby xrok1 » Fri Mar 13, 2009 2:56 am

very nice, thankyou.
0
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: SketchUp Animation using mover.rb

Postby •BTM » Fri Mar 13, 2009 3:12 am

Doesn't work right with components for some reason. During the animation, the components in my animation would all switch to have the axis in the original positions between scenes, so all my components would move around to different positions.
0

•BTM 
PluginStore Author
PluginStore Author
 

Re: SketchUp Animation using mover.rb

Postby Chris Fullmer » Fri Mar 13, 2009 3:51 am

This is a complete stab in the dark, as I have not played with the plugin yet. But is it possible the components you're using have been scaled? He mentioned that you will need to right click on components and click on "Scale Definition" if you have scaled them. Another option would be to "Make Unique" I think would also suffice, and that way it would not alter the component definition. Perhaps try that, it might not help at all. Its just a guess,

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: SketchUp Animation using mover.rb

Postby cmd » Fri Mar 13, 2009 3:28 pm

•BTM wrote:Doesn't work right with components for some reason. During the animation, the components in my animation would all switch to have the axis in the original positions between scenes, so all my components would move around to different positions.



When I had my components "scaled", I saw this strange behavior as well. Applying "Scale Definition" to the scaled components corrects the problem.

CMD
0
- CMD
User avatar
cmd 
SketchUp Team
SketchUp Team
 

Re: SketchUp Animation using mover.rb

Postby kwistenbiebel » Fri Mar 13, 2009 3:32 pm

Thanks for the upload of both the ruby as the youtube clip.
Looks like a good solution to get cars running in your scenes.
Too bad there is still no solution to get smoother scene transitions..
0

kwistenbiebel 
 

Re: SketchUp Animation using mover.rb

Postby remus » Fri Mar 13, 2009 3:46 pm

I dont know if it would work, but perhaps you could mash whaats smoothstep animation and mover together to get smoother scene transitions (it sounds so easy...)
0

remus 
 

Re: SketchUp Animation using mover.rb

Postby kwistenbiebel » Fri Mar 13, 2009 3:47 pm

That would indeed be nice.
(Not for the people using render software though)
0

kwistenbiebel 
 

Re: SketchUp Animation using mover.rb

Postby pilou » Fri Mar 13, 2009 7:29 pm

Too bad there is still no solution to get smoother scene transitions..

Set_transition_times.rb by Morisdov don't make the trick?
(I believe that scene must be writed "scene1, scene 2etc
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchUp Animation using mover.rb

Postby leixing » Sat Mar 14, 2009 5:03 am

It is a good work,but we had another plugin called "mover"already.
so....we can not copy it to the plugins floder.
please solve ..
0

leixing 
 

Re: SketchUp Animation using mover.rb

Postby xrok1 » Sat Mar 14, 2009 5:58 am

leixing, i imagine you could rename it but don't rename the folder that it comes with.
0
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: SketchUp Animation using mover.rb

Postby Chris Fullmer » Sat Mar 14, 2009 7:01 am

I haven't tested this, and I'm not sure its right, but here is a possible fix.

Sketchup keeps a running list of all files loaded. Some rubies pass their name dynamically to Sketchup. So if you rename it, it tells Sketchup whatever it is named. This ruby is not setup like that. It is sending the phrase "mover.rb" no matter what you name the file. I imagine there will conflicts with just changing the file name because of that. Its easy enough to change though.

Change two lines at the bottom from:

FROM: if( not file_loaded?("mover.rb") )
TO: if( not file_loaded?("__FILE__") )

and

FROM: file_loaded("mover.rb")
TO: file_loaded("__FILE__")

After those 2 change, it will be passing the filename to sketchup, whatever it is. So then change the name of the file. It can be anything.

See if that helps. If no one tests it, I'll try it in a bit.

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Fletch » Sun Oct 04, 2009 8:40 pm

I see it's on the rt-click context menu, but what exactly does this "Be sure to "scale definition" to correct the problem." mean? what is it SketchUp is doing when you apply that?
0

Fletch 
Twilight Render
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Ecuadorian » Sun Oct 04, 2009 10:09 pm

If you make a 1m*1m*1m cube, make it a component, and then scale the component so it becomes 2m*2m*2m, the component is still internally defined as being one meter in size, and this particular instance as being scaled by 200% in all three axes. This is easily proven by dragging new instances from the Components window: they all will be 1m*1m*1m.

If you right click on the instance that was scaled to 2m*2m*2m and right click > Scale definition, now the component is internally defined as being 2m*2m*2m, and this instance as being 100% in size. Again you can test the change by dragging new instances from the Components window: They will be 2m*2m*2m. Any 1m*1m*1m instances you placed before will appear to remain unchanged, but they're now actually stored by SketchUp as 50% size (in all three directions) instances of the 2m*2m*2m component. (0.5*2m = 1m)

Now this is just my guess; hopefully someone who knows the internal workings will chime in with a better and more accurate explanation.
0

Ecuadorian 
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Gaieus » Sun Oct 04, 2009 11:11 pm

This is extremely important issue with especially texturing. If you scale a component instance (like Miguel described above), the materials applied to the geometry will also scale proportionally (ultimately distorting the whole thing). Now if you scale the definition, the material will "jump back" to its original size. See attached below (I had to make the third component unique first so that the second example remains scaled up with the texture)
1
User avatar
Gaieus 
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Fletch » Mon Oct 05, 2009 10:27 am

Fascinating... thanks for the replies, I 'get' it now.
0

Fletch 
Twilight Render
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Fletch » Mon Oct 05, 2009 7:47 pm

PS - the animation by Mover.rb renders great with Twilight Render. I've rendered an animation of a door opening and some sunshade (brise soleil) louvers closing. Great plugin!

What is missing from the plugin:
1)
Pick a "base point" for a group or component about which the animation should happen (a door swinging on a hinge, etc.) It does a pretty good job, so far but it's a little quirky... the door sort of slides a bit into the wall, just like the prob. with Proper_Animation.rb ... but this one doesn't seem to do as bad a job with rotating door-type swings.

2)
If you animate a door component rotating open.
Scene1-closed
Scene2-open

Then you hit the Scene2 button, then the door is open, then you open the component to edit the door, as you work, you think, hmm... I want that camera angle from Scene1, and hit that scene tab, now the door's parts will do some unpredictable movements, and may disappear completely from your scene... so sure, you can avoid touching scene tabs when editing animated components... but ...

3)
It would be great if it would read the animation of nested components. I had to cut the door panel component away from the frame inside of the "door+frame" door component, and paste that into the base model in order to animate it. This would also avoid having to animate by hand 40 louver blades 1by1... you could animate the object inside the louver component, and copy the component around to still get the same animation results. ... or is there something I'm not doing right here? Is there a trick I'm missing here? What if you animate the door panel, then put it back inside the component, will it keep it's animation after pasting it back into the "door+frame" component?

4)
How can you reset an object's animation to "null" without losing your scene? You have to copy the scene tab, delete the scene and rename it to the correct name, as near as I can tell... and that's very tedious in larger projects like the airport scene shown in the demo vid. But even then, the other scenes are still remembering that object's movement. There needs to be a "reset animation for selected object".

5)
If you animate the object with the model's scene animation settings at 2 second transition and then change that to be 4 seconds it seems that the animation still happens in 2 seconds of the 4 second transition. In my case, when I did this, it sort of "flung" the door open quickly instead of gently swinging it open.
0

Fletch 
Twilight Render
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Jim » Wed Oct 07, 2009 4:06 pm

Fletch wrote:ck a "base point" for a group or component about which the animation should happen (a door swinging on a hinge, etc.) It does a pretty good job, so far but it's a little quirky... the door sort of slides a bit into the wall, just like the prob. with Proper_Animation.rb ... but this one doesn't seem to do as bad a job with rotating door-type swings.


I noticed if the base point is the Origin of the Group/Component the rotation is good. It's when you rotate around another corner that the object moves off the axis of rotation.
0
Hi

Jim 
Global Moderator
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Fletch » Sun Oct 11, 2009 8:15 pm

Thanks Jim,
That's a good place to start ;) (either animating something, or trying to code a fix for it.)
0

Fletch 
Twilight Render
 

Re: [plugin] SketchUp Animation using mover.rb

Postby pilou » Wed Oct 21, 2009 5:05 pm

Have you made an exportation animation "Avi" with Mover?
Not by the Twilight Render (this is working fine) ;), but from directly Sketchup Export ? (with no render)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [plugin] SketchUp Animation using mover.rb

Postby pirun14 » Sat Oct 24, 2009 3:05 am

0

pirun14 
 

Re: [plugin] SketchUp Animation using mover.rb

Postby pilou » Mon Oct 26, 2009 12:58 am

Cool tutorial :enlight:
Seems you have not use scene 3 and don't make Update Scene :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: [plugin] SketchUp Animation using mover.rb

Postby pirun14 » Mon Oct 26, 2009 1:22 am

Pilou wrote:Cool tutorial :enlight:
Seems you have not use scene 3 and don't make Update Scene :enlight:

Thanks.sorry,i have over scene ;)
0

pirun14 
 

Re: [plugin] SketchUp Animation using mover.rb

Postby skkor9y » Wed Nov 04, 2009 10:36 pm

year b4 i used this plugin, but it had a different name TRANSFORM.rb
0

skkor9y 
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Jim » Thu Nov 05, 2009 12:00 am

skkor9y wrote:year b4 i used this plugin, but it had a different name TRANSFORM.rb


Didier Bur wrote one in 2005 - mover and proper animation use the same technique as Didier.

http://www.crai.archi.fr/RubyLibraryDep ... er_beta.rb
0
Hi

Jim 
Global Moderator
 

Re: [plugin] SketchUp Animation using mover.rb

Postby Speaker » Fri Nov 06, 2009 1:15 am

great plugin :thumb: . It's a pity it doesn't work with v-ray :(
0

Speaker 
 

Re: [Plugin] SketchUp Animation using mover.rb

Postby wyatt » Thu Feb 18, 2010 10:25 pm

Has anyone played with this plug-in more? I can set the scenes so that elements move properly between scenes, but when I export as avi nothing moves. Does the plug-in not support exporting, or is there something else I should be doing? Would a different animation plug-in work better?
0

wyatt 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: No registered users and 23 guests

Visit our sponsors: