Gone Sledding: Using Camera Sleds in SOLIDWORKS Animations
SOLIDWORKS animations are a great tool to evaluate and illustrate your models. While more advanced rendering programs like SOLIDWORKS Visualize can give you a highly polished product, a lot can be done within a basic SOLIDWORKS animation to show off your work.
In addition to previewing a design’s intended motion, animations can show motion of a camera around and through the model, giving viewers a closer look at key details. For this latter process, a camera sled is a tremendous asset. Camera sleds offer improved control over the motion of the camera in 3D space, utilizing assembly mating techniques standard to many SOLIDWORKS users.
Let’s go through some important animation concepts and then take a look at how to set up and use camera sleds.
A Brief Overview of Animations
Animations in SOLIDWORKS are a simple form of motion study in which models can be moved without regard for physical characteristics or interactions (e.g., weight, collisions). The animation is defined in an interface called the MotionManager, which includes a timeline illustrating the journey taken by each actor in the animation. You use “keys” to define moments in the timeline where something happens, such as an assembly component rotating 90°. SOLIDWORKS will calculate the position of the affected component at discrete frames in between these keys so that there is smooth motion from the starting point to the end. This transition between keys is shown in the timeline by a “changebar.”
As I mentioned earlier, animations are not just limited to component motion. You can incorporate changes in appearance or lighting with your keys, or, as I will show here, you can simply move a camera around a model to get a more complete view.
As you zoom, pan, and rotate, SOLIDWORKS can create keys automatically to store the resulting views in the animation. Just like with component motion, SOLIDWORKS will interpolate the path taken by the camera from one key to the next. This method makes it easy to capture simple transitions, especially if you just want to go between some of the default view orientations, but more detailed paths are difficult to generate accurately. For those situations, we have camera sleds.
A camera sled is a moveable block added to an assembly—often as a virtual component—on which a camera is located. You can then move the block using standard mating techniques or animation tools to update the camera’s position throughout the animation. I’ll demonstrate here how a camera sled can be used to animate—of course—a wooden sled.
The first step to setting up this animation is to build the camera sled as a virtual component within the assembly. A simple extruded rectangle should be good enough. The size of the block is not too important, as it will be hidden during the animation; putting it on a similar scale to the rest of the assembly though can make it easier to visualize and position. When sketching the camera sled, I want to be careful not to add any references to other assembly components, as this might cause problems when I try moving it later.
My virtual part has an InPlace mate locking it into position. I will delete this and mate the component using standard techniques, such as defining two sets of coincident faces so the block can still translate in one direction. (Depending on how a virtual part was created, it might have a Fix relation instead of an InPlace mate. A Fix relation can be undone by right-clicking the component and choosing Float.)
Now I need to create a camera for use in the animation, which can be done from the View > Lights and Cameras > Add Camera command. While defining a camera, SOLIDWORKS splits the graphics area into two screens: on the left is the full model shown in the standard viewport, and on the right is the model shown from the perspective of the camera being created. Zooming, panning, or rotating in the right screen changes the position and orientation of the camera itself, which can be seen on the left screen.
Instead of locating the camera manually, I can use my camera sled to position it. In the PropertyManager, the Position by selection option lets me pick a piece of geometry to locate the camera. It accepts faces, vertices, sketch geometry, and more. I will choose an edge of the camera sled and then use the Percent distance along selected edge/line/curve slider to put the camera midway along the line.
The target on which the camera focuses can also be defined using model geometry. (Alternatively, enabling the option to Show numeric controls would let me specify the target using XYZ coordinates.) At the bottom of the PropertyManager, the Field of View settings define the lens size. There are several standard lenses to choose from, though custom values are also allowed.
The camera is added in the DisplayManager under Scene, Lights, and Cameras. To see the model from the camera’s perspective, I can right-click the camera and enable the Camera View option.
Now I’ll get into the animation. I can create a new motion study from Insert > New Motion Study, or I can just use the existing Motion Study 1 at the bottom of the SOLIDWORKS window. In the MotionManager, I’ll make sure the study type on the far left is set to Animation.
For this animation, I want to just gradually move the camera forward to the front of the model. I have a Distance mate putting the camera sled 18” behind the wooden sled, so I will suppress that mate for the duration of the animation to allow translation in the global Z direction. I’ll move the timebar further ahead in the timeline then click and drag the block to the front end of the wooden sled, creating a key automatically. In the animation, SOLIDWORKS will move the camera sled at a constant speed from its starting point to this ending point.
The camera can be found in the Lights, Cameras and Scene folder near the top of the animation feature tree. To view the animation from the camera’s perspective, I can right-click the camera feature and choose Camera View before hitting Play. If I manually move the timebar after that, though, the default viewport returns. For a more permanent change, I will right-click the Orientation and Camera Views key at the start of the timeline and turn on Camera View. As long as this option is enabled, the animation will be shown through the camera lens.
The camera parameters can be redefined throughout the animation as desired. Right-clicking the camera and selecting Properties brings back the camera’s PropertyManager. If I adjust these settings, it will create a key at the current position of the timebar to store the change. I will have the target change periodically so the camera sweeps from left to right as it travels down the wooden sled.
Once the animation is ready, I will hide the camera sled to prevent it from appearing in playback. I just need to move the timebar back to the beginning of the animation, right-click the camera sled component, and choose Hide. This will make it invisible for the full duration of the animation. I can then click the Calculate button to make SOLIDWORKS solve each frame, and the animation will be ready for viewing.
A more interesting application of the camera sled, though, would be to use it with a Path mate. I will sketch out a track of sorts in the assembly to represent the desired path of the camera. With the camera sled mated to this path, I can create an animation in which the camera gets pulled along the loop while focusing on different areas of the wooden sled.
An important note about Path mates is that the Free constraint cannot be used with an animation. Percent Along Path is easiest to work with in this case. The percentage can be edited at different time steps, so I will set it to 0% at the start of the animation and to 100% at the end.
As was done before, I will redefine the camera’s target every couple seconds to capture the desired views. The camera sled and path sketch can both be hidden for the course of the animation.
There are plenty of opportunities to apply camera sleds, so I hope this gives you some ideas for your own projects. If you would like to see more animation tricks like these or have any other questions, feel free to reach out.
Computer Aided Technology