Hierarchical Modeling in Vizard

You are already familiar with the concept of hierarchical modeling through your work in OpenGL and Blender. In this assignment we will explore hierarchical modeling in Vizard. The idea is the same -- when a parent node moves, its children move, and when a parent rotates, its children rotate with it.

To Do:

  1. Go through the Hierarchical Models Vizard tutorial.

    You will note that, unlike in OpenGL where you have full control over the transformation matrices for each parent and its children, Vizard automatically applies the parent transformation matrix to each of its children. This makes things like scaling a bit difficult, because a parent and a child cannot be scaled independently.

    To avoid scaling issues, we will design our hierarchical object in Blender, and export each node in the scene graph as an individual object file (.obj). We will then import these objects in Vizard to reconstruct the original model, then animate it using interpolation.

  2. Now it's a good time to pick a theme for your final project (movie). With your final project in mind, design a hierarchical model in Blender (to be later placed in a more complex graphics scene of your choice). It could be anything you want -- a lamp, a robot, a bird, a swimming dolphin -- the only restriction is that it should have at least one rotating joint. Do not worry about colors and textures for your model at this point, and keep in mind that you will add these to your project soon.

    The parts connected by the joint(s) need to be saved as separate objects before being imported in Vizard. A python script for exporting selected objects from Blender is available online here. Follow the installation instructions (which are pretty straightforward) and add the script to your Blender installation. Once installed, you will see the option "Export/Selected/OBJ" when you try to export a selected object from Blender.

    As specified in an earlier assignment, Under "Operator presets" deselect all checkboxes and then select "Include Edges", "Write Normals", "Include UVs", "Write Materials", and "Objects as OBJ groups". Then click the "Export Selected" button.

  3. Write a Vizard program that imports the objects created in the previous step and animates the model using interpolation (linear or cubic, whichever is appropriate). One important observation here is that all vertex coordinates for your Blender objects are given in world space (not model space), relative to the center of the Blender world. So for each object that needs rotation, you'll need to specify the rotation pivot using the Vizard setCenter function.

    One simple example (in a single zip file BlenderVizardInterpolation.zip that includes the Vizard code, plus the Blender and object files) is provided to you as a starting point.

  4. Record your animation as a movie. (Recall that pressing Ctrl + F12 starts the recorder, and your captured video will appear as an uncompressed AVI in your project folder.) Because this animation is short, the movie should be of reasonable size. Please email your movie to your instructor before the due date of this assignment.