Photoshop Texture Converter
Microsoft DirectX 9.0 SDK Update (October 2004)

Photoshop Texture Converter


The Photoshop texture file converter is a file format plug-in to Adobe Photoshop World Wide Web link to open or save texture files. The plug-in will also work with Jasc PaintShop Pro World Wide Web link. The following are the available input and output formats: See D3DXIMAGE_FILEFORMAT for more information on these texture file formats.

Requirements

Minimum Operating SystemMicrosoft Windows 2000
Required Applications

Installation

The texture converter plug-in is automatically installed when you install the DirectX 9.0 software development kit (SDK). The installer checks for valid versions of Photoshop or PaintShop Pro and copies the D3DXTextureFormat.8bi file to the application plug-in folder.

User's Guide

The texture plug-in allows you to open or save files in Photoshop in any of the nine texture file formats listed above. Similar procedures can be used in PaintShop Pro.

Opening a Texture File

Follow these steps to open a texture file.

  1. In the Photoshop File menu, select Open... or Open As....
  2. In the Files of type list at the bottom of the dialog box, select the following format:

    D3DXTextureFormat(*.BMP;*.DDS;*.DIB;*.HDR;*.JPG;*.PFM;*.PNG;*.PPM;*.TGA)

  3. Select the file you want to open, and either double-click the file icon or click the Open button. The texture file is now available to edit in Photoshop.

If more than one mip level is available in the mipmap, the following dialog box will appear.

Mip level dialog box

The Open entire file option is the default selection. If this option is selected, all mip levels are joined together in a single Photoshop 2-D image display.

Display of all mip levels

You can then edit any or all of the mip levels in Photoshop. Alternately, you can select Open a particular mip level if you want to edit only one mip level in Photoshop, for example the 128x32 pixel level shown here.

Display of the 128x32 pixel mip level

If the file to be opened is a cube or volume texture, a similar dialog box will appear that lets you select a view of all cube faces or volume slices simultaneously, or one at a time. Mip levels of a cube or volume texture are not available for display with this plug-in.

Note  It is not recommended that you open a texture file by right-clicking it and selecting Open With and then Adobe Photoshop.
Warning  When you use the plug-in with PaintShop Pro to open a texture file that contains an alpha channel, PaintShop Pro will multiply each of the RGB channels by the alpha channel and then will discard the alpha channel. If the input texture has an XRGB surface format (D3DFMT_X8R8G8B8, D3DFMT_X1R5G5B5, D3DFMT_X4R4G4B4, or D3DFMT_X8B8G8R8), this behavior results in an empty texture being saved.

Saving a Simple Texture File

Complete the following steps to save a texture file to any supported format except .dds.

  1. In the Photoshop File menu, select Save As....
  2. In the Files of type list at the bottom of the dialog box, select the following format:

    D3DXTextureFormat(*.BMP;*.DDS;*.DIB;*.HDR;*.JPG;*.PFM;*.PNG;*.PPM;*.TGA)

  3. Select the directory location where you want to save the file.
  4. Type in the name of the file to save, along with the three-letter file extension (any supported format listed above except .dds). You may overwrite your original file.
  5. Click the Save button.
  6. The following dialog box will appear.

    Simple texture file save dialog box

    Select the pixel format from the list of available formats at the bottom of the dialog box. No other save options will be available in this dialog.

  7. Click OK to save the file.

Saving a DDS File

Follow these steps to save a texture file to .dds format.

  1. In the Photoshop File menu, select Save As....
  2. In the Files of type list at the bottom of the dialog box, select the following format:

    D3DXTextureFormat(*.BMP;*.DDS;*.DIB;*.HDR;*.JPG;*.PFM;*.PNG;*.PPM;*.TGA)

  3. Select the directory location where you want to save the file.
  4. Type in the name of the file to save, along with the .dds file extension.
  5. Click the Save button. The following dialog box will appear.

    DDS texture file save dialog box

  6. Make selections for the type of texture to save.
    • If you select the Cube map or Volume texture, then you can also click the checkbox to duplicate the image on all cube faces or volume slices.
    • If you select a Volume texture, then in the Depth box type in the number of volume slices you want the volume texture to contain.
    • If you select Cube map but your texture file format is not square, a warning message will appear noting that the image will be cropped to be a square format.
  7. From the list of available mip levels, select the number of mip levels you want the new texture file to contain.
  8. From the list of available formats, select the pixel format in which to save the file.
  9. Click OK to save the file.

Note  To avoid generating invalid results, the plug-in does not allow saving a full volume as a cube, or a full cube as a volume.

Resizing and Saving a Texture File

If you change the image size of an individual mip level in Photoshop and then try to save the file using Save from the Photoshop File menu, an error message will appear and the file will not be saved. You should instead try one of the following procedures:



© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.