Cloth Importing Guides

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Contents

Overview


The Blue Mars Sandbox: Cloth Editor allows developers to create avatar clothing, shoes and accessories. These items can be uploaded to the Blue Mars database via the developer's MyPage and distributed in Blue Mars as a purchasable item in a shop. The item's price in world is decided by the developer.


Requirements


To fully complete this tutorial, it is necessary have the following:

  • The Blue Mars Sandbox: Cloth Editor.
  • A Blue Mars Developer Account.
  • Modeling software with support for exporting or saving a COLLADA DAE file.
  • Image editing software that can generate .tif or .dds files.
  • Internet access.

Creating A COLLADA DAE For The Cloth Editor


In order to create a Blue Mars cloth item, a COLLADA DAE file must be supplied to the Cloth Editor. A COLLADA DAE is specific file format for storing 3d model information, but the actual 3d model can be made in any application that can export a .dae file. The following steps will guide you through the general process of creating a COLLADA DAE for the Cloth Editor along with some tips on generating the best results with fewer iterations.

Importing An Avatar Body Reference DAE

When modeling a clothing item for Blue Mars, importing an avatar body reference model is helpful in the modeling process.

  • Open a 3d modeling application.
  • In most modeling applications, to import a file select [File] -> [Import] from the application's toolbar.
  • A file browser window should pop-up. In this window, you will need to navigate to the directory where one of the avatar body reference .dae file exists.
Note: Cloth items are body type specific, so be sure to choose the appropriate reference model for the type of asset you intend to create.
The avatar body reference models are included with the Blue Mars Developer Tools and can be found at:
Female Male
Blue Mars City Developer Tools\Template\Avatar\Female00\ReferenceModel\Assets
Blue Mars City Developer Tools\Template\Avatar\Male00\ReferenceModel\Assets
File:Cloth_3dsMax_ImportFileExample_FileType.jpg‎
File:Cloth 3dsMax ImportFileExample MaleFileType.jpg‎
v
v
File:Cloth_3dsMax_ImportFileExample_Female00.jpg
File:Cloth_3dsMax_ImportFileExample_Male00.jpg
Notice how the body reference models are facing backwards. The clothing item's .dae file must be exported with the same backwards orientation. Otherwise, the cloth item will be attached backwards on the avatar in the Cloth Editor.
Importing A Cloth Item Template Reference DAE

It is also useful to import the reference cage that matches the type of cloth item being created. So, if one were modeling a womens short sleeved T-shirt, then selecting either the InnerTops_ShortSleeve.dae or OutterTops_ShortSleve.dae would be appropriate for importing as a reference.

  • The steps for importing a reference cage are the same as importing an avatar body in the previous step except you will want to reference the cage's .dae.
  • The cage reference .dae files are located at:
Female Male
Blue Mars City Developer Tools\Template\Avatar\Female00\Assets\Accessory

Blue Mars City Developer Tools\Template\Avatar\Female00\Assets\Cloth

Blue Mars City Developer Tools\Template\Avatar\Female00\Assets\Shoes

Blue Mars City Developer Tools\Template\Avatar\Male00\Assets\Accessory

Blue Mars City Developer Tools\Template\Avatar\Male00\Assets\Cloth

Blue Mars City Developer Tools\Template\Avatar\Male00\Assets\Shoes

File:Cloth ImportTemplatesForReference Female.jpg‎
File:Cloth ImportTemplatesForReference Male.jpg‎
Modeling Geometry For A Cloth Item

When you begin to model the item's geometry there are a few things to keep in mind:

  • The item needs to stay proportionately similar to the cage used to create the cloth item.
  • When designing separate pieces of clothing, make sure that the pieces look good when paired together in the modeling application. For example, unless intentionally designed, a shirt model should not penetrate into the avatar reference model's geometry. Likewise, a jacket should not penetrate into the shirt model. So, pairing different cloth models during the modeling process better ensures that separate items will look good together on the avatars in Blue Mars.
  • The item's mesh must be positioned on the avatar reference model as it is intended to be worn before exporting. This means that the mesh needs to be placed where the reference cage imported into the modeling application. Basically, if modeling a hairstyle item, then your cloth item's mesh needs to be positioned on the head. Shoes need to be placed on the feet, bracelets on the wrists, and so on.
  • The item's pivot point must be located at (0,0,0).
File:Cloth GoodAndBadObjectPlacementExamples.jpg
Laying Out UV Coordinates
  • Setting up a model's uv coordinates is essential for properly displaying texture maps in Blue Mars.
  • To ensure the best results with uv mapping, follow these rules:
    • Each face must lay within unique uv space and should not overlap.
    • All uv maps should be normalized to fit within the bounds of (0,0) to (1,1). Basically fit all of the uv coordinates into one tile of a texture map.
    • Do not stretch the uv coordinates. This can cause undesirable results such as pixel distortion. A good way to tell if the coordinates are stretched is to apply a checker board material or texture to the model. If the squares of the checker pattern are not warped or rectangular, then the uv coordinates are not stretched.
File:Cloth_UVLayoutGood.jpg‎ File:Cloth_UVLayoutBad.jpg‎
The image on the left demonstrates a good uv mapping layout, and the image on the right shows an improper uv mapping layout.
Setting Up A Multi-Material
  • Clothing items in Blue Mars support 1 multi-material with up to 31 sub-materials.
Note: It is best to keep the number of sub-materials to as few as possible. Fewer sub-materials will ensure an optimal rendering performance for the cloth item.
  • The names of the sub-materials will be preserved when the cloth item's material file is generated by the Cloth Editor, but the name of the multi-material will not be preserved. The name given to the multi-material in the Cloth Editor is taken from the name of your .dae file.
File:Cloth 3dsMax MultiSubObjectMaterialNaming.jpg
Note:
  • Naming sub-materials is not a necessary step in cloth item creation. Once the cloth item's multi-material is generated by the Cloth Editor, it is also acceptable to rename sub-materials using the Cloth Editor's material editor.
  • The material file in your modeling application and the material file used in Blue Mars are separate. The only .mtl files that can be used for cloth items in Blue Mars are those generated from the Cloth Editor.
Exporting A COLLADA DAE
  • Select only the object you want to export, and in 3ds Max, select File -> Export Selected.
  • Save the file in a folder location in Blue Mars City Developer\Game\Objects\MyData as a COLLADA DAE.
File:Cloth 3dsMax ExportColladaDAE.jpg
Note: The Cloth Editor will only accept DAE files which contain a single mesh. If your cloth item consists of multiple meshes, then you must attach them together as one object before exporting. Parenting, linking, and other types of hierarchy assigning to multiple meshes will produce an error in the Cloth Editor. For example, say a shirt model consists of a fabric mesh named Cloth_01 and multiple button meshes named Button_01, Button_02, etc. Before exporting a COLLADA DAE for the Cloth Editor, these meshes must be attached into one single shirt model.


Converting A COLLADA DAE Into A Cloth Item


Now we will move on to converting the COLLADA DAE file into a cloth item that can be worn by the avatar and sold in the Blue Mars virtual world.

Opening The Cloth Editor
  • Open the Blue Mars Sandbox: Cloth Editor located in Blue Mars City Developer\Bin32 on your local hard drive.
  • Once the editor is running, a panel labeled Cloth Editor should be visible on the left of the editor window. If not, the select Cloth -> Make Cloth from the Cloth Editor's main toolbar.
Choose A COLLADA DAE File To Convert
  • In the "Cloth Editor" panel, press the Browse button.
  • Navigate to and select the COLLADA DAE file in your MyData folder.
File:Cloth InEditor ChooseDAEToConvert.jpg
Setup Cloth Editor Parameters
  • Choose the appropriate avatar type for your cloth item in the Avatar drop down menu.
File:Cloth InEditor ChooseAvatarType.jpg
  • Select the type of assets for your cloth item in the Asset drop down menu.
File:Cloth InEditor ChooseAssetType.jpg
  • Select the style that is the most similar to your asset under the Style drop down menu. This should be the same category as the type of cloth template used as a reference during the modeling process.
File:Cloth InEditor ChooseStyle.jpg

Note: The Avatar category determines which choices are available in the Asset category. Likewise, the Asset category determines which choices are available in the Style menu.

Create And Attach The Cloth Item

With all of the correct parameters set in the Cloth Editor panel, the COLLADA DAE is ready to be converted into a Blue Mars cloth item by pressing the Create And Attach button.

File:Cloth InEditor CreateAndAttach.jpg

Editing A Cloth Item's Material


When a cloth item is first generated from a COLLADA DAE file, a material file is created in the same directory as the DAE file. This material file is named the same a the DAE file except for the file extension name .mtl (not to be confused with other .mtl files generated by 3rd party applications). The cloth item's material should be edited in the Cloth Editor using the material editor.

Opening The Material Editor

In the Cloth Editor, press M on the keyboard, or from the main toolbar, select View > Open view pane > Material editor

File:Cloth InEditor OpeningMaterialEditor.jpg
Navigating To The Cloth Item's Material

With the cloth item attached or loaded into the Cloth Editor, click the [+] icons or double-click the folder icons to navigate to the cloth item's material location.

File:Cloth InEditor NavigatingToClothItemMtl.jpg
Assigning Shader Types To Sub-Materials
  • Select a sub-material of the cloth item, and a new list of parameters becomes available in the right panel of the material editor.
  • At the top of the panel, there is a parameter named Shader with a drop-down box containing different shader types.
File:Cloth InEditor AssigningShaderTypesToSubMat.jpg
Note: Each shader has unique and common parameters which can drastically alter the look of a material. Try selecting a shader type and then look under Shader Generation Params to see what kind of parameters the shader supports.
Editing Lighting Settings

The Lighting Settings rollup bar in the material editor contains parameters that effect how the material will react to the environment's lighting. Blue Mars supports both HDR and non-HDR rendering, so it is best to set the parameters found under Lighting Settings to values that accommodate both light rendering methods. Here are some general guides:

  • Pressing H on the keyboard will switch between HDR and non-HDR rendering. Note how HDR lighting lowers the overall diffuse of the scene.
  • Keep the Diffuse Color's RGB values to around (127,127,127). This will help keep brighter areas of the textures from blowing out in non-HDR settings
  • Specular Color will effect the color and intensity of the light reflected off the object.
  • Glossiness can make an object seem very smooth and polished or dull.
  • Specular Level will intensify the Specular Color and environment map reflections. A value of zero will produce no reflections when using environment maps.
  • Emissive Color controls the color and intensity of the light emitted from a material. You can use this setting, in combination with Glow Amount and diffuse maps, to make materials look like they are lights.
Assigning Texture Maps To Sub-Materials

Texture maps can be applied to a sub-material from the Texture Maps roll up bar in the material editor.

  • Select a sub-material.
  • Locate the Texture Maps roll up bar and select the browse button for the desired texture map.
  • Navigate to and select an appropriate texture map file.
Note: It is essential that all texture maps are located in and assigned to the sub-material from the directory of the cloth item. The reason being that any files not located in the same directory of the cloth item will not get packed into the itemdata.zip file.

Creating Texture Maps For Cloth Items


Texture Dimension Rules
  • All texture file dimensions must be in powers of 2.
  • 2048 is the largest supported texture dimension.

GOOD: 32x32, 512x256, 2048x2048
BAD: 10x10, 640x480, 1080x720

Note: For best results, avoid using texture dimension smaller than 8x8 pixels.
Commonly Used Texture Maps
  • Diffuse Maps

A diffuse map is primarily used for color information, but alpha channels can be stored in diffuse texture maps for creating transparent materials, glow maps, and detail map masks. These texture files will generally be the cloth item's largest maps because lower resolutions can be noticeably pixelated.

How To Make

  • Hand drawn using in a 2d image editing application.
  • Baked into a texture map from a 3d application.
  • Copied from photographs and layered, combined, scaled, etc. in a 2d image editing application.
Note: A default texture map, which has the words "No Texture", will be displayed if a material does not have a diffuse map assigned in the Cloth Editor's material editor.

File:Cloth NoDiffuseMap.jpg

  • Specular Maps

Specular maps control highlights. Lighter colors will produce strong highlights, and darker colors produce weaker highlights. Keep these texture maps as small a resolution as possible to conserve overall itemdata.zip file size.

File:Cloth SpecularMaps ThreeDifRes.jpg

How To Make

  • In an image editing application, duplicate the diffuse texture, lower the saturation amount so the colors become toned down, and adjust the overall lightness to lower/increase the specular amount.
  • Sometimes it is necessary to hand paint darker or lighter areas in the specular map. For example, if you have a texture map with both buttons and cotton, then you may want to paint lighter areas over the buttons to intensify their shine.

  • Bump Maps

Bump maps control pixel height information, and they need to be in grey scale. Lighter values elevate pixels and darker values recede the pixels. These maps can be used to convey higher levels of detail on low resolution meshes.

How To Make Generally the same processes as a diffuse texture, but remember but the texture file used in for the cloth item's bump map must be in gray scale.

  • Normal Maps

A normal map can be used to convey high levels of detail on a relatively low resolution mesh. Generally, normal maps produce better results then bump maps, but they are often larger in file size.

File:Cloth NormalMaps IncreaseDetail.jpg

How To Make

  • Generated from a duplicate of the diffuse map, which is desaturated and converted into a normal map using the NVIDIA plug-ins for Adobe Photoshop.
  • Baked into a texture map from a high poly model using a 3d modeling application which supports baking normal maps. There are also standalone applications that will bake normal maps if your particular modeling program does not support this operation.
  • Generated from a bump map using the CryTiff plugin for Photoshop.

  • Environment Maps

An environment map produces effects that mimic reflections on the surface of an object. Try to keep these texture map dimensions small to save memory. Because these maps mimic reflections and are not real-time, try to keep these maps blurry. The user's eye will not recognize parts of the environment texture map that do not appear in the avatar's location.

File:Cloth EnvironmentMaps SmallAndBlurred.jpg

How To Make

  • An environment can be made using the same methods described for diffuse texture maps.
  • Creating environment texture maps from renders of Blue Mars is a good way to get reflections matching the game environment.
Note:
  • The shader type for a material in the Blue Mars editors must support Specular EnvCM for environment maps to be displayed.
  • The Specular Color value of the material also controls reflection strength. Darker values produce weaker reflections and lighter values intensify reflections.
  • Try to keep the number of environment maps used per cloth item to as low as possible. This will ensure optimal renderer performance in Blue Mars.

  • Detail Maps

Detail maps are used to tile a normal map across an item. Essentially, adding another layer of high resolution mimicry. Often times, detail maps will be tiled multiple times across an object's surface, but they can also be scaled to create a general surface noise by setting the tile values to positive numbers less than 1.

How To Make

  • A detail map can be made using the same methods described for normal maps.
  • For best results, detail maps should be a tileable texture maps.
Note: A normal map must be assigned and Detail bump mapping checked under Shader Generation Params before a detail map can function properly.

Combining texture maps in the cloth item's sub-materials will produce different results:

File:Cloth MaterialWithDiffuse.jpg
File:Cloth MaterialWithDiffSpec.jpg
File:Cloth MaterialWithDiffSpecNorm.jpg

Packing A Cloth Item


Before the cloth item can be uploaded to the Blue Mars database, an itemdata.zip file must be generated. The Cloth Editor provides a simple Pack function which will generate the itemdata.zip file.

How To Avoid Missing Texture Maps
Note:
  • This Pack function will only locate and include files which are in the same directory, sub-directories are also ignored, as the currently loaded cloth asset.
  • The itemdata.zip file must be no larger then 512K.

To ensure that the cloth item's material file does not reference any texture files that are outside of the cloth item's directory, there is a function in the Cloth Editor that will collect any texture files in the material, place them in the same directory as the cloth item and update the file path referenced in the material editor.

  • When the cloth item is ready to be packed, open the item's .chr file (File > Open). The item cannot be attached to the avatar when collecting texture files.
  • With the .chr loaded and selected in the Cloth Editor, select Tools > User commands > Copy textures to project folder
  • Now all texture files referenced by the .chr's material should be located in the project folder, and the .mtl file will updated to reference the collected texture files.
Generating An Itemdata.zip File in the Cloth Editor
  • Attach the cloth item to the avatar.
    • The item must be the most recently attached item. If another cloth item, say a purse, is attached after this item, then the purse will be the object packed into the itemdata.zip.
    • If the item has not be detached since the Create And Attach process, and no other cloth items have been attached after this item, then the item can be packed.
  • From the Cloth Editor's main toolbar, select Cloth > Pack cloth for upload
  • At this point there should be an itemdata.zip file located in the same directory as the cloth item as well as an icon.tga file which can be used for a thumb reference of the item on the developer MyPage.
Creating Your Own Icon.tga File
  • Make the render window's dimensions as close to equal as possible. You can adjust the render window's dimensions by click-dragging the boarders of the Cloth Editor. The dimensions are displayed in the upper right corner of the render window.
  • Position the camera to take the desired shot.
  • From the Cloth Editor's main toolbar, select Tools > User commands > Screen capture

Uploading A Cloth Item


Once a cloth item and its assets have been packed into an itemdata.zip file that is less than 512K, the item is ready to be uploaded to the Developer MyPage for quality assurance testing and then distributed from a shop in Blue Mars.

Navigating to the the Developer MyPage
  • With the Cloth Editor open, select Cloth > Open upload page from the main toolbar, and your default web browser will automatically open a new page to the developer MyPage login.
OR
Uploading A Cloth Item to the Developers' MyPage
  • Once logged into the developer MyPage, select the CONTENTS tab.
  • Select the Upload Content button, and an Upload Content window should appear.
  • In the Upload Content window:
    • Add the icon.tga file generated during the cloth packing process by clicking the Select File button next to Thumbnail.
    • Add the itemdata.zip file generated during the cloth packing process by clicking the Select File button next to itemdata.zip.
    • The left drop down box next to Category should be set to WEARABLE, and the right drop down box should set to the category which most closely matches the Style and Asset categories used to generate the cloth item in the Cloth Editor.
    • Supply the desired name for the item in the Item Name text input box.
    • The Brand Name category can be any name.
    • City Limit is currently has only one option, Worldwide, meaning that there are no available restrictions for where the item can or can't be worn in Blue Mars.
    • The 'Description text box can be used to supply any information about the item to users in world.
    • Price(BLU) is what the users will have to pay in world to purchase the item.
    • Total Copies is the number of times this item can be sold in world. There are no limits on the number of times an item can be re-uploaded, so if an item is sold out it can be replenished if the developer desires.
    • The Note(Optional) field is for the developers own use and
    • Once satisfied with the Upload Content fields, select the Submit button to begin uploading the item.
  • A message box should appear notifying the developer of the upload completion status, and if no errors occurred, then the item will be displayed in the Your Contents list under the Contents tab.
  • An automatically generated email will be sent to the developer notifying them that the quality assurance process began and that they will be notified when the QA is complete.
  • Once the item successfully passes QA, the item is ready to be assigned to a shop's shelf for sale in a Blue Mars city.
Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools