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 (environment) 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.&nbsp;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.&nbsp;Two sets of prerendered cube maps are provided. One has labels for left, right, top, bottom, back and front, and another is taken from the courtyard database (max/Crtyard).</P>
17
18<H2>Coverage</H2>
19<TABLE border="1" cellpadding="3" cellspacing="0.1" width="640">
20  <TBODY>
21    <TR>
22<TD width="30%" bgcolor="#C0C0C0"><EM><STRONG>Functions</STRONG></EM></TD>
23<TD width="25%" bgcolor="#C0C0C0"><EM><STRONG>Parameters</STRONG></EM></TD>
24<TD width="45%" bgcolor="#C0C0C0"><EM><STRONG>Description</STRONG></EM></TD>
25    </TR>
26    <TR>
27<TD width="30%" rowspan="3"><A href="../../../gx/Transform/GXLoadTexMtxImm.html"><CODE>GXLoadTexMtxImm</CODE></A></TD>
28<TD width="25%"><SPAN class="argument">Matrices</SPAN></TD>
29<TD width="45%">Appropriate projection matrix.</TD>
30    </TR>
31    <TR>
32<TD width="25%"><SPAN class="argument">Matrix destination.</SPAN></TD>
33<TD width="45%"><CODE>GX_TEXMTX0</CODE></TD>
34    </TR>
35    <TR>
36<TD width="25%"><SPAN class="argument">Types</SPAN></TD>
37<TD width="45%"><CODE>GX_MTX3x4</CODE></TD>
38    </TR>
39    <TR>
40<TD width="30%" rowspan="4"><CODE><A href="../../../gx/TexCoordGen/GXSetTexCoordGen.html">GXSetTexCoordGen</A></CODE></TD>
41<TD width="25%"><SPAN class="argument">Destination coordinates.</SPAN></TD>
42<TD width="45%"><CODE><font face="Courier New">GX_TEXCOORD0</font>.</CODE></TD>
43    </TR>
44    <TR>
45<TD width="25%"><SPAN class="argument">Generation type.</SPAN></TD>
46<TD width="45%"><CODE>GX_TG_MTX3x4</CODE></TD>
47    </TR>
48    <TR>
49<TD width="25%"><SPAN class="argument">Generation source.</SPAN></TD>
50<TD width="45%"><CODE>GX_TG_POS</CODE></TD>
51    </TR>
52    <TR>
53<TD width="25%"><SPAN class="argument">Matrix source.</SPAN></TD>
54<TD width="45%"><CODE>GX_TEXMTX0</CODE></TD>
55    </TR>
56  </TBODY>
57</TABLE>
58
59<H2>Using the Demo</H2>
60<P>End the test with START.</P>
61<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>
62
63<H2>Required Data Files</H2>
64<P><CODE>$REVOLUTION_SDK_ROOT/dvddata/gxTests/tg-cube.tpl<BR> $REVOLUTION_SDK_ROOT/dvddata/gxTests/tg-cube1.tpl</CODE></P>
65
66<H2>Revision History</H2>
67<P>
682006/03/01 Initial version.<br>
69</P>
70
71<hr><p>CONFIDENTIAL</p></body>
72</HTML>