CubeMapGen v1.4
A Cubemap Filtering and Mipchain Generation Tool
GPG Developer Tools
gputools.support@amd.com
A visualization of low resolution cubemap miplevels generated using the CubeMapGen tool.
4x4
4x4
8x8
8x8
16x16
16x16
32x32
32x32
© 2006–2011 Advanced Micro Devices, Inc. All rights reserved.
The contents of this document are provided in connection with Advanced Micro
Devices, Inc. (“AMD”) products. AMD makes no representations or warranties
with respect to the accuracy or completeness of the contents of this
publication and reserves the right to make changes to speci#cations and
product descriptions at any time without notice. The information contained
herein may be of a preliminary or advance nature and is subject to change
without notice. No license, whether express, implied, arising by estoppel or
otherwise, to any intellectual property rights is granted by this publication.
Except as set forth in AMD’s Standard Terms and Conditions of Sale, AMD
assumes no liability whatsoever, and disclaims any express or implied
warranty, relating to its products including, but not limited to, the implied
warranty of merchantability, #tness for a particular purpose, or infringement of
any intellectual property right.
AMD’s products are not designed, intended, authorized or warranted for use as components in
systems intended for surgical implant into the body, or in other applications intended to support or
sustain life, or in any other application in which the failure of AMD’s product could create a
situation where personal injury, death, or severe property or environmental damage may occur.
AMD reserves the right to discontinue or make changes to its products at any time without notice.
© 2006–2007 Advanced Micro Devices, Inc. All rights reserved.
2
Synopsis:
Despite the fact that cube maps are defined on the spherical domain, standard cubemap
mipchain generation techniques perform filtering independently on each cube face. The
main problem with this approach is that no information is propagated across edges, thus
creating undesirable discontinuities along the cube face edges. A limitation of nearly all
cube mapping hardware which makes the seam problem substantially worse is the fact
that the bilinear texel filtering is not able to fetch across cube faces thus producing a hard
seam artifact in addition to introducing aliasing artifacts. These two compounding
problems limit the usefulness of cubemapping.
Our pre-processing approach alleviates this problem using two techniques. The first,
angular extent filtering, defines each tap’s filter kernel using an angular extent around the
center tap as opposed to a fixed per-face pixel-based extent. The advantages of angular
extent filtering are that the filtering kernels used for all taps have a constant solid angle as
well as have the ability to pull texels from multiple faces. In addition to this, the filtering
takes into account the solid angle subtended by each tap in the filter. Also, by varying
the angular extent of the filter used to generate the base mip-level, pre-convolved
reflections for a variety of materials can be precomputed.
The second technique, edge seam fixup, uses a per mip-level seam averaging and
smoothing algorithm in order to effectively hide the seam artifacts. This enables the
lower-resolution cubemap miplevels (even 2x2 and 4x4) to be directly used for tarnished
metal shaders, matte surfaces shaders, and even for diffuse lighting. In addition to this,
by providing good quality cubemaps throughout the mipchain, miplevel selection via the
texCUBEbias, and texCUBELOD instructions can be used for selective blurring.
CubeMapGen is a tool for importing, filtering, visualizing, and exporting cubemaps, its
list of features include:
Cubemap Filtering and MipChain Generation: Angular extent filtering and edge seam
fixup provides new high quality filtering results for prefiltered environment mapping, and
cubemap mipchain generation.
Interactive Cubemap Assembly: Cubemaps can be assembled from separate face
images that can be loaded into each cubemap face and interactively flipped vertically,
horizontally, and diagonally in order to align the faces.
Cubemap Import: Import entire cube maps from HDRShop vertical cross cubemap
images, DirectX .dds cubemap files, and separate image files
Cubemap Export: Export cubemap with mipchain to single .dds file, cube cross images
for each mip level, or a collection of separate images for each cubemap face for each mip
level. Also supported is a specialized DXT compressor which allows for the creation of
seamless DXT compressed cubemaps.
© 2006–2007 Advanced Micro Devices, Inc. All rights reserved.
3
Command Line Interface: Allows you to use CubeMapGen as a command line tool for
processing cubemaps in scripts and batch files.
HDR Image Support: All filtering is performed in high dynamic range.
HDRShop v1.0 plugin functionality: CubeMapGen also functions as an HDRShop
plugin that provides the filtering functionality of CubeMapGen to HDRShop.
© 2006–2007 Advanced Micro Devices, Inc. All rights reserved.
4
Revisions for Version 1.4:
* Prepare source code for public release
* Added Visual Studio 2008 solution and project files
* DXT support removed due to licensing restrictions
* The project files now reference the DXSDK_DIR environment variable, so the
Microsoft DirectX SDK must be installed or the environment variable defined.
Revisions for Version 1.3:
* Removed 1k x 1k texture limit
Revisions for Version 1.2:
* Updated user interface
* Removed unsupported use of shader model 1.1; now uses 2.0
* Updated icons
Revisions for Version 1.1:
* Added -consoleErrorOutput option to command line, to output messages to the
command line instead of using message boxes.
* Fixed –importCubeDDS -importCubeCross command line options.
* Added 24-bit bitmap support to complement existing 32-bit bitmap support.
* CubeMapGen now generates exit codes that reflect whether or not the application
terminated normally, or because of an error. See section “Exit Codes for Command
Line Mode” for more information.
* Added button to reset input cubemap to default color cube.
* Added “CenterBB” checkbox to resize and re-center current object based on bounding
box.
Requirements:
-A graphics card capable of pixel shader model 2.0 for interactive mode.
-DirectX 9.0c (and the DXSDK_DIR environment variable is defined)
-At least 128MB of RAM.
© 2006–2007 Advanced Micro Devices, Inc. All rights reserved.
5