To create tweens between scenes

hi, i need to make an animation of a large industrial system distributed on several floors of a building. for the animation it is important to have some layers turn on/ off depending of the stage of the animation. for example, at the beginning of the video all layers are on, but then when getting into the third floor the layer of the ceiling turns off.

i want to use enscape for the animation/render of the model. however it is not possible to turn on/off layers in enscape when generating an animation video. however, there is an option for batch render of images that keeps the correct turn on/off layers of the scenes. but it generates just one image for each scene. then if there would be one frame per scene it would be possible to collect all the frames and make a video with the correct turn on/off layers.

the question is if it is possible to use ruby to create the tweens between scenes automatically. i know that plug in keyframe animator makes that but to work, it forces to have at least one element moving during all the scenes. i could make a fake one (like a very small one, not visible in the final video) but it is a cumbersome solution. much better if it is possible to use ruby to generate the “tweens” between scenes.
please, anyone has any idea about that? i got limited experience in programming in sketchup ruby but if there is a good possibility to get a script doing that, i would try. however if it is quite complex, i will use keyframe and this workaround of using a fake object moving to force the generation of tweens.


Be sure scene transitions are enabled.

model =Sketchup.active_model
opts = model.options
page_options = opts["PageOptions"]
page_options["ShowTransition"]= true

I know not much about Enscape.

But SketchUp API does allow using an abstract Animation class. Within such a class could write out each frame of the “tween” using View#write_image then stitch the image files into a video using a third party Video editor.

But SketchUp Pro also has a native animation output.

Either way, the output will not be rendered frames.

Can Enscape be used with Fredo6’s Animator plugin? For sure you can do what you king about with Animator and native SU. You could also use Animator and Twilight Render the way you are wanting to.

Other than camera movement and time of day there’s no animation ability in Enscape.
A far easier way is to render the sequences with the relevant layers turned on/off with each sequence overlapping each other to individual mp4 files.
You can then edit the rendered videos together in something like Adobe Premiere (£££) or Davinci Resolve (free).
I don’t have a video of specifically above but this one is 30 or so individual simple camera moves rendered (with Enscape) to MP4’s and then combined using Davinci Resolve into a finished video with titles, music etc.

Found a small example, at the end of this video it fades from day to night, I did this by rendering the camera path with the day settings and the same path with the night setting. I then cross faded between the two in Resolve.
You could do similar by rendering the same camera path(s) with different layers on/off and then achieving the transition in your video editor of choice.

Nice videos :+1: :+1:

I also did some quick checking and here are the add-ons that work with Animator"

Animator is designed to support rendering for Animations (films, clips and sequences). Rendering software current supported are:

  • TheaRender v1.5: from Animator and from TheaRender
  • AmbientOcclusion Ex, v1.9.5 and above: From Animator
  • SketchFX Ex, v1.0.6 and above: From Animator
  • Twilight Render Pro, v2.5.5 and above: From Animator
  • VRay, v4.2 and v5.0: From Animator

thanks for the answer.

i extend a bit the initial question. do you think that using ruby it is possible to generate new “scene tabs” for each frame between two scenes? for example, there is originally “Scene1”, which goes to “Scene2”.

Lets say that there are 4 seconds transition time and 60 frames per second. It is possible to generate 4x60=240 new “scene tabs” between “Scene1” and “Scene2” automatically using ruby?

After the ruby script instead of two scenes “Scene1” “Scene2” there will be something like “Scene1” > “Subscene1” > “…” > “Subscene239” > “Scene2”.

There will be a lot of tabs in skechup for sure. But enscape is able to read all the scenes from sketchup automatically and generate a nice rendered image for each one automatically (batch).

the plugin “keyframe animation” makes already this “breaking” of scenes in tweens, but as commented it works only if adding objects moving.


hi, thanks i will check Animator, to see if it is possible. but i will preffer something to connect to enscape because render is really fast keeping good quality.

yes, good idea.
it looks like the procedure i was using until now (number 1, number 0 is the default procedure to generate animations in sketchup).

problem is that models normally got a lot of scenes and it takes a long time to generate the short videos.

now i am trying to move to procedure (number 2), that is because asking here for a way to convert one frame in one scene tab using a ruby script.

also i am investigating (number 3) but stuck there because i dont find a plugin able to convert the layers of the model in separated files. it is a pity because the renders in lumion look even better than in enscape, at least for the model i am working on.

Yes, you can create and insert scene pages between two existing scene pages.

The tricky thing is to calculate camera position to prevent target surging during the resultant animation. There is a topic here discussing this challenge.

Also, if the beginning scene and ending scene have differing styles, differing sets of hidden objects or tags or differing sets of section planes, then you’ll need to interpolate between these properties in your code. The native animation does it naturally except it does not do a good job keeping the camera the correct distance from the target to prevent surging.

1 Like