1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css"> 8<TITLE>tg-parabolicmap</TITLE> 9</HEAD> 10<BODY> 11<H1 align="left">tg-parabolicmap</H1> 12 13<H2>Description</H2> 14<P><code>tg-parabolicmap</code> illustrates one method for converting a cube map into a dual paraboloid map. Dual paraboloid maps can be used for reflection mapping. The advantage of dual paraboloid maps over sphere maps is that they do not need to be rerendered when the viewpoint changes. Of course, if the environment itself is changing, you will need to regenerate the map.</P> 15<P>This demo creates a dual paraboloid map by projecting each face of the cube map onto a sphere. In this case, the normal vectors of the sphere are actually reflection vectors. The reflection vectors are projected into texture coordinates that warp the texture of the cube map onto the surface of the sphere.</P> 16<P>This demo has controls that help visualize the steps that are required to generate the dual paraboloid map. These steps include clipping the +q coordinate of the projected texture and generating a composite alpha for each individual map. Two sets of prerendered cube maps are provided: One that has labels for left, right, top, bottom, back, and front, and another that is taken from the <em>courtyard</em> database.</P> 17<H2>Coverage</H2> 18<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640"> 19 <TBODY> 20 <TR> 21<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Function</STRONG></EM></TD> 22<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD> 23<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD> 24 </TR> 25 <TR> 26<TD width="30%" rowspan="3"><A href="../../../gx/Transform/GXLoadTexMtxImm.html"><FONT face="Courier New">GXLoadTexMtxImm</FONT></A></TD> 27<TD width="25%">Matrices</TD> 28<TD width="45%">Appropriate projection matrix.</TD> 29 </TR> 30 <TR> 31<TD width="25%">Matrix destination</TD> 32<TD width="45%"><FONT face="Courier New">GX_TEXMTX0</FONT></TD> 33 </TR> 34 <TR> 35<TD width="25%">Types</TD> 36<TD width="45%"><FONT face="Courier New">GX_MTX3x4</FONT></TD> 37 </TR> 38 <TR> 39<TD width="30%" rowspan="4"><FONT face="Courier New"><A href="../../../gx/TexCoordGen/GXSetTexCoordGen.html">GXSetTexCoordGen</A></FONT></TD> 40<TD width="25%">Destination coordinates.</TD> 41<TD width="45%"><FONT face="Courier New">GX_TEXCOORD0</FONT></TD> 42 </TR> 43 <TR> 44<TD width="25%">Generation type.</TD> 45<TD width="45%"><FONT face="Courier New">GX_TG_MTX3x4</FONT></TD> 46 </TR> 47 <TR> 48<TD width="25%">Generation source.</TD> 49<TD width="45%"><FONT face="Courier New">GX_TG_POS</FONT></TD> 50 </TR> 51 <TR> 52<TD width="25%">Matrix source.</TD> 53<TD width="45%"><FONT face="Courier New">GX_TEXMTX0</FONT></TD> 54 </TR> 55 </TBODY> 56</TABLE> 57<H2>Operation Method</H2> 58<P>End the test with START.</P> 59<P><strong>A Button</strong> display all the cube faces in the dual paraboloid map. <strong>B Button</strong> display individual cube faces. <strong>X Button</strong> selects the cube map texture. <strong>Y Button</strong> selects the alpha/color channel to display.</P> 60<H2>Required Data Files</H2> 61<P><FONT face="Courier New">$REVOLUTION_SDK_ROOT/dvddata/gxTests/tg-cube.tpl<BR> $REVOLUTION_SDK_ROOT/dvddata/gxTests/tg-cube1.tpl</FONT></P> 62<H2>Revision History</H2> 63<P>2006/03/01 Initial version.</P> 64<hr> 65<P>CONFIDENTIAL</p> 66</BODY> 67</HTML>