Preparation
Maya ® is a 3D computer graphics software currently owned and developed by Autodesk, Inc. A 30-day-trial version can be downloaded here.
Download "DeltaEngineSimpleShaderForMaya2010-2014.fx" and the png image file "BoxDiffuse.png".
Launch Maya (Version 2010 or higher).
Scene Setup and Box Creation
Open the Plug-in Manager (Windows > Settings/ Preferences > Plug-in Manager) and make sure following plugins are loaded:
cgfxShader.mll, ddsFloatReader.mll, hlslShader.mll
Go to Window > Settings/ Preferences > Preferences > Settings. Under World Coordinate System, set Up axis to Z and under Working Units, set Linear to centimeter.
Create a cube (Create > Polygon Primitives > Cube > ). Set Width, Height and Depth to 100. At this point, your object is probably being displayed in wireframe. To change this, hit 5 on you keyboard to turn on Shaded display. (A list of all display hotkeys can be found here.)
Open the Channel Box ( Push this button on the top right corner to open it). Set Translate X, Y and Z to 0, so the object is centered. Give the object a meaningful name (e.g. Box).
Texture Mapping and Applying The Shader
Open the Hypershade (Window > Rendering Editors > Hypershade). Create a HLSL Shader. With the box selected, right-click the shader node and „Assign Material to Selection“. In the Attribute Editor , connect the „DeltaEngineSimpleShaderForMaya2010-2014“ file to the shader. Assign the Diffuse Texture (BoxDiffuse.png) by clicking the checkerbox icon beneath the corresponding slot.
Press 6 on your keyboard to turn on „Shaded and Textured display“, so you can textures on objects in viewport.
Open the UV Texture Editor (Window > UV Texture Editor). Right-Click the Box in the Viewport, Choose „Face“ from the pop-up menu that appears and drag a selection box around it, so that all faces are selected. Now you will automap the Uvs. To do this, go to „Create Uvs > Automatic Mapping > “. (Note: This menu point is only visible when the Polygons-Menu set is active, see the dropdownbox on the left side to the Status line.)
In the „Polygon Automatic Mapping Options“-Dialog, turn on following settings:
Planes = 6
Shell Layout = Overlap
Scale Mode = None
Create new UV set = Unchecked
And hit Project. On some faces, the images are not adjusted as they should be. To fix this, select these faces on the box in the viewport and rotate them with the „Rotate selected UVs clockwise/ counterclockwise“-buttons in the UV Editor until they are in the right positon. At this point, i recommend to delete the history (Edit > Delete By Type > History).
Exporting the box as FBX
Select the Box, go to File > Export Selection > . Under „General Options“, set the File type to „FBX export“. Use "Box" as filename. In the Export Dialog under "Axis Conversion", make sure the Up Axis is set to Z-up.