The RtLtMapCnv toolkit contains a set of functions for converting lightmaps. This toolkit suppliments RtLtMap, a lightmap generation toolkit.
Many major modelling packages provide the functionality to generate lightmaps. RtLtMapCnv provides a set of functionality to postprocess these lightmaps into a form that RenderWare can use.
The conversion is a two stage process and is similar to generating lightmaps using RtLtMap. Firstly, lightmaps need to be allocated and associated with objects, and the UV coordinates for the lightmap pass need to be calculated (see RtLtMapLightMapsCreate).
Secondly, the imported lightmaps are converted. (see RtLtMapCnvWorldConvert and RtLtMapCnvAtomicConvert). This involves re-mapping each triangle lightmap in the imported lightmaps to RenderWare's lightmaps. The triangle lightmaps can be rescaled and re-oriented during the conversion. As a results, the final result may differ from the original.
Lightmaps generated by this toolkit support tristripped geometry (unusual for lightmap implementations) and so will render very quickly, especially on such platforms as PlayStation 2. A few visual artifacts remain due to this tristrip support and the conversion although, in the vast majority of cases, they will go unnoticed or easily be worked around.
|
|
RtLtMapCnvErrorFlags is an enumerated type specifying the different errors which may occur during lightmap conversion. The flags are bitfields to represent more than one type of error.
|
|
|
RtLtMapCnvAtomicCnvDataCreate is used to create the conversion data for an RpAtomic. This creates a set of arrays for the RpAtomic to store the UV lightmap co-ordinates and the lightmap texture name.
|
|
|
RtLtMapCnvAtomicCnvDataDestroy is used to destroy the conversion data attached to an RpAtomic. This destroys the set of arrays for storing the UV lightmap co-ordinates and the lightmap texture name.
|
|
||||||||||||
|
RtLtMapCnvAtomicConvert is used to convert imported lightmaps for use within RenderWare. This function takes the imported lightmaps and converts it into a form useable by RenderWare's LightMap plugin, RpLtMap. RenderWare lightmap textures are generated from a source sample image. For better results, this source sample image can be larger than the final lightmap texture and sampled down to a smaller size. The sample factor specifies the scale of this source sample image relative to the destination lightmap texture. The imported UV lightmap co-ordinates are re-mapped to new values in the destination lightmaps.
|
|
||||||||||||
|
RtLtMapCnvAtomicGetLightMapName is used to retrieve the lightmap texture used by the triangle in an RpAtomic. Imported lightmap data may consist of more than one lightmap per RpAtomic. Each triangle references its lightmap texture by name.
|
|
|
RtLtMapCnvAtomicGetTexNameArray is used to retrieve the array of lightmap name references attached to an RpAtomic. The size of the array is equal to the number of triangles in the RpAtomic. The array contains the lightmap texture reference for each triangle in the RpAtomic.
|
|
|
RtLtMapCnvAtomicGetUArray is used to retrieve the array of U lightmap co-ordinates attached to an RpAtomic. The size of the array is equal to the number of vertices in the RpAtomic. The array contains the imported U lightmap co-ordinate for each vertex in the RpAtomic.
|
|
|
RtLtMapCnvAtomicGetVArray is used to retrieve the array of V lightmap co-ordinates attached to an RpAtomic. The size of the array is equal to the number of vertices in the RpAtomic. The array contains the imported V lightmap co-ordinate for each vertex in the RpAtomic.
|
|
||||||||||||||||
|
RtLtMapCnvAtomicGetVtxUV is used to retrieve the UV lightmap co-ordinate of a vertex in an RpAtomic.
|
|
|
RtLtMapCnvAtomicIsConvertible is used to determine if an RpAtomic can be converted for use by RenderWare's LightMap plugin, RpLtMap. The function checks if imported lightmap data are attached to an RpAtomic. If so, then the RpAtomic is determined to be convertible.
|
|
|
RtLtMapCnvAtomicSessionCreate is used to create a RtLtMapCnvAtomicSession. The RtLtMapCnvAtomicSession will be initialized with default values. The pointer to an RpAtomic is cached inside the session, since a session is not usable with a NULL Atomic pointer.
|
|
|
RtLtMapCnvAtomicSessionDestroy is used to destroy a RtLtMapCnvAtomicSession. Any temporary memory is also destroyed.
|
|
|
RtLtMapCnvAtomicSessionGetGreedyRasterization is used to retrieve the rasterization method. Triangles are rasterized during conversion to remap their lightmaps from the imported form to RenderWare's form. During standard rasterization, a pixel is only considered to form part of a triangle's lightmap if the triangle covers the centre of the pixel. During greedy rasterization, a pixel is considered to form part of a triangle's lightmap if the triangle covers any part of the pixel.
|
|
|
RtLtMapCnvAtomicSessionGetImportedLtMapResample is used to query if resampling of the imported lightmaps is set. RenderWare lightmap textures are generated from a source sample image. This source sample image is generated from the imported lightmaps by re-rasterizing the triangles into the source sample image. The source sample image size is based on the size of the destination lightmap texture, which can be different to the imported lightmaps. This difference can potentially cause samples in the imported lightmaps to be missed. To eliminate this error, the imported lightmaps can be re-sampled to the same size as the source sample image.
|
|
|
RtLtMapCnvAtomicSessionGetRejectionFactor is used to retrieve the rejection factor. Triangles with an area smaller than this threshold are rejected and are not lightmapped.
|
|
||||||||||||
|
RtLtMapCnvAtomicSessionSetGreedyRasterization is used to select the rasterization method. Triangles are rasterized during conversion to remap their lightmaps from the imported form to RenderWare's form. During standard rasterization, a pixel is only considered to form part of a triangle's lightmap if the triangle covers the centre of the pixel. During greedy rasterization, a pixel is considered to form part of a triangle's lightmap if the triangle covers any part of the pixel.
|
|
||||||||||||
|
RtLtMapCnvAtomicSessionSetImportedLtMapResample is used to select resampling of the imported lightmaps. RenderWare lightmap textures are generated from a source sample image. This source sample image is generated from the imported lightmaps by re-rasterizing the triangles into the source sample image. The source sample image size is based on the size of the destination lightmap texture, which can be different to the imported lightmaps. This differences can potentially cause samples in the imported lightmaps to be missed. To eliminate this error, imported lightmaps can be re-sampled to the same size as the source sample image.
|
|
||||||||||||
|
RtLtMapCnvAtomicSessionSetRejectionFactor is used to set the rejection factor. Triangles with an area smaller than this threshold are rejected and are not lightmapped.
|
|
||||||||||||||||
|
RtLtMapCnvAtomicSetLightMapName is used to set the lighmap texture used by the triangle in an RpAtomic. Imported lightmap data may consist of more than one lightmap per RpAtomic. Each triangle references its lightmap texture by name.
|
|
||||||||||||||||
|
RtLtMapCnvAtomicSetVtxUV is used to assign a UV lightmap co-ordinate to a vertex in an RpAtomic.
|
|
||||||||||||
|
RtLtMapCnvWorldConvert is used to convert imported lightmaps for use within RenderWare. This function takes the imported lightmaps and converts them into a form useable by RenderWare's LightMap plugin, RpLtMap. RenderWare lightmap textures are generated from a source sample image. For for better results, this source sample image can be larger than the final lightmap texture and sampled down to a smaller size. The sample factor specifies the scale of this source sample image relative to the destination lightmap texture. The imported UV lightmap co-ordinates are re-mapped to new values in the destination lightmaps.
|
|
|
RtLtMapCnvWorldIsConvertible is used to determine if a RpWorld can be converted for use by RenderWare's LightMap plugin, RpLtMap. The function checks if imported lightmap data are attached to the RpWorld. If so, the RpWorld is determined to be convertible. Note that all non empty RpWorldSector in the RpWorld must contain the imported lightmap data for the RpWorld to be convertible.
|
|
|
RtLtMapCnvWorldSectorCnvDataCreate is used to create the conversion data for the RpWorldSector. This creates a set of arrays for the RpWorldSector to store the UV lightmap co-ordinates and the lightmap texture name.
|
|
|
RtLtMapCnvWorldSectorCnvDataDestroy is used to destroy the conversion data attached to the RpWorldSector. This destroys the set of arrays for storing the UV lightmap co-ordinates and the lightmap texture name.
|
|
||||||||||||
|
RtLtMapCnvWorldSectorGetLightMapName is used to retrieve the lighmap texture used by the triangle in an RpWorldSector. Imported lightmap data may consist of more than one lightmap per RpWorldSector. Each triangle references its lightmap texture by name.
|
|
|
RtLtMapCnvWorldSectorGetTexNameArray is used to retrieve the array of lightmap name references attached to the RpWorldSector. The size of the array is equal to the number of triangles in the RpWorldSector. The array contains the lightmap texture reference for each triangle in the RpWorldSector.
|
|
|
RtLtMapCnvWorldSectorGetUArray is used to retrieve the array of U lightmap co-ordinates attached to the RpWorldSector. The size of the array is equal to the number of vertices in the RpWorldSector. The array contains the imported U lightmap co-ordinate for each vertex in the RpWorldSector.
|
|
|
RtLtMapCnvWorldSectorGetVArray is used to retrieve the array of V lightmap co-ordinates attached to the RpWorldSector. The size of the array is equal to the number of vertices in the RpWorldSector. The array contains the imported V lightmap co-ordinate for each vertex in the RpWorldSector.
|
|
||||||||||||||||
|
RtLtMapCnvWorldSectorGetVtxUV is used to retrieve the UV lightmap co-ordinate of a vertex in an RpWorldSector.
|
|
||||||||||||||||
|
RtLtMapCnvWorldSectorSetLightMapName is used to set the lighmap texture used by the triangle in an RpWorldSector. Imported lightmap data may consist of more than one lightmap per RpWorldSector. Each triangle reference its lightmap texture by its name.
|
|
||||||||||||||||
|
RtLtMapCnvWorldSectorSetVtxUV is used to assign a UV lightmap co-ordinate to a vertex in an RpWorldSector.
|
|
|
RtLtMapCnvWorldSessionCreate is used to create a RtLtMapCnvWorldSession. The RtLtMapCnvWorldSession is initialized with default values. The pointer to the RpWorld is cached inside the session, since a session is not usable with a NULL world pointer.
|
|
|
RtLtMapCnvWorldSessionDestroy is used to destroy a RtLtMapCnvWorldSession. Any temporary memory is also destroyed.
|
|
|
RtLtMapCnvWorldSessionGetGreedyRasterization is used to retrieve the rasterization method. Triangles are rasterized during conversion to remap their lightmaps from the imported form to RenderWare's form. During standard rasterization, a pixel is only considered to form part of a triangle's lightmap if the triangle covers the centre of the pixel. During greedy rasterization, a pixel is considered to form part of a triangle's lightmap if the triangle covers any part of the pixel.
|
|
|
RtLtMapCnvWorldSessionGetImportedLtMapResample is used to query if resampling of the imported lightmaps is set. RenderWare lightmap textures are generated from a source sample image. This source sample image is generated from the imported lightmaps by re-rasterizing the triangles into the source sample image. The source sample image size is based on the size of the destination lightmap texture, which can be different to the imported lightmaps. This difference can potentially cause samples in the imported lightmaps to be missed. To eliminate this error, the imported lightmaps can be re-sampled to the same size as the source sample image.
|
|
|
RtLtMapCnvWorldSessionGetRejectionFactor is used to retrieve the rejection factor. Triangles with an area smaller than this threshold are rejected and are not lightmapped.
|
|
||||||||||||
|
RtLtMapCnvWorldSessionSetGreedyRasterization is used to select the rasterization method. Triangles are rasterized during conversion to remap their lightmaps from the imported form to RenderWare's form. During standard rasterization, a pixel is only considered to form part of a triangle's lightmap if the triangle covers the centre of the pixel. During greedy rasterization, a pixel is considered to form part of a triangle's lightmap if the triangle covers any part of the pixel.
|
|
||||||||||||
|
RtLtMapCnvWorldSessionSetImportedLtMapResample is used to select resampling of the imported lightmaps. RenderWare lightmap textures are generated from a source sample image. This source sample image is generated from the imported lightmaps by re-rasterizing the triangles into the source sample image. The source sample image size is based on the size of the destination lightmap texture, which can be different to the imported lightmaps. This difference can potentially cause samples in the imported lightmaps to be missed. To eliminate this error, the imported lightmaps can be re-sampled to the same size as the source sample image.
|
|
||||||||||||
|
RtLtMapCnvWorldSessionSetRejectionFactor is used to set the rejection factor. Triangles with an area smaller than this threshold are rejected and are not lightmapped.
|
© 1993-2004 Criterion Software Limited. All rights reserved. Built Thu Feb 12 13:47:14 2004.
Send Feedback