Platform Tutorial Adding Custom Assets to Your World
From Multiverse
This section describes how to add the assets that you imported from 3ds Max in the previous section to your world.
Contents |
Create asset definition files
To use the models you exported and converted in the previous section, use Multiverse Asset Importer.
You must create an asset definition file for the tutorial_shack model. Asset definitions are stored in asset definition files, XML files that specify the media files required for a model (or other asset). For more information, see Asset Definition Files.
The model consists of a mesh file and a material file; so you are going to create asset definitions for both of them. The mesh asset definition will refer to the material asset definition.
Create material asset definition
To create the material asset definition:
- Click the Type drop-down list and select Material.
- In the Description field, enter "Tutorial shack material".
- Click the "..." button next to Material, browse to the directory where the Conversion Tool created the material file (if you followed the instructions exactly,
C:\MVTutorial\MyFiles). - Select
tutorial_shack.materialand click Open. Asset Importer will display a list of other asset files in the directory. - Click the "..." button next to Zero Or More Textures, and browse to the location where you downloaded the tutorial shack texture (.dds) file.
- Select
tutorial_shack_texture.dds, and click Open. - Click the Save icon or choose File | Save Asset to save the material asset definition. Accept the default asset definition file name.
The Asset Importer window should look like this just before you save the asset definition:
Asset Importer will create an asset definition file for the tutorial_shack material, and put it in the AssetDefinitions directory of your designated asset repository. It will also copy the .material and .texture files to the Materials and Textures directories, respectively.
Create mesh asset definition
To create the mesh definition:
- Click New Asset or choose File | New Asset.
- Click the Type drop-down list and select Mesh.
- In the Category drop-down list, choose Buildings.
- In the Description field, enter "Tutorial shack model".
- Select the
tutorial_shack.meshfrom the file list, and drag it to the Mesh field. - Select the
tutorial_shack.physicsfrom the file list, and drag it to the Physics field. - Click on "..." next to One or more Material Asset Definitions, and browse to the material asset definition file you just created,
tutorial_shack_Material.asset. Note that you are selecting the asset definition file for the material, not the material file. - Click the save icon or choose File | Save Asset. Accept the default file name
tutorial_shack_Mesh.asset.
The Asset Importer window should look like this just before you save the asset definition file:
View in Model Viewer
Now you can use Multiverse Model Viewer to see how your model will look in the Multiverse client:
- Double-click on the icon to launch Model Viewer.
- Choose File | Load Model. The Load Model dialog box will appear.
- Select
tutorial_shack.mesh - You will see the model:
Note: The figure in the doorway does not have an assocaited texture is there simply to provide scale.
Adding the model to your world
Now you are going to add the tutorial shack model to your world. Follow these steps:
- Start World Editor.
- Choose File | Load World, and select your world, tutorialworld.mvw. World Editor will load your world file.
- Zoom into a location where you want to place the shack. It can be any reasonably level spot.
- In the tree view, expand the world object, then right click on the collection: village object, and choose Add Object.
- In the Add Object to the World dialog box:
- In Object Type dropdown, choose "Buildings."
- In the Object dropdopwn, choose "Tutorial shack model."
- Enter a name for the object, such as "my shack."
- Click Create
- Adjust the position, scale, and rotation of the model as desired to make it look good where it is place. For example, if you placed the model on a slope, you may want to move it up so that it doesn't appear to "sink" into the ground.
When you are done, the model should look something like this in World Editor:
Finallly, choose File | Save World, and save your world file with the same name as before (overwriting the old file).
Viewing the model in the world
Follow these steps:
-
Start the Multiverse servers in a Cygwin shell window, as you did before:
cd mv_home/bin ./multiverse.sh -v start
- Open a Windows Command Prompt Window.
-
Enter these commands to start the Multiverse Client:
cd "c:\Program Files\Multiverse Client\bin" MultiverseClient --use_default_repository
The command-line option tells the client to use the asset repository you specified for the tools. Note: If you installed the Multiverse Client somewhere other than the default location, then go to that directory instead.
The client will start, and you will then enter the world, and when you move to where you put the tutorial shack, you will see it in your world.




