![]() You must take care to specify a proper vertex format. In place of a set of texture coordinates, cubic environment maps require a 3D vector. In fact, cubic environment maps don't use texture coordinates at all. Texture coordinates that index a cubic environment map aren't simple u, v style coordinates, as used when standard textures are applied. Texture Coordinates for Cubic Environment Maps Remember that 0 corresponds with the top-level image. Next, select the level to retrieve by setting the GetCubeMapSurface level parameter to the mipmap level that you want. Start by setting the appropriate value from the D3DCUBEMAP_FACES enumerated type, as discussed in Creating Cubic Environment Map Surfaces (Direct3D 9). You can envision the topography of these surfaces as shown in the following diagram.Īpplications that create mipmapped cubic environment maps can access each face by calling the GetCubeMapSurface method. To create a mipmapped cube map, set the Levels parameter of the CreateCubeTexture method to the number of levels that you want. Mipmapped Cubic Environment MapsĬube maps can be mipmapped. Given the amount of curvature used by most applications, the resulting reflective distortion makes extreme detail in the environment map wasteful in terms of memory and rendering overhead. In most cases, environment maps are applied to curved surfaces. The faces of a cube map don't need to contain extremely detailed renderings of the surrounding scene. This technique requires that the cube-map surfaces be valid render-target surfaces, created with the D3DUSAGE_RENDERTARGET flag set. ![]() Applications can use static images for cubic environment mapping, or they can render into the faces of the cube map to perform dynamic environment mapping. ![]() The following illustration shows how each plane corresponds to a face.Ĭubic environment maps are implemented as a series of texture objects. The orientation of the faces is shown in the following illustration.Įach face of the cube is oriented perpendicular to the x/y, y/z, or x/z plane, in world space. Each face of the cubic environment map covers a 90-degree field of view in the horizontal and vertical, and there are six faces per cube map. Cubic environment maps - sometimes referred to as cube maps - are textures that contain image data representing the scene surrounding an object, as if the object were in the center of a cube.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |