This page provides information about the V-Ray Image to Tiled Multiresolution EXR converter standalone tool.


Overview


This tool can be used to convert a variety of image files to tiled multiresolution .exr files in OpenEXR format. The resulting tiled OpenEXR textures can be used in V-Ray for 3ds Max through the VRayHDRI texture or directly in V-Ray for Maya, Modo, V-Ray Standalone, etc.



Location



  • Windows: start the img2tiledexr executable from C:\Program Files\Chaos Group\V-Ray\host application\vray\bin\
  • Linux: start the img2tiledexr executable from /usr/ChaosGroup/V-Ray/host application/vray/bin/
  • macOS: start the img2tiledexr executable from /Applications/ChaosGroup/V-Ray/host application/vray/VRay.app/Contents/MacOS


Supported Formats


Supported input image formats are:

V-Ray image file (*.vrimg)
Portable Network Graphics (*.png)
Windows bitmap (*.bmp)
Targa image file (*.tga)
Radiance HDR image (*.hdr)
Silicon Graphics (*.sgi, *.rgb, *.rgba)
JPEG image file (*.jpg, *.jpeg, *.jpe)
OpenEXR image file (*.exr)
Softimage PICT file (*.pic)
Tagged image file format (*.tif, *.tiff)
Photoshop (*.psd)


GUI Usage


Running img2tiledexr without any parameters or from the Start menu opens the GUI version of the tool, as seen in the Overview section. The GUI allows you to convert one or a number of image files to tiled multiresolution OpenEXR files.


Pixel type Specifies whether the data in the .exr file is saved as 16-bit or 32-bit floating point numbers.

Compression type – Sets the compression type, choosing between the several available methods. If not specified, the ZIP method is used.

  • None
  • RLE - run length encoding
  • ZIPS - one scanline at a time
  • ZIP - in blocks of 16 scanlines
  • PIZ - piz-based wavelet compression
  • PXR24 - lossy 24-bit float compression
  • B44 - lossy 4x4 pixel compression, fixed rate
  • B44A - lossy 4x4 pixel compression
  • DWAA - lossy DCT-based, blocks of 32 scanlines    
  • DWAB - lossy DCT-based, blocks of 256 scanlines       

DWA compression level A floating-point value that controls the compression level when using the lossy DWA compression methods.

Linear Specifies if the input image should be converted from sRGB to linear color space when saved into the tiled OpenEXR file. Possible values are: off (no conversion), on (convert colors from sRGB to linear space), and auto (convert all images except  .hdr  and  .exr  files).

Color Mode – Specifies whether to create a color EXR file (with RGB channels) or a grayscale EXR file (with Y channel). When set to Auto, the image can be checked if it actually contains alpha and/or color data, and the output channels can be optimized, writing only the needed channels.

Tile size – Sets the dimensions of a squared tile.

Conversion type Selects the type of conversion to be performed.

  • Single file – Only a single file is converted. 
  • Multiple files – Multiple files are converted at once.

Input file – Specifies the image file when Single file is selected as the Conversion type.

Input dir – Specifies the input files' directory when Multiple files is selected as the Conversion type.

Output dir – Specifies the output directory for the tiled .exr files when Multiple files is selected as the Conversion type.

Wildcard – Specifies a search pattern for the input file names. Wildcards (*) can be used to define the pattern.

Subdirectories – When this option is enabled, all image files contained in subdirectories of the specified input directory are also converted.

Convert Starts the conversion.

Command Line Usage


There are three methods for running the img2tiledexr from the command line:

If you type just

> img2tiledexr

on the command line, this is the same as double-clicking the file.

Converting a single image file to a single .exr file:

> img2tiledexr <image_file> <exr_file> [options]

In this case, the <image_file> cannot contain wildcards. Note that the .exr extension is not added automatically to the output file name.

Converting multiple image files to multiple .exr files:

> img2tiledexr <image_wildcard>  [output_dir] [options]

In this case, <image_wildcard> can contain the wild-card symbols '*' and '?'; the image files are automatically converted to OpenEXR tiled multiresolution files with the .exr file extension. Optionally, you can specify in <output_dir> the directory of the output files. If not specified, the output files are written to the input directory.

Caution!  Under Linux and macOS, parameters with wildcards must be enclosed with apostrophe symbols - 'image_wildcard'. Otherwise, the command line shell automatically expands the wildcard into the file list, which forces the program to terminate.

In all cases, the original image files are not deleted.

The postfix  "_tiled"  is added to the file name if you use wildcards.

Note that many applications expect the colors in OpenEXR files to be in linear color space rather than sRGB/gamma 2.2 color space. For this reason, img2tiledexr automatically converts the colors in the input image from sRGB to linear space for all image file formats except  .hdr  and  .exr  images. You can use the -linear option to control this conversion.


Options


One or more of the following options may be specified:

OptionDescription
-32bitStores the floating-point data in the .exr file as 32-bit floating-point numbers. If this option is not specified, the data is stored as 16-bit floating point numbers.

-half

Stores the floating-point data in the .exr file as 16-bit floating-point numbers. This is the default.
-rgbCreates color EXR file with RGB channels.
-grayscaleCreates grayscale EXR file with Y channel.
-compression <method>Sets the compression type for the resulting .exr file. If not specified, ZIP compression is used. Currently supported values for <method> are: none, rle, zips, zip, piz, pxr24

-dwaCompressionLevel <level>

A floating-point value that controls the compression level when using the lossy DWA compression methods.
-tileSize <size>Set in <size> the dimension of a square tile. If not specified, the default tile size is 64x64.
-linear <mode>Specifies if the input image should be converted from sRGB to linear color space when saved into the tiled OpenEXR file. Possible values are: off (no conversion), on (convert colors from sRGB to linear space), and auto (convert all images except  .hdr  and  .exr  files).
-help Print the help message.