# Precise movement between scenes in animation

**URL:** <https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534>\
**Category:** SketchUp\
**Created:** [August 7, 2019, 11:58pm UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534 "2019-08-07T23:58:32Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbantjes](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rbantjes](https://forums.sketchup.com/u/rbantjes)\
**Post date:** [August 7, 2019, 11:58pm UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/1 "2019-08-07T23:58:32Z")

</div>

I am trying to create two precise animations of a geometric solid. I want a 360 degree rotation on a nearly-vertical plane angled into the view (call this the rotation plane). Then I want to rotate the view 18 degrees on the horizontal plane and repeat the rotation on the rotation plane. The only way I can figure out how to do that precisely is to use the rotate tool, and while I get what looks to me like different scenes, SU seem to interpret these as different orientations of the model not of the view, so it doesn’t animate between the scenes. How do I generate precise, repeatable rotations of the view?

Thanks!

---

<div class="post-metadata">

**Author:** ![DaveR](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/daver/32/7601_2.png) [@DaveR](https://forums.sketchup.com/u/DaveR)\
**Post date:** [August 8, 2019, 12:57am UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/2 "2019-08-08T00:57:04Z")

</div>

It sounds to me as if you have a single object (the “geometry solid” and you are moving/rotating it. You need to consider that each scene in this case is effectively just a camera position but since you only have one object, if you rotate it in space, all the cameras see the same rotation. The way to handle this with the native tools is to make multiple copies of the object (component), assign a different layer to each one and set only one to be visible for each scene. This will give the appearance of the animation you are after.

Here are a couple of examples.

[![](https://global.discourse-cdn.com/sketchup/original/3X/7/1/715a7043ffa92353e2960cf2b2e5eaaab658a9b7.jpeg "Bouncing Balls") ](https://www.youtube.com/watch?v=p1tqd4RXA5U)

Here there are copies of the ball component distributed along a path and each ball as a different layer associated with it.

And here there are multiple copies of each part with different layers and different scenes to make the appearance of the movement.

[![](https://global.discourse-cdn.com/sketchup/original/3X/2/0/20e64907be9e79bdba729152f305db54d981c9ca.jpeg "Lock") ](https://www.youtube.com/watch?v=Ri2SYzqa-RM)

There are some extensions out there such as Fredo6’s Animator which you might be able to use although your profile indicates you are using SU2016 Make and it might not run on that old version.

---

<div class="post-metadata">

**Author:** ![rbantjes](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rbantjes](https://forums.sketchup.com/u/rbantjes)\
**Post date:** [August 8, 2019, 1:50am UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/3 "2019-08-08T01:50:39Z")

</div>

Thanks for your help, Dave. I now have two states of the object’s motion, one on each of two new layers. When I create a scene for each state and animate them, SU doesn’t interpolate between them but just jumps from one to the next. I was hoping to make four states of the 360 rotation and get SU to fill in the rest for smooth animation (I need about 30 states in the rotation).

---

<div class="post-metadata">

**Author:** ![DaveR](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/daver/32/7601_2.png) [@DaveR](https://forums.sketchup.com/u/DaveR)\
**Post date:** [August 8, 2019, 1:54am UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/4 "2019-08-08T01:54:44Z")

</div>

You’re hoping for something SketchUp doesn’t do. You will need to create the intermediate steps, too.

---

<div class="post-metadata">

**Author:** ![monospaced](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/monospaced/32/53363_2.png) [@monospaced](https://forums.sketchup.com/u/monospaced)\
**Post date:** [August 8, 2019, 2:13am UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/5 "2019-08-08T02:13:53Z")

</div>

Can it perhaps be done with moving the camera position itself?

---

<div class="post-metadata">

**Author:** ![monospaced](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/monospaced/32/53363_2.png) [@monospaced](https://forums.sketchup.com/u/monospaced)\
**Post date:** [August 8, 2019, 2:19am UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/6 "2019-08-08T02:19:34Z")

</div>

I’ve had decent results using camera positions at the standard views. I placed my object at so it’s centered over the axis and set my view where I wanted it, straight on, and noted the eye height. Then I switched to left and right views and made scenes. The result is a rotating object. Adjust each scene to refine from there.

But that isn’t nearly as precise as you’re describing. That kind of precision isn’t available in sketchup.

I do imagine that if the camera itself were an object it would in fact be incredibly simple to orient it anywhere with extreme precision. Something tells me this is possible and that the camera consists of three coordinates and a vector. Just sayin.

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [August 8, 2019, 2:29am UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/7 "2019-08-08T02:29:05Z")

</div>

It can be done with a plugin or write your own animation code …

- [Class: Sketchup::Animation — SketchUp Ruby API Documentation](http://ruby.sketchup.com/Sketchup/Animation.html)

The Ruby Script Examples (in the Extension Warehouse) by the SketchUp team has an example spinner animation script.

This discussion also has simple sample code … [Recommendations for animation code?](https://forums.sketchup.com/t/recommendations-for-animation-code/31622/)  
… as well as this … [Rotation in a view plane](https://forums.sketchup.com/t/rotation-in-a-view-plane/59844)

---

<div class="post-metadata">

**Author:** ![rbantjes](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rbantjes](https://forums.sketchup.com/u/rbantjes)\
**Post date:** [August 8, 2019, 1:18pm UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/8 "2019-08-08T13:18:06Z")

</div>

I tried the following, but nothing happens. Does anyone know whether Frido6’s Animator will do what I want to do here?

 ![image](https://global.discourse-cdn.com/sketchup/original/3X/5/5/552aad74a72278c819ac35dd39c0c34d8374cabc.png)

---

<div class="post-metadata">

**Author:** ![john\_drivenupthewall](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@john\_drivenupthewall](https://forums.sketchup.com/u/john_drivenupthewall)\
**Post date:** [August 8, 2019, 1:25pm UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/9 "2019-08-08T13:25:04Z")

</div>

> [@rbantjes](#):
>
> but nothing happens

was it a group and was it selected?

post your model and I’ll test my code on it…

john

---

<div class="post-metadata">

**Author:** ![rbantjes](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rbantjes](https://forums.sketchup.com/u/rbantjes)\
**Post date:** [August 8, 2019, 2:36pm UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/10 "2019-08-08T14:36:07Z")

</div>

Thanks! I didn’t have the object selected. Now it will spin 360 degrees. I need to modify the code to do two things: 1) stop the rotation at 90 degrees and 2) change the orientation of the rotation plane (so that it rotates obliquely into the view). I changed 4.degrees to 90.degrees and 90.times to 1.times. Now it just flips to the new position and flips back.

What I need to do (if I understand this correctly) is record a scene, move the camera 90 degrees, record the next scene etc. Then animate the scenes. My end goal is to export the animation as an image-set. (I want physical print-outs of each image that I will animate mechanically)

---

<div class="post-metadata">

**Author:** ![john\_drivenupthewall](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@john\_drivenupthewall](https://forums.sketchup.com/u/john_drivenupthewall)\
**Post date:** [August 8, 2019, 3:17pm UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/11 "2019-08-08T15:17:01Z")

</div>

you can extract the images without scenes…

you need to add code for the ‘click’ and the add that on the **:times do** loop…

```ruby
def click( view, title )
	w = 512
	h = 512
	options = {
		:filename => "/tmp/cube_views/#{title}.png",
		:width => w,
		:height => h,
		:antialias => false,
	 # :compression => 0.9,
	 # :source => :framebuffer,
		:transparent => true,
		:scale_factor => 1
	}
	view.write_image(options)
	title
end

```

and add ` title = model.title` and modify the options as well…

I think there’s a working version of ‘spinit with click’ on here somewhere…

john

---

<div class="post-metadata">

**Author:** ![rbantjes](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@rbantjes](https://forums.sketchup.com/u/rbantjes)\
**Post date:** [August 8, 2019, 3:44pm UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/12 "2019-08-08T15:44:15Z")

</div>

I can barely read code and certainly don’t know how to write it. As I understand it, this one will generate a series of numbered images in a designated folder. That would be great!

I have tried numerous permutations of the variables that need to be added and/or changed, but I cannot make the “click” routine produce any image files.

---

<div class="post-metadata">

**Author:** ![alvin\_D85](https://avatars.discourse-cdn.com/v4/letter/a/cc9497/32.png) [@alvin\_D85](https://forums.sketchup.com/u/alvin_D85)\
**Post date:** [August 8, 2019, 4:05pm UTC](https://forums.sketchup.com/t/precise-movement-between-scenes-in-animation/100534/13 "2019-08-08T16:05:13Z")

</div>

animador de fredo te realiza lo que necesitas ya intente algo parecido y si funciona
