Precise movement between scenes in animation

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!

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.


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.

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.

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).

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

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

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.

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

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?
… as well as this … Rotation in a view plane

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

was it a group and was it selected?

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

john

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)

you can extract the images without scenes…

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

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

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.

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