[Contents | Tutorials ]

Lesson 8: Multiple Models

One of the most important features of Vertex and the V3D format is its capability to store both V3D and non-V3D (third party) data in a single V3D file. Each V3D file may contain multiple models, models are basically sections in a V3D file that can be two possible types, V3D and third party. This becomes incredibly useful when you want one model to contain an entire complex model with both V3D model data and data that your end application will recognize.

For example if you wanted to create a model bird with flapable wings, you can store the model of the bird's body, separate models of the wing parts, and your own data specifying the birds physical characteristics (ie mass, speed, wing flap rate, etc) all in one V3D file.

An abstract sequence of models for the above mentioned situation would look like as follows, in one model file you will have:

  1. Third party model data describing the bird's physical parameter and specifying that the next model is the body
  2. V3D model of the bird's body
  3. Third party model data specifying that the next model is the left wing
  4. V3D model of the bird's left wing
  5. Third party model data specifying that the next model is the right wing
  6. V3D model of the bird's right wing

Model 1 can be considered a "header" of sorts, one that your end application will handle and Vertex will just interprite as non-relivent data. Note that this data can be edited within Vertex when you load the model file and select model 1 on the models list, the contents of the third party model will be displayed on the horizontal text box on the editor where it can be easilly modified. It would look somewhat like the following:

fly_model_name Bird
fly_model_mass 10
fly_model_speed 10
fly_model_new bird_body

Model 2 will be the V3D model of the bird's body.

Model 3 will contain code that (once again) your end application will interprite, it may look somewhat like the following:

fly_model_new bird_wing_left
fly_model_anim_rate 230 4003 2 12345

Model 4 will be the V3D model of the bird's left wing. Make sure that you place vertices in each V3D model relative to the center, where the center will be the center of rotation. For example in this model, the wing should be centered at the joint that connects the left wing to the left shoulder, as it would probably rotate about the Y axis (to simulate the flapping motion) by your end application.

Models 5 and 6 basically do the same as the above two models except define the right wing.

When you save this model, make sure that you do not check strip extraneous data on the V3D Format Options Dialog. However you can safely specify the highest optimization level as it will only optimize the V3D specific data.


Back to the top

Vertex is Copyright © 2000-2001 WolfPack Entertainment