Using Importer
Importer has undergone a facelift since this page was written. Check back for updates soon!
Starting Importer
Importer is a plugin for Composer. With Windows binary installs, it can be accessed from the start menu. For source releases, open a command line window and navigate to the trunk folder (the base of the MV3D source tree where the mv3d folder is) and run
python mv3d/tools/composer/composer2.py
For setuptools installations, make sure Python's scripts directory is in your path and just run composer2.
Importer is the first step to getting new assets in the game and updating existing assets. It allows you to connect to a MV3D server and create or edit assets. You can also automatically upload assets to their distribution location via SFTP. In addition to those features, this application is a great place to test if your new asset exported correctly.
The MV3D server stores metadata on all assets in the game world. This data includes things such as file name, where to download it from, and what type of asset it is. Importer manages updating this information on the server.
Selecting Assets
Once connected to the server, on the top left of the window is a list of asset groups. Double click to select one and the list of assets below will fill up with the assets from that group. There are buttons to add, delete, and edit groups accordingly. Note that once you delete an Asset Group or asset, it can not be undone.
Uploading Assets
Below the list of assets is the Upload pane. In here, you can select an upload location for your assets. In order to do this, you'll need to configure upload.conf. Here's an example configuration:
[testSite] type=mv3d.resource.upload.SFTPUploader host=www.test.com user=testUser publicKey=c:\Documents\publicKey.txt privateKey=c:\Documents\privateKey.txt baseDir=/home/www/www.test.com/htdocs/ downloadUrl=http://www.test.com/test/
The only available uploading method at this time is via SFTP. If your server supports SSH, it will likely also support SFTP. You'll also need to generate SSH keys using ssh-keygen. The baseDir option specifies the base directory on the server to upload to. The downloadUrl is the public facing URL where the uploaded assets can be downloaded from.
Assets are automatically uploaded when File->Save is used. They can be manually uploaded by hitting the Upload button. Also note that when a new asset is loaded and the uploader is set, the URL will automatically be filled out.
Asset Group Properties
In the edit Group Properties window (click Edit Group), only the name and description are currently editable.
Asset Properties
To the right of the asset groups and assets is the properties pane. These are various properties for the currently selected asset. Most of them are optional metadata.
- ID: The ID of the asset (asset group, asset id). This field is not editable.
- Name: The name of the asset. Can be anything. Optional.
- Category: Select a category for the asset. Optional.
- Author: The original author of the asset. Optional.
- Copyright: The copyright information on the asset. Optional.
- License: The license of the asset. Optional.
- Description: A textual description of the asset. Optional.
- Revisor: The last person to edit the asset. Optional.
- Tags: A comma seperated list of tags for the asset. Optional.
- Comment: A comment on the asset. Optional.
- Mesh Name: For Ogre meshes, this is the name of the mesh (usually the file name). Only required for Ogre Meshes.
- Material Name: For Ogre Materials, this is the name of the material specified by this asset. Only required for Ogre Materials.
- URL: The download link for this asset.
- Local File: The local filename this asset will be saved to.
- Dependencies: A list of other assets that this asset depends on. These assets will be downloaded and prepared before this asset.
Changes made here are only saved when File->Save is used''
Fixing Dependencies
Importer comes with an automatic dependency checker. It works pretty well for most file types and can generally set all dependencies for any asset. In order to use it, you must first make sure the asset is saved. Then select Asset->Fix Dependencies from the menu. It automatically searches for what assets are dependencies, and will even add them to the server if they haven't been already. This can be very useful for a one click fix on a complicated asset.
Tutorial
Note the rest of this page is currently more of a tutorial. It will be expanded soon.
- Export from 3D Studio Max (or Maya/Sketchup/Blender/whatever). For the most convenience, save the .mesh, .skeletion, and any textures to a subfolder of ~/.mv3d/Extern/Group0/ where ~ = your home directory. In windows, this is either C:\Users\YourName? or C:\Documents and Settings\YourName?. If you create a new asset group, change it to GroupX where X is the id of your asset group.
- Run the Importer tool, connect to your server and select (double click) or create an asset group. To create a group, use Group->New on the menu. 1. Load your first texture using File->Load.
- Make sure that local file is filled in (if you put it in the right spot, it will be automatically). You'll also want to set the URL. This is where the asset will be downloaded from. Currently, http is supported only. You can also do local files, but the importer app doesn't support that currently. Note that if your web server doesn't do SCP (SSH file transfer), you'll need to manually copy the asset there.
- Click File->Save and you should see a new asset in the list.
- Repeat for each material, texture, model, and skeleton file.
- Select your model asset (double click in the asset list) and then highlight the skeleton asset (single click if you have one) and under Dependencies, click Add.
- Select the material and add that as well.
- Double click the material asset and add the textures as dependencies.
- Save again. (technically if you already added those assets, you can do this before saving the first time)
- You can also try loading the model and then clicking Asset->Fix Dependencies, but there are still some bugs with that.
- Leave Importer open so you can add more assets.
Attachments
- importerstart.JPG (86.7 KB) - added by mike 16 months ago.
- importerselectasset.JPG (48.0 KB) - added by mike 16 months ago.
- importerproperties.JPG (31.7 KB) - added by mike 16 months ago.
- importergroupeditor.JPG (18.1 KB) - added by mike 16 months ago.
- importerupload.JPG (12.9 KB) - added by mike 16 months ago.
- importergroupproperties.PNG (13.7 KB) - added by mike 11 months ago.
