There are three steps to texturing a model:
- Load up image files in Blender's UV/Image Editor window
- UV map faces on one or more meshes to any loaded image using the 3D view's edit mode and the texture selection pulldown
- Set up the desired material properties for each UV mapped image (texture) in the materials tab of the exporter user interface. For more information on each option see: User Interface Overview - Materials Tab, and DTS Materials - Material Options.
There is no need to create blender materials, just UV map the faces you want textured to whatever image(s) you desire using the U/V image editor and the edit mode of Blender's 3D view.
For more detailed instructions on mapping UV/Images to faces on a mesh, see Blender Survival Guide - Mapping images to faces in a mesh.
Notes:
- The exporter doesn't care about Blender materials, only about which faces are UV mapped to which images. The use of Blender materials to set up DTS materials is deprecated.
- Blender materials are only looked at by the exporter as a fallback for backwards compatibility when no UV mapped textures are present for a given face in a mesh. Default DTS material settings are only pulled from Blender material settings once, the first time a Blender material is found. After that, the settings in the exporter's materials panel are authoritative.
- Different textures can be assigned to different faces on a mesh, but each individual face may have only one texture assigned to it (not counting secondary textures such as detail maps). Half of a triangle cannot be mapped to one image while the other half is mapped to a different image. This is a limitation of the major graphics APIs that are in use today (OpenGL and Direct3D) and not of the exporter.
- Textures must be power of two sized: 512x512, 256x256, 1024x1024, 512x1024, 512x256, etc. Non-power of two sized textures will not render properly on many graphics cards when mapped to 3d geometry.
- In Blender 2.46 the UV Face select mode of the 3D view was removed. Assigning textures to faces is now done using the edit mode of Blender's 3D view.
The material list in the exporter GUI is populated by scanning all meshes in the normal (visible) detail levels for UV mapped textures and using the names of the actual image file(s) mapped to the faces. If there happens to be a Blender material with the same name as a UV mapped image, default material settings are pulled from the Blender material (but only once, the first time the exporter is run for that file).
File extensions are automatically stripped from exported image names. For example, an image loaded in Blender's UV/Image editor window with the name "MyTexture.is.cool.jpg" is exported as a reference to the material "MyTexture.is.cool" within the dts file. The stripping of image file extensions is necessary because of the way Torque searches for images when it loads a dts file. It also allows for changing the file type of an image without needing to re-export all dts files that depend on that image.
UV Mapping tutorials for Blender can be found here:
en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/UV_Map_Basics
www.blender.org/tutorials-help/video-tutorials/modelmateriallight
See Also: