Camera: 360° rotation

Hi everyone,

Is there a possiblity to spin the camera 360° around an object without getting the ‘jump’ effect. I try this with front, right, back, left buttons and this works fine see exemple video1. But when I place the camera in an angle of 45° relative to the object every ‘camera stop’ creates a 'jumping effect see exemple video2.

PS: I’ve tried the advanced camera settings, but it’s the same effect.

Can this effect be fixed?

VIDEO1

VIDEO2

I want to achieve this
https://lh5.googleusercontent.com/-HgIFpsfRyUQ/VvI5IWU3wuI/AAAAAAAAAIs/daI578tiZjUagszV17U5YzpdWeFNSEaLg/w958-h539-no/Rotating%2BImage%2B3.gif

The only way to get the desired result in SketchUp with native tools is to include camera positions at angles inbetween and create more scenes. The more scenes, the smoother and the less the “jump” effect will be noticed
Using positions at say each 45 degrees will make “jumping” hardly noticeable.

2 Likes

Thank you @Wo3Dan I will try this. :slight_smile:

There is a thread about that here:

Another approach …

Hi everyone,

Here a new test this time with 36 faces and indeed like @Wo3Dan told the ‘jumping effect’ reduced when adding more camera points.

VIDEO3: 36 frames

1 Like

This was a video that I have put together using the same method.

As I kept consistent eye height, it is a smooth transition.

Just thought it might be relevant.

3 Likes

Thank you for sharing @josephkim626

I have a simple Ruby script that can be pasted into the Ruby console. It starts with whatever view you have and creates 360 scenes at 1 degree intervals around the origin. Works in either isometric or perspective views:

c = Sketchup.active_model.active_view.camera
p = Sketchup.active_model.pages
e = c.eye
r = Geom::Transformation.rotation([0,0,0],[0,0,1],Math::PI / 180.0)
for i in 0...360
  c.set(e,[0,0,0],[0,0,1])
  p.add("Scene " + (i+1).to_s)
  e.transform!(r)
end

Two examples:

9 Likes

sorry for my late reply @jimhami42. Thank you for sharing your ruby i looks great!

Just came across to this again, @jimhami42

jim, if I understand this script correct, is below correct for making scene every 2 degrees?

c = Sketchup.active_model.active_view.camera
p = Sketchup.active_model.pages
e = c.eye
r = Geom::Transformation.rotation([0,0,0],[0,0,1],Math::PI / 90.0)
for i in 0...180
  c.set(e,[0,0,0],[0,0,1])
  p.add("Scene " + (i+1).to_s)
  e.transform!(r)
end

I just divided 180 and 360 by 2. My math isn’t so good, nor my programming.

1 Like

Yes. This creates 180 scenes incrementally rotated PI / 90 radians (or 2 degrees). 360 degrees total.

1 Like

Hi there,

If I want to have the scenes zoomed out a bit, what part of the code would I need to change?

Thanks.

Nothing. The code uses the current eyepoint of the camera before the code runs. So just zoom out a bit before running the code.

A small point: you could replace the code:
Math::PI / 180.0

by
2.degrees

for greater clarity - and possibly slightly faster execution?

SU Ruby recognises .degrees and .radians methods to convert between radians (used internally) and degrees used more commonly by humans.

Oh right, silly me.

Thanks for that Dan.

A post was merged into an existing topic: Auto generated fly-through

Absolutely brilliant simple solution! Thanks!

I used this to create a super smooth video. I wanted a full rotation in 30 seconds at 60 frames per second, so 1,800 frames. I changed to code to rotate 0.2 degrees per iteration to get the 1,800 required scenes. It took a while to process, but it worked. Then I exported the animation as PNG files rather than creating a video. Then I imported into Premiere Pro CC as an image sequence, which assigns each numbered image to a single frame in order. The results were stellar!

2 Likes

Interesting. Would this work with Vray rendering?

I don’t see why not. However, I’m not a Vray expert. You end up with a number of images that each have to be rendered separately. I found this tutorial which uses only two scenes, but it explains the basics.

2 Likes

Thanks very useful.
Is there a way to limit the degrees so it doesn’t go around full 360deg on the object?
I tried changing the values and the only value I understand is the
for i in 0…360 = scene #

If it was possible to make it just go half circle on the object or even control it via number, that would be really helpful.