Main Page   Modules   Alphabetical List   Data Structures   Data Fields  

PlayStation 2
[RtLtMap]


Typedefs

typedef RwRGBA *(*  RtLtMapSkyLumCalcCallBack )(RwRGBA *scanline, RwUInt32 width)

Functions

RwRGBA RtLtMapSkyLumCalcSigmaCallBack (RwRGBA *scanline, RwUInt32 width)
RwRGBA RtLtMapSkyLumCalcMaxCallBack (RwRGBA *scanline, RwUInt32 width)
RwRGBA RtLtMapSkyLumResetCallBack (RwRGBA *scanline, RwUInt32 width)
RwTexture RtLtMapSkyBaseTextureProcess (RwTexture *texture)
RpAtomic RtLtMapSkyAtomicBaseTexturesProcess (RpAtomic *atomic)
RpWorldSector RtLtMapSkyWorldSectorBaseTexturesProcess (RpWorldSector *sector)
RtLtMapLightingSession RtLtMapSkyLightingSessionBaseTexturesProcess (RtLtMapLightingSession *session)
RwBool  RtLtMapSkySetLumCalcCallBack (RtLtMapSkyLumCalcCallBack cback)
RtLtMapSkyLumCalcCallBack  RtLtMapSkyGetLumCalcCallBack (void)
RwTexture RtLtMapSkyLightMapMakeDarkMap (RwTexture *lightMap)

Detailed Description

Lightmap Generation Toolkit for RenderWare Graphics.

PlayStation 2 Specific.

RtLtMap PlayStation 2 Overview

The proprietary two-pass algorithm used for lightmap rendering on PlayStation 2 (much more efficient than typical four-pass solutions for full-color lightmapping) has certain requirements and restrictions.

Firstly, lightmaps must be inverted to 'darkmaps', (see RtLtMapLightingSessionLightMapProcess and RtLtMapSkyLightMapMakeDarkMap).

Secondly, base textures must be pre-processed (see RtLtMapSkyLightingSessionBaseTexturesProcess). This has the restriction that base textures may not contain alpha - the pre-processing stage overwrites the alpha channel. Material alpha will, however, give the expected result. A full 8 bits of alpha are required, by the pre-processing, in base textures, so 16-bit textures will be converted to a 32-bit texel format. Palettised textures are fully supported and alpha-masking will also work (i.e base texture texels whose alpha is zero will produces holes in the texture). Lightmap rendering performed with base textures which have not been pre-processed will tend to look 'dirty' or 'burned'.

Thirdly, only tristrip rendering is currently supported by the lightmap vector code pipelines. It is simple to convert trilist geometry to tristrips (though this may result in a large number of wasted, degenerate triangles being created), but tristrips are much more efficient to render on PlayStation 2.


Typedef Documentation

typedef RwRGBA*(* RtLtMapSkyLumCalcCallBack)(RwRGBA *scanline, RwUInt32 width )
 

RtLtMapSkyLumCalcCallBack is the callback to be called, from within RtLtMapSkyBaseTextureProcess, to allow a user to select the function to process the textures for rendering on the PlayStation 2.

The function is called for each span of a full color image, or for the CLUT in a palettised image, to compute the luminance and stores it in the alpha component of the texel.

Parameters:
scanline  A pointer to a scanline of RwRGBA data.
width  Width of the scanline, in pixels.
Returns:
A pointer to the scanline on success, NULL otherwise.
See also:
RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapSkyLightMapMakeDarkMap , RtLtMapSkyLumCalcMaxCallBack , RtLtMapSkyLumCalcSigmaCallBack , RtLtMapSkySetLumCalcCallBack , RtLtMapSkyGetLumCalcCallBack

Function Documentation

RpAtomic* RtLtMapSkyAtomicBaseTexturesProcess RpAtomic   atomic
 

RtLtMapSkyAtomicBaseTexturesProcess processes the base textures of a given atomic, for rendering with the PlayStation 2 lightmap pipeline.

The proprietary, two-pass algorithm, used to render full-color lightmapped objects on PlayStation 2, requires some pre-processing to be performed on the base texture. This is in addition to the inversion from lightmap to 'darkmap' (see RtLtMapSkyLightMapMakeDarkMap).

It is necessary to account for the gamma of the display device when performing this pre-processing. Use RwImageSetGamma for this purpose.

Be sure to save your base texture dictionary to disk once the pre-processing has been performed. If lightmaps are rendered on base textures which have not been pre-processed, the results may look normal (depending on the brightness of lighting in the scene) but will usually look 'dirty' or 'burned'.

The lightmap plugin must be attached before using this function.

Parameters:
atomic  A pointer to an atomic
Returns:
A pointer to the atomic on success, NULL otherwise.
See also:
RtLtMapSkyWorldSectorBaseTexturesProcess , RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapSkyLightMapMakeDarkMap , RwImageGetGamma , RwImageSetGamma
RwTexture* RtLtMapSkyBaseTextureProcess RwTexture   texture
 

RtLtMapSkyBaseTextureProcess processes a texture, for rendering with the PlayStation 2 lightmap pipeline.

The proprietary, two-pass algorithm, used to render full-color lightmapped objects on PlayStation 2, requires some pre-processing to be performed on the base texture. This is in addition to the inversion from lightmap to 'darkmap' (see RtLtMapSkyLightMapMakeDarkMap).

Be sure to save your base texture dictionary to disk once the pre-processing has been performed. If lightmaps are rendered on base textures which have not been pre-processed, the results may look normal (depending on the brightness of lighting in the scene) but will usually look 'dirty' or 'burned'.

The lightmap plugin must be attached before using this function.

Parameters:
texture  A pointer to a texture
Returns:
A pointer to the texture on success, NULL otherwise.
See also:
RtLtMapSkyAtomicBaseTexturesProcess , RtLtMapSkyWorldSectorBaseTexturesProcess , RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapSkyLightMapMakeDarkMap
RtLtMapSkyLumCalcCallBack RtLtMapSkyGetLumCalcCallBack void   
 

RtLtMapSkyGetLumCalcCallBack query the callback used to compute the luminance value from the RGB components.

The lightmap plugin must be attached before using this function.

Returns:
A pointer to RtLtMapSkyLumCalcCallBack function.
See also:
RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapSkyLightMapMakeDarkMap , RtLtMapSkyLumCalcMaxCallBack , RtLtMapSkyLumCalcSigmaCallBack , RtLtMapSkySetLumCalcCallBack
RtLtMapLightingSession* RtLtMapSkyLightingSessionBaseTexturesProcess RtLtMapLightingSession   session
 

RtLtMapSkyLightingSessionBaseTexturesProcess processes the base textures of the objects specified by an RtLtMapLightingSession, for rendering with the PlayStation 2 lightmap pipeline.

This function traverses the objects specified by the received RtLtMapLightingSession structure. Only atomics flagged as rpATOMICRENDER will be processed. Note that the camera member of this structure is ignored.

The proprietary, two-pass algorithm, used to render full-color lightmapped objects on PlayStation 2, requires some pre-processing to be performed on the base texture. This is in addition to the inversion from lightmap to 'darkmap' (see RtLtMapSkyLightMapMakeDarkMap and RtLtMapLightingSessionLightMapProcess).

It is necessary to account for the gamma of the display device when performing this pre-processing. Use RwImageSetGamma for this purpose.

Be sure to save your base texture dictionary to disk once the pre-processing has been performed. If lightmaps are rendered on base textures which have not been pre-processed, the results may look normal (depending on the brightness of lighting in the scene) but will usually look 'dirty' or 'burned'.

The lightmap plugin must be attached before using this function.

Parameters:
session  A pointer to an RtLtMapLightingSession
Returns:
A pointer to the session on success, NULL otherwise.
See also:
RtLtMapSkyAtomicBaseTexturesProcess , RtLtMapSkyWorldSectorBaseTexturesProcess RtLtMapLightingSessionLightMapProcess , RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightMapMakeDarkMap , RwImageGetGamma , RwImageSetGamma , RtLtMapLightingSessionLightMapProcess
RwTexture* RtLtMapSkyLightMapMakeDarkMap RwTexture   lightMap
 

RtLtMapSkyLightMapMakeDarkMap is used to turn a lightmap texture into a 'darkmap', for rendering with the PlayStation 2 lightmap pipeline.

The proprietary, two-pass algorithm, used to render full-color lightmapped objects on PlayStation 2, requires the inversion from lightmaps to 'darkmaps'. This is in addition to the pre-processing to be performed on base textures (see RtLtMapSkyLightingSessionBaseTexturesProcess).

This function can be used with RtLtMapLightingSessionLightMapProcess to turn all lightmap textures into dark in the current lighting session.

The lightmap plugin must be attached before using this function.

Parameters:
lightMap  A pointer to a lightmap texture to be converted into a PlayStation 2-specific 'darkmap'
Returns:
A pointer to the lightmap on success, NULL otherwise.
See also:
RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapLightingSessionLightMapProcess , RtLtMapGetLightMapProcessCallBack , RtLtMapSetLightMapProcessCallBack , RpLtMapAtomicGetLightMap , RpLtMapWorldSectorGetLightMap
RwRGBA* RtLtMapSkyLumCalcMaxCallBack RwRGBA   scanline,
RwUInt32    width
 

RtLtMapSkyLumCalcMaxCallBack processes a scanline, for rendering with the PlayStation 2 lightmap pipeline.

This callback function computes the 'luminance' value for each texels from the RGB components and stores it in the alpha component.

The luminance value is computed from the maximum of the RGB component.

The lightmap plugin must be attached before using this function.

Parameters:
scanline  A pointer to a scanline of RwRGBA data.
width  Width of the scanline, in pixels.
Returns:
A pointer to the scanline on success, NULL otherwise.
See also:
RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapSkyLightMapMakeDarkMap , RtLtMapSkyLumCalcSigmaCallBack , RtLtMapSkySetLumCalcCallBack , RtLtMapSkyGetLumCalcCallBack , RtLtMapSkyLumResetCallBack
RwRGBA* RtLtMapSkyLumCalcSigmaCallBack RwRGBA   scanline,
RwUInt32    width
 

RtLtMapSkyLumCalcSigmaCallBack processes a scanline, for rendering with the PlayStation 2 lightmap pipeline.

This callback function computes the 'luminance' value for each texels from the RGB components and stores it in the alpha component.

The luminance is calculated from the vector product of the RGB vector and the RGB co-efficient vector.

This is the default callback used.

The lightmap plugin must be attached before using this function.

Parameters:
scanline  A pointer to a scanline of RwRGBA data.
width  Width of the scanline, in pixels.
Returns:
A pointer to the scanline on success, NULL otherwise.
See also:
RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapSkyLightMapMakeDarkMap , RtLtMapSkyLumCalcMaxCallBack , RtLtMapSkySetLumCalcCallBack , RtLtMapSkyGetLumCalcCallBack , RtLtMapSkyLumResetCallBack
RwRGBA* RtLtMapSkyLumResetCallBack RwRGBA   scanline,
RwUInt32    width
 

RtLtMapSkyLumResetCallBack processes a scanline, for rendering with the PlayStation 2 lightmap pipeline.

At present, only the PlayStation 2 requires a luminance value to be present in the alpha channel of the base texture. If this base texture is used on other platform, background color leakage will occur, resulting in an odd looking image.

This callback function resets the luminance value for each texels back to 255.

The lightmap plugin must be attached before using this function.

Parameters:
scanline  A pointer to a scanline of RwRGBA data.
width  Width of the scanline, in pixels.
Returns:
A pointer to the scanline on success, NULL otherwise.
See also:
RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapSkyLightMapMakeDarkMap , RtLtMapSkyLumCalcSigmaCallBack , RtLtMapSkyLumCalcMaxCallBack , RtLtMapSkySetLumCalcCallBack , RtLtMapSkyGetLumCalcCallBack
RwBool RtLtMapSkySetLumCalcCallBack RtLtMapSkyLumCalcCallBack    cBack
 

RtLtMapSkySetLumCalcCallBack sets the callback used to compute the luminance value from the RGB components.

The lightmap plugin must be attached before using this function.

Parameters:
cBack  A pointer to callback function to be used.
Returns:
TRUE.
See also:
RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightingSessionBaseTexturesProcess , RtLtMapSkyLightMapMakeDarkMap , RtLtMapSkyLumCalcMaxCallBack , RtLtMapSkyLumCalcSigmaCallBack , RtLtMapSkyGetLumCalcCallBack
RpWorldSector* RtLtMapSkyWorldSectorBaseTexturesProcess RpWorldSector   sector
 

RtLtMapSkyWorldSectorBaseTexturesProcess processes the base textures of a given world sector, for rendering with the PlayStation 2 lightmap pipeline.

The proprietary, two-pass algorithm, used to render full-color lightmapped objects on PlayStation 2, requires some pre-processing to be performed on the base texture. This is in addition to the inversion from lightmap to 'darkmap' (see RtLtMapSkyLightMapMakeDarkMap and RtLtMapLightingSessionLightMapProcess).

It is necessary to account for the gamma of the display device when performing this pre-processing. Use RwImageSetGamma for this purpose.

Be sure to save your base texture dictionary to disk once the pre-processing has been performed. If lightmaps are rendered on base textures which have not been pre-processed, the results may look normal (depending on the brightness of lighting in the scene) but will usually look 'dirty' or 'burned'.

The lightmap plugin must be attached before using this function.

Parameters:
sector  A pointer to a world sector
Returns:
A pointer to the sector on success, NULL otherwise.
See also:
RtLtMapSkyAtomicBaseTexturesProcess , RtLtMapSkyBaseTextureProcess , RtLtMapSkyLightingSessionBaseTexturesProcess RtLtMapLightingSessionLightMapProcess , RtLtMapSkyLightMapMakeDarkMap , RwImageGetGamma , RwImageSetGamma

Criterion Software © 1993-2003 Criterion Software Limited. All rights reserved. Built Tue Apr 22 12:46:59 2003. Send Feedback
Converted from CHM to HTML with chm2web Pro 2.85 (unicode)