How to use Twilight with SketchyPhysics

The Twilight Render Team shares tips, ideas, helpful hints, and more on using Twilight Render
Chris
Posts: 4827
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

How to use Twilight with SketchyPhysics

Post by Chris » Tue Aug 25, 2009 9:20 pm

SketchyPhysics is an awesome plugin for SketchUp that allows you to create scenes with physical, 'newtonian' behavior. This means you make wheels roll, blocks fall, walls break, and almost anything your imagination can come up with.

Using Twilight, it's easy to render great animations of your SketchyPhysics masterpieces. For those of you who are unfamiliar, here is a brief 'how to...'

First, you'll need SketchyPhysics installed. Follow the link above to find the latest.
Depending on your experience with SP, you may need to take some time to learn how to use it. There is a lot of functionality in there.
-but-
  • If you just want to run a simple test, make sure the SketchyPhysics solids toolbar is showing.
  • Add a solid floor
  • Add a sphere
  • Move the sphere above the surface of the floor
  • Go ahead and hit the Play button, just to make sure it's working.
Once you have your SP scene setup, here's what you need to do:
Twilight renders animation using SketchUp's built in animation controls.
For this, you'll need multiple scenes to render any animation.
  • Go ahead and add a scene if you haven't already.
  • For a simple demonstration, add a second scene. If you want the camera view to be animated, move to a new location. If not, add it in the exact spot as the first scene.
  • Tweak your SU animation settings to get the length of time you want. It's always recommended to set the Scene Delay to 0.
  • Open the Twilight Render window.
  • Go to the Animation tab.
    • Change the drop down from 'No Animation' to 'Has Animated Objects'
    • Set your start time to 0, and your stop time to the end of your simulation, like 2 seconds if you only have 2 scenes, with no scene delay and the default transition time.
    • Now set your Frame Rate.
      • If you want to make sure you get your whole SP simulation, hit the SketchyPhysics play button, and watch the status bar. It will tell you how many frames have elapsed.
      • Take that number, and divide by the number of seconds in your render (IE. 70 frames, 2 seconds, your frame rate is 35 frames per second).
    • Now set your base image name. Twilight will create a sequence of images starting with that name, and appending numbers like 0001, 0002 etc. Set the appropriate extension for the image type. The default is jpg.
    • Now make sure the 'Allow SketchyPhysics to run' button is checked.
  • Go to the Render Tab
    • Under presets, select Express->Animation->Preview Object Animation
    • If you want a better quality preset, you can choose one of the others, like Low+ Object Animation through High+ Object Animation.
Now hit the render button. Twilight will run through the animation, advancing SketchyPhysics by one frame for each rendered frame. When it's done, you can run your sequence through your favorite video maker and voila, a great animation!

Some things to keep in mind:
  • Twilight does not utilize the Sketchy Replay features.
  • Do not attempt to interact with SketchUp while rendering an animation. Hitting any of the SketchyPhysics buttons while rendering, or attempting to manipulate the view will cause unstable results, and may crash SketchUp.
  • You can cancel you animation render at any time by hitting the Cancel button in the render window.
  • While using the interactive tonemapping features while rendering will work, it will only effect the currently rendered frame, so should be avoided.
When your render is complete, the SketchyPhysics objects will be reset to their original locations and Twilight will notify you that it is complete.

That's all there is to it. It should take only minutes to create a great looking animation using the awesome features of SketchyPhysics.

Rob D
Posts: 4
Joined: Wed Sep 02, 2009 9:57 am

Re: How to use Twilight with SketchyPhysics

Post by Rob D » Wed Sep 02, 2009 12:13 pm

Hi Mate

There's no way I can get this to work. It just renders static frames. Is there anything you've left out? What sketchyphysics settings (like framerate) should I have?
SUP.skp
(53.72 KiB) Downloaded 750 times
anim20000.jpg
anim20000.jpg (14.4 KiB) Viewed 20913 times
Regards
Rob

Chris
Posts: 4827
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: How to use Twilight with SketchyPhysics

Post by Chris » Wed Sep 02, 2009 2:44 pm

Hi Rob, there seems to be a problem with SP 2. I'm looking into it. Your scene worked with SP 3 though.

Rob D
Posts: 4
Joined: Wed Sep 02, 2009 9:57 am

Re: How to use Twilight with SketchyPhysics

Post by Rob D » Wed Sep 02, 2009 3:44 pm

Hi Chris. Thanks for that. I had v2!
Works now. :)
Cheers, Rob

Chris
Posts: 4827
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: How to use Twilight with SketchyPhysics

Post by Chris » Wed Sep 02, 2009 7:00 pm

I've made a workaround for the issues found in SP2. In general, I think SP 3 is better anyway, but at least you'll be able to use SP 2 if there is a reason you need to. It will be available in the next maintenance release.

shareck
Posts: 10
Joined: Sun Sep 06, 2009 4:53 pm

Re: How to use Twilight with SketchyPhysics

Post by shareck » Sun Sep 06, 2009 10:25 pm

It would be great if Twiligt could work with sketchyphysics sketchyreplay animation recorder. Too bad you can't touch controllers in SP when rendering. But great work anyway!

Chris
Posts: 4827
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: How to use Twilight with SketchyPhysics

Post by Chris » Sun Sep 06, 2009 10:40 pm

I'm not all that familiar with the recorder. Is there an advantage to using it? I can look at it if it provides added features and capabilities.

shareck
Posts: 10
Joined: Sun Sep 06, 2009 4:53 pm

Re: How to use Twilight with SketchyPhysics

Post by shareck » Sun Sep 06, 2009 10:59 pm

Well, it has one big disadventage - you can only use one static camera. but it records you animation and you can interact with your sp model while recording. It can also export each recorded frame as a separate .spk file.

shareck
Posts: 10
Joined: Sun Sep 06, 2009 4:53 pm

Re: How to use Twilight with SketchyPhysics

Post by shareck » Mon Sep 07, 2009 8:08 pm

Hi again.I've made a sketchyphysics animation and don't know what went wrong again. I set up 7 cameras, each scene lasts 4 sec, scene delay 0sec. 20 frames per sec. It rendered for 3hrs on a core2 PC and than it turned out that the camera is doing some crazy moves. the finished animation can be seen here: http://www.youtube.com/watch?v=hJSFUdyYEtc .

Chris
Posts: 4827
Joined: Sun Mar 08, 2009 3:00 am
OS: Win10
SketchUp: 2016

Re: How to use Twilight with SketchyPhysics

Post by Chris » Mon Sep 07, 2009 9:04 pm

I assumed you played the animation in SU before rendering?

In animations, SketchUp doesn't interpolate camera target, it only interpolates camera direction. Under a lot of conditions, this is fine, but since Twilight can render DOF (depth of field), the actual target point, the point that the camera is focused on, is very important in order to keep the scene in focus. So Twilight actually does it's own target interpolation during animations (another candidate for the FAQ!) By simple geometry, if you have a target point that is very near your eye point, small changes in position result in large changes in direction.
Twilight provides a tool to set the camera target. For an animation, click on each scene, select the target point (requires some kind of geometry to select), right click and go to Twilight -> Set Camera Target. Then "update" the view. And move to the next view. (Note: if the geometry moves, Twilight does not follow it. It just cares about the 3D point, not the associated geometry)
- I suppose, thinking about this scene specifically, you may need to focus on points where there isn't any geometry... Maybe Twilight needs an option to not interpolate target point, so if you aren't using DOF (ie. pinhole camera) you don't have to worry about it... -

The only other thing I can think is make sure you aren't letting SketchyPhysics do anything to the camera. I think I saw somewhere that SP can control the camera...?

If none of the above, maybe strip out the tank and post the scene so I can take a look at it!

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests