Creating and Rendering an Animation with Bongo and VRay
|The purpose of this workflow is to introduce Bongo, the animation plug-in that works in Rhino, focusing on the user interface and primary animation tools and techniques, culminating in how Bongo interacts with the VRay rendering engine to create a short video file.|
We will be animating the model in this file today.
Step 0 - Story Board
Having a good idea of what you want your animation to be is one of the most important aspects. The story board for this animation is as follows:
- back wall extrudes into full form, camera begins motion and rotation
- roof appears
- roof, floor, and side walls begin extruding towards camera
- first wall lateral wall fades into view as side walls, roof, and floor pass it
- same happens for remaining 3 walls
- porch fades into view as roof and floor extend to meet it
Step 1 - File Organization
You will notice when you download it that the objects have already been organized into descriptive layers with only a few objects on each layer.
While you might organize the layers differently if the model were going to stay in Rhino, animation objects must be organized meticulously, according to which objects are going to move the same way at the same time. The more structured your layers, the easier it will be to animate your model.
We will be using V-Ray to render this animation, and here, to get a slight shadow below the house, we place the V-Ray infinite plane .25" below the bottom of the model. If you were using more distinct materials, this would probably not be necessary.
Step 2 - Set Objects to Initial Conditions
Since we will be animating some of the objects extruding, we will need to make new objects that "grow" into their final form, leaving the originals to scale against.
Since the back wall, roof, side walls, and floor are the only objects that extrude, we must un-extrude them, essentially working backwards to create the place where they start from. Turn off all objects except for the side walls, floor, and back wall (wall 1) and shrink them down so they are a 1" extrusion (or 1 unit, if you're using a different metric). This will make scaling them significantly easier later.
Then hide all objects except for the floor (the first thing we will animate).
Step 3 - Animate Objects
To set up the animation, turn on both the timeline and animation manager in the Bongo menu. A timeline will appear on the bottom of the screen with 100 'ticks.' Ticks have nothing to do with how long the final animation will be, but they do represent relative time (ie if the final animation is 10 seconds long, 10 ticks = 1 second, but if the final animation is 20 seconds long, 5 ticks = 1 second). I set the number of ticks to 120, then dragged the arrow icon to the end, to indicate that I want the animation to end at 120 ticks.
Now, click the big "Animate" button. The animate button, timeline, and current view window are all now highlighted in red.
Animate the Back Wall
Extend the Floor
With the floor object selected, right click on the timeline at 0, select (add keyframe) -> (selected objects) -> (empty). First, a red tab appears on the timeline, the keyframe. Red keyframes indicate object animations. We will also be using layer visibility animations (blue tabs) and view animations (yellow tabs). There are other things you can animate with Bongo that we won't be looking at today.
It also causes a new set of arrows to appear around your object. It is now animated, and those axes indicate the pivot point of the object, which is the centroid of the object by default. [Note, if you use blocks, the block base point is the default pivot point.]
Since the control point is in the center and we don't want to scale from the center, we need to move it. We'll move it to the top left corner on the bottom of the object in plan view. To do this, change to the Bongo animation panel, right click on the object you want to move the pivot point for (object 3, here), and select (move pivot point).
Now, we want to make the floor the right slab. Since the wall needs to sit on top of it before the floor will move, we make the floor a 6" thick object first. Change the X input to 6 in the 'scale object' panel.
Now, to make the object extrude, move the timeline slider to 10, and change the Y input to 300 (the floor slab is 300" wide). You'll notice that a new keyframe appears. This means something has animated. If you move the timeline slider between 0 and 10, you can watch the floor extrude.
If you needed to turn on the 'original objects' layer to check a dimension, a blue keyframe will have appeared on the timeline. We don't want this now. All you need to do is click and drag it off of the timeline and it will remove itself.
Make the Back Wall Grow
Turn on the walls>1>bottom and side walls layers. The blue keyframe that appears indicates that these objects will turn on when the timeline slider gets to 10.
First we need to start animating the objects. Make an empty object keyframe at 10 ticks. Then change the pivot points for all three of these objects. For all of them, the lower left corner on the bottom of the object in plan makes the most sense, since they will be growing to the right and/or up. Making sure the timeline slider is still at 10, scale the two end walls by 6 in the X direction, so they match up with the floor and back wall.
Now let's have these walls fade in, so the transition isn't as harsh as the objects suddenly becoming visible. Select these three objects, click the material in the layer panel and slide transparency to 100%.
Move the slider to 14, and repeat this process, except now return the slider to 0% transparency.
It's possible that a new keyframe will have been created at the beginning of the timeline. If you want the fade-in to start from nothing, select those same three objects, click and drag the keyframe at the beginning of the timeline off of it to delete it, then return the transparency slider at tick 10 to 100%.
Now create a new keyframe at 24 for the end of the vertical extrusion (again, an empty keyframe). The Z scale should be set to 120.
To add the top of the back wall and roof, it is a similar process - turn on the top portion of the wall, reset the pivot, this time to the middle of the object, set the transparency so it fades in (or not, if you don't wish to), and then scale the Z axis by 67.277 at tick 30.
For the roof, turn on the roof layer at tick 30, add an empty keyframe, move the pivot to the left side in plan, and change the X scale to 6.
Animating the Rest of the House
Extruding the Volume of the House
Since there are 4 "rooms" in the house and a front deck, we'll have the side wall, roof, and floor extend evenly through the entire volume, and then have the roof and floor extend further. There are some inconsistencies with how Bongo animates, so we will need to go back through some keyframes to make sure they are correct, and also add in safe-guards so the walls move together.
With the roof, side walls, and floor selected, create keyframes at 31 (x = 6), 46 (x = 213.5), 61 (x = 471.5), 76 (x = 685.5), and 91 (x = 894). Then win just the roof and walls selected, create one last keyframe at 96 (x = 963).
Fading in the Remaining Walls and Porch
The keyframes we just set correspond closely with the locations of the 3 internal walls and the front wall. (To check this, move the slider to 46 and turn on and off the 2nd wall.) However, 47 is much closer to accurate.
Move the blue keyframe to 42 (5 before 47). Now fade the wall in the same way we have before. (Remember - add an empty object keyframe at 42, change transparency to 100%, add empty object keyframe at 47, change transparency to 0%, remove extraneous keyframe at 0 and reset transparency at 42 to 100%.)
Now repeat this process for all remaining walls. (Turn on wall 3 at 55, wall 4 at 70, and wall 5 at 86.) And finally do the same for the porch (turn on the porch layer at tick 91 and fade like we've been doing).
Step 4 - Animating the View
Set Initial Position
We are allowed only one type of camera movement. Here, we will pan as the building animates. Move the animation to a fairly early tick to check an approximate view.
Then we need to set an exact camera position using the viewport properties.
Finally, add an empty viewport keyframe in the timeline at zero, similarly to how we have been adding object and layer animations.
Move the time slider to tick 96 and add another viewport keyframe. This time, just change the viewport properties, as below. We have added 963 to the x coordinates, since that is the length of our building. Click OK to set the keyframe.
After checking to see everything is set the way we want by playing through the animation, we can render the frames.
Step 5 - Render Frames
If you don't already have a sun or other directional light in your model, add one in. Then we must change a couple of V-Ray options so the render works the way we want it to.
In the V-Ray options panel, make sure that Batch Render is checked under Global Switches. This allows V-Ray to render multiple images one after the other. Also change the V-Ray output size. For this exercise, use a small image size, but make sure the aspect ratio is the same as your viewport.
You are welcome to alter other V-Ray settings, but we won't be covering that here.
Then in the Bongo menu, select Render Animation. Check the number of frames, speed (fps), output location, and video output. Make sure this last is unchecked. We will compile in the next step. For this exercise, don't render the full animation. This may take as long as 40 minutes, even for something this simple and short.
Step 6 - Compile Video
Once you have your rendered frames, use the Video Encoder in the Bongo menu. Using the browse button, find the first rendered frame. Then simply click OK and Bongo will find the others. Make sure that the compressed file-type is supported on your computer and also that the frame rate is the same as the one you specified in the render output.