Table of Contents
- Autodesk Maya i3d exporter
- Autodesk 3ds MAX i3d exporter
- Blender i3d exporter
Autodesk Maya i3d exporter
To generate i3d files of your 3d-models you can use the exporter plugin for Autodesk Maya. The GIANTS Editor and the GIANTS Engine can only load i3d files. This section of the documentation will show you, how to export i3d files with the I3D exporter plugins in Autodesk Maya.
The first thing you probably want to do is to install the exporter plugins in Autodesk Maya.
Installing I3D exporter pluginStep 1
Place the files I3DExportUI.mel and I3DExporter2014-x64.mll into the folder "C:/Documents and Settings/<USERNAME>/My Documents/maya/scripts".
Start Maya and open the Script Editor window.
Select custom shelf tab
Type the following commands in the lower portion of the Script Editor:
- Maya don't like backslashes so replace them with slashes.
- Replace <USERNAME> with your username.
- The file path can be different depending on the language of your operating system (eg. C:/Documents and Settings/<USERNAME>/My Documents/maya/scripts/I3DExporter2014-x64.mll)
Copy the I3D_icon.bmp into the folder "C:/Documents and Settings/<USERNAME>/My Documents/maya/2014/prefs/icons". Edit shelf to replace the default icon with the one enclosed.
Preparing your 3d-model for exportBefore you can actually use the exporter, it’s wise to check certain things with your 3d-model in Maya which can cause issues later in the editor or the engine.
In the Channel-Box you see the transformations of your selected object.
The ScaleX, ScaleY and ScaleZ of your object should be 1 1 1.
If you just plan to use this object as a static mesh or with no physics at all you could export it with any scale you want, but if you want to simulate your object in the engine (as a dynamic or kinematic rigid body object) the scale must be 1 1 1 otherwise the physics simulation will produce incorrect results.
If you have an object with scale, you can easily get rid of the scale. Go to the Modify-Panel, and select the option box right of the Freeze Transformations. The Freeze Transformations dialog window opens. You can select the checkbox scale and hit apply.
Note: Please refer to the artwork guide for further information about asset conditioning for the engine.
I3D exporter usageStart the exporter dialog with a click on the I3D exporter icon you have created on your custom shelf (see Installing I3D exporter plugins)
The export panel is quite self-explanatory. In the export options part you can include and exclude parts from exporting (IK, Animation, Shapes, Nurbs Curves, Lights, Cameras, Particle Systems and/or Default Cameras). The Shape Export Subparts section allows you to control which subshape attributes are exported (Normals, vertex Colors, Texture Coordinates and/or Skin Weights).
The miscellaneous section has this options:
- Verbose, display verbose information in output window during the export
- Relative Paths, generate relative paths for texture files
- Float Epsilon, truncate values within epsilon range to zero. Epsilon: [-1e-5, 1e-5]
- Preview, exports whole scene to a temporary file and starts the editor
- Export All, exports the whole scene
- Export, exports only currently selected objects
In the attributes panel you can load and save attributes of your objects those attributes will be saved into the Maya file and are translated into the correct i3d attributes when you export to a i3d file.
The first thing you have to do here is, that you must press the "Load Current" button at the bottom in order to load the attibutes of your object. Otherwise everything is unchecked and is not showing the attributes that are currently active on you object. So be sure, to hit this button first.
Here you can see the name of your current working object.
This section handles all the attributes regarding to physics rigid bodies.
Here you can define your joint-attributes in detail. One thing you might miss here are the joint limits, they must be defined within Maya, since your object can have many joints with different limits. You can define the limit of a joint angle by the limit informations of your transform-object.
- Occlusion Culling, Objects that are entirely covered by other objects may be culled and thus not rendered at all. This option can increase the rendering performace in the engine if you have big objects containing much smaller objects, for instance a house. If you activate the occlusion culling on the root-node of the house all its childs are also not rendered, if the house is complete covered behind other objects. However, you should not apply this attribute on too many small objects because it is one more task for the engine.
- Non Renderable, With this option a objects will not be rendered at any time. Use this option for collision geometry. If you have complex objects with sub-objects attached, be careful with this checkbox since this attribute is also going to affect all the attached children.
- Clip Distance, This value defines how far the object is still going to be rendered. If you have a large scene and tons of objects this is a powerful method to keep your framerate high.
With this panel you can validate if one of your objects have an incorrect pivot. In Maya your pivot can have a local and a world space attribute which you can find in the attribute editor on the right side. The x y and z values of both, local and world-space have to be 0 0 0 otherwise you will get a warning. You can fix incorrect pivots with the FreeezeToPivot option in the tools panel.
If you have validated your objects and a local pivot was not set to 0 0 0, you can quickly fix affected objects with the FreeezeToPivot button.
Material export optionsMapping between Maya and i3d material attributes
- Custom Shader: Use the attribute name 'customShader' with a string type to add a custom shader to the material.
The value specifies the path of the custom shader xml file relative to the maya file.
- Custom Shader Parameter: Use the attribute name 'customParameter_<parameterName>' with a string type to specify the value of a custom shader parameter. The values should be space separated.
<parameterName> is the name of the parameter as specified in the custom shader.
- Custom Shader Texture:: Use the attribute 'customTexture_<textureName>' with a string type to specify the texture of a custom shader texture.
The value specifies the path of the texture file relative to the maya file.
<textureName> is the name of the texture as specified in the custom shader.
Autodesk 3ds MAX i3d exporter
Installing I3D exporter plugin
Copy the plugin file into this directory:
%3DSMAX installation path%/plugins/
On a Windows 7 (english version) this would be the path C:\Program Files\Autodesk\3ds Max 2014\plugins for example.
How to export your 3ds MAX documents as I3D
Simply select "Export" from the file menu within 3DS max and select "GIANTS I3D (*.i3d)" as the file type. After selecting the output file, you'll be prompted with the export options dialog.
Export options dialog
The export options dialog will present you with important options. These control how your scene file is exported:
These options are available:
- Will export scene geometry
- Will export point, spot and directional lights
- By default, empty transform groups (without meaningful childs) are ignored. Check this to disable omission of empty transform groups during export
- Will export camera nodes
- Will export animations
- Check this to add per-vertex normal to the exported scene geometry
- Check this to add per-vertex texture U/V coordinates to the exported scene geometry
- Check this to add per-vertex colors to the exported scene geometry
- If checked, the resulting I3D file will be opened (usually the GIANTS editor will open it, but if it is not installed you'll be prompted to select a program to open the file with)
- Enables relative paths for texture references. If enabled, all texture paths are relative from the I3D target path. Of course, all textures should reside on the same drive or you'll get absolute paths anyways.
- Forces small values near zero to be rounded to zero.
- The timeline is samples each frame instead just at keyframe positions. Use this if you have extremely sparse curve keys (bezier, etc.), as the engine won't make use of the keyframe tangents
- Will remove keyframes which are not relevant (e.g. when three equal positions occur in a row, the middle one could be omitted)
- Will load an animation definition from a text file (you'll be prompted with a file selector)
- Enter animation clip definitions here (see below for format explanation). Used only when animation export is actually enabled
- Hit this button to actually export the I3D
- Cancels export process
To export animations, the 3ds MAX timeline has to be split into individual clips. This is accomplished by entering textual information into the "Animation Definition" text field or load this information from a text file. The textual information defines one clip per line. Comments can be inserted by prefixing the line with a hash. Example:
# The line format is: # clipname firstframe lastframe # Frame numbers are inclusive: [firstframe, lastframe] # Walking animation walk 0 30 # jumping animation jump 31 60 # running run 61 120
This animation definition will divide the 3ds MAX timeline into three clips named "walk", "jump" and "run" which can be accessed individually in the I3D.
The I3D exporter will act unit-agnostic and react to the unit settings in your 3ds MAX scene file. If configured properly, the output file will always have the right scaling.
I3D custom attributes
The export plugin also exposes custom attributes to configure special I3D flags for nodes in the scenegraph. To change flags and options for a specific nodes, the I3D attributes have to be attached to the node. To do this, enable the "I3D Utilities" panel, which will present you with a big "Add I3D attributes" button. All you have to do then is to select a node and hit the button. There is a separate set of attributes for lights, as they have other options than the normal nodes.
Supported node attributes
Here, all supported attributes of 3ds MAX nodes are depicted. Values from the I3D rollouts are always supported, values from the stock attributes are marked with a number and explained below.
To find out more about the actual meaning of the attributes in the I3D please consider the I3D documentation.
Generic I3D attributes
- FOV angle
- Near clip plane
- Far clip plane
- Light type
- Light color
- Inner cone angle
- Outer cone angle
- Attenuation distance
- I3D specific attributes
- Ambient color
- Diffuse color
- Specular color
- Specular level
- Glossiness / specular power
- Albedo map
- Bumpmap opacity controls bump depth for I3D material
- Opacity maps to the alpha channel of the I3D material diffuse color
The I3D exporter will automatically fetch material information from the 3ds MAX standard material. The ambient, diffuse and specular colors as well as the specular power (glossiness) and specular level are directly transferred into the I3D material. The opacity level will be exported as the alpha channel of the diffuse color. From the texture map channels, the diffuse channel defines the albedo map, either the specula, shininess or shininess strength channel is used as the gloss map and the bumpmap channel is uses as the normalmap. The bumpDepth parameter of the bumpmap is derived from the opacity of the bump map channel and is calculated as bumpDepth = opacity * 3.3333
Node export order
As 3ds MAX does not allow strict ordering of nodes on the same hierarchy level, the I3D exporter will sort the nodes by their names. Because it's not always wanted that nodes are named awkwardly, the I3D exporter allows for prefixes in the form "prefix.name" (.e.g "A.house", "B.house", "C.house", ...). The part before the dot and the dot itself will be removed from the node name in the exported I3D (so the examples will all be named "house" in the I3D file). That way, you can choose the export order by changing the prefix without being worried that you have to mangle the names in the I3D.
To define LODs for a specific node, you'll have to attach the I3D attributes to it. The LOD view distances can be defined there. The actual geometry nodes must be directly parented under the LOD node and sorted descendent by their LOD level. So, if "LODHouse" is the node with the LOD attributes configured to have 1 additional LOD, you'll need "A.house" and "B.house" parented to the "LODHouse" node. A.house will become the first LOD and B.house the second LOD level.
Blender i3d exporter
Installing I3D exporter plugin (Windows)
- Install Blender 2.6.2 32 or 64bit or higher here: http://www.blender.org/download/get-blender/
- Extract the io_scene_i3d folder from the exporter zip archive and place it in your Blender addons folder. Example addons folder path: C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons
- Launch Blender and go to "File -> User Preferences...".
- Click on "Install Addon..." in the "Addons" section.
- Browse to the io_scene_i3d folder previously extracted. Example path: C:\Program Files\Blender Foundation\Blender\2.62\scripts\addons\io_scene_i3d
- Select the file __init__.py and click "Install Addon...".
- Select and enable the "Import-Export: I3D format" addon in the right list. Hint: Apply the "Community" and "Import-Export" filters on the left for less items to browse.
- Click on the "Save as Default" button to automatically load the addon each time you launch Blender.
- Now, you can export with "File -> Export" to "GIANTS (.i3d)".
Autodesk 3ds MAX and Autodesk Maya are registered trademarks of the Autodesk Corp.