Main Page
Modules Alphabetical List Data Structures Data Fields
Detailed Description
PlayStation 2 / Mipmap K Value Toolkit for RenderWare.
- Requirements
- There are four versions of the RtMipK libraries in the
RenderWare Graphics SDK. They are fully featured versions on the
RtMipK toolkit, and they contain identical APIs. However, because
the rendering pipelines are large we've taken the step to compile
different versions of the toolkit so that the user can select
precisely the pipelines they will be using.
- Requirements for rtmipk library
-
- Requirements for rtmipkmatfx library
-
- Headers: rwcore.h, rpworld.h, rpmatfx.h, rpmipkl.h,
rtmipk.h
- Libraries: rwcore, rpworld, rpmatfx, rpmipkl,
rtmipkmatfx
- Plugin attachments: RpWorldPluginAttach, RpMatFXPluginAttach, RpMipmapKLPluginAttach,
- Requirements for rtmipkpatch library
-
- Headers: rwcore.h, rpworld.h, rppatch.h, rpmipkl.h,
rtmipk.h
- Libraries: rwcore, rpworld, rppatch, rpmipkl,
rtmipkpatch
- Plugin attachments: RpWorldPluginAttach, RpPatchPluginAttach, RpMipmapKLPluginAttach,
- Requirements for rpmipkpatchmatfx library
-
- Headers: rwcore.h, rpworld.h, rppatch.h, rpmatfx.h,
rpmipkl.h, rtmipk.h
- Libraries: rwcore, rpworld, rppatch, rpmatfx, rpmipkl,
rtmipkpatchmatfx
- Plugin attachments: RpWorldPluginAttach, RpPatchPluginAttach, RpMatFXPluginAttach,
RpMipmapKLPluginAttach
- Note:
- Only one of the rtmipk libraries should be used in an
application at once.
The RtMipK Toolkit is used to try and calculate realistic "K"
values for textures in RpClump's and RpWorld's. The "K" values are stored in
the texture with either the RpMipmapKL plugin or directly into the
driver texture specific data.
The set "K" value is calculated as the average "K" value for all
the triangles using a RwTexture.
So we first calculate the screen texel ratio by:
screen texel ratio := (video mode width * video mode height)
----------------------------------------------------
((view window width * 2) * (view window height * 2))
Then the triangle texel area is calculated, by calculating the
screen pixel area per triangle:
screen space pixel area := triangle area * screen texel ratio
Then the pixel to texel ratio for the triangle:
pixel to texel ratio := screen space pixel area * texel area
The root of this the pixel to texel ratio is added to the sum
for all the triangles referencing the texture.
Finally we calculate the average "K" value by:
average "K" := - ( log( sum / count ) / log(2) )
This MipMap "K" value is then stored in the texture.
Function Documentation
|
RtMipKClumpCalculateKValues computes
the Sky specific "K" values for textures used in a clump's atomics,
based on the current video mode and the view window of the
specified camera.
- Parameters:
-
clump |
pointer to the clump |
camera |
pointer to the camera |
- See also:
- RtMipKWorldCalculateKValues
|
|
RtMipKWorldCalculateKValues computes
the Sky specific "K" values for textures used in a world, based on
the current video mode and the view window of the specified
camera.
- Parameters:
-
world |
pointer to the world |
camera |
pointer to the camera |
- See also:
- RtMipKClumpCalculateKValues
|
© 1993-2003 Criterion Software Limited. All
rights reserved. Built Tue Apr 22 12:46:59 2003. Send Feedback