jMonkeyPlatform AssetPacks

AssetPacks are a way to package jME3 compatible assets like models, textures, sounds and whole scenes into a package that contains publisher info, license info, descriptions etc. for all of the assets. An AssetPack basically consists of an assetpack.xml file that describes the content and an assets folder that contains the content. The integrated browser in jMP allows you to add the assets of installed AssetPacks to any project you are doing.

The AssetPack Browser

jmonkeyengine.org_wp-content_uploads_2010_10_assetpackbrowser-300x166.jpg

The AssetPack browser in jMP makes browsing the installed AssetPacks easy. Browse categories, search for tags and find the right asset for your project. When you have found it, you can add it with one click to your current scene. The AssetPack manager will automagically copy all needed textures, sounds etc. to your projects assets folder.

You can also browse a selection of online assetpacks that are available on jMonkeyEngine.org for download and install them to your jMonkeyPlatforms AssetPack browser.

The AssetPack browser uses a predefined directory to store the AssetPacks which is also used for new AssetPack projects. You can see and change the folder path in the AssetPack preferences (jMonkeyPlatform→Settings).

Using the browser

To preview a model from the browser, right-click it and select "Preview Asset"

To add a model from the AssetPack browser to a scene do the following:

  1. Create a new scene (j3o) file or use an existing one
  2. Open it in the SceneComposer by right-clicking it and selecting "Edit in SceneComposer"
  3. Select the root node of the scene (or another node you want to add the model to)
  4. Right-click a model in the AssetBrowser and select "Add to SceneComposer"

The model will be added to your scene and all needed texture files will be copied to your projects assets folder.

AssetPack Projects

AssetPack projects are a way to create your own AssetPacks, either for personal use or for publishing. With this project type in jMonkeyPlatform you can create a library of assets on your computer that you can use in any of your projects via the AssetPack browser. Editing of asset and project info, adding of new assets and setting their properties, everything you need to create and publish your AssetPacks is there.

  1. Select "File → New Project"
  2. Select "AssetPack Project"
  3. Fill in the project info and press "finish"

You can access and change the project properties by right-clicking the project and selecting "Properties".

Adding Assets

jmonkeyengine.org_wp-content_uploads_2010_10_assetpackimport-300x222.jpg

To add new assets to your AssetPack do the following:

  1. Right-Click the "Assets" node of the AssetPack project
  2. Select "Add Asset.."
  3. Specify the info about your asset and press Next
  4. Press the "add files" button and select all files belonging to your asset
  5. Select the "main" checkbox for the main model file if your asset is a model file
  6. Change the asset paths and types if needed and press "finish"

The global asset type can be "model", "scene", "texture", "sound", "shader" or "other"

With the "model" or "scene" types, the AssetPack browser will try to load and add a model file from the selected assets when the user selects "Add to SceneComposer". Specify the "load this model with material" flag for the model file that should be loaded via the AssetManager, you can also specify multiple mesh or scene files to be loaded. All texture and other needed files will be copied to the users project folder.

On the "Add Files" page you define the path of the files in the AssetPack. The importer tries to generate a proper path from the info entered on the first page. Note that for j3o binary models, the texture paths have to be exactly like they were during conversion. The given paths will also be used when copying the data to the users "assets" folder.

With the "add files" button you can open a file browser to select files from your harddisk that will be copied into the assets/ folder of the AssetPack project. With the "add existing" button you can add a file thats already in your AssetPack assets folder to a new asset item. This way you can reuse e.g. textures for asset items or make items for an existing collection of asset files that you copied to the projects assets folder.

jmonkeyengine.org_wp-content_uploads_2010_10_assetpackimport2-300x179.jpg

You can specify a specific material to be used for the single mesh/scene files, just select it in the dropdown below the mesh or scene file. If you don't select a material file here, the first found material file is used or none if none is found.

If the material file is an Ogre material file (.material) it will be used for loading an Ogre scene or mesh file. If it is a jMonkeyEngine3 material file (.j3m), it will be applied to the mesh regardless of model type. Note that for j3o models you don't need material files as the material is stored inside the j3o file.

In your AssetPack Project, if you right-click your asset and select "preview asset" you should be able to see your model. If you do, it should work for the user as well.

You can change the single assets properties in the properties window after you have added them. Just select an asset and open the properties window (Windows→Properties).

Supported formats for models are:

  1. OgreXML
  2. Wavefront OBJ
  3. jMonkeyEngine3 j3o

AssetPack Publishing

jmonkeyengine.org_wp-content_uploads_2010_10_assetpackdownload-263x300.jpg

You can publish your AssetPacks either as a zip file or directly to jmonkeyengine.org, using your website user name and login. This means other jMonkeyPlatform users can download your AssetPacks and install them to their local database right off the AssetPack online packages browser.

To make sure you can upload, you have to be registered on jmonkeyengine.org and have to enter your login info in the AssetPack preferences (jMonkeyPlatform→Settings).

  1. Right-Click your AssetPack project and select "Publish AssetPack.."
  2. Check the description etc. settings and press "Next"
  3. Select the checkbox for online and/or local publishing and press "finish"

view online version