Light (RW Section)
|RW Stream Section|
Note that lights in Renderware are actual real-time lights, which are not used or supported in GTA. However, this section does occur in some of the files, shipped alongside different GTA versions.
Instead of using real-time lights, GTA fakes lightning in different ways:
- Coronas and light cones are just textures that are projected onto the surface below them. Typically they are created within a 2dfx extension, which is a custom extension created by R* in order to fake lights.
- The player model or vehicle model is not affected by shadows and direct light immision, e.g. they get darker if they are not in the light and brighter if they are. In GTA San Andreas those effects are faked by a lightning value, defined inside Collision Files.
The section itself typically does not contain any content. All information about the light source are stored within a Struct section, directly following the light section header. This structure contains the following information:
4b - DWORD - Frame Index 4b - FLOAT - Radius 4b - FLOAT - Red 4b - FLOAT - Green 4b - FLOAT - Blue 4b - FLOAT - Direction Angle (1-cos(alpha)) 2b - UINT16 - Flags 2b - UINT16 - Type
The flags describe the complexity of the casted light of the light source.
0x01 - rwLIGHTSCENE - Lights all the atomics of the object. 0x02 - rwLIGHTWORLD - Lights the entire world.
There are also different types of light sources.
0x01 - rpLIGHTDIRECTIONAL - Directional light source 0x02 - rpLIGHTAMBIENT - Ambient light source 0x80 - rpLIGHTPOINT - Point light source 0x81 - rpLIGHTSPOT - Spotlight 0x82 - rpLIGHTSPOTSOFT - Spotlight, soft edges
|Grand Theft Auto: Vice City|
|File Formats||.adf • .b • .col • .cfg • .dff • .dat • .gxt • .ide • .ifp • .img/.dir • .ipl • .raw/.sdt • .rep • .set • .scm • .txd|
|Documentation||Audio • Handling • Map Listing • Opcodes • RenderWare • Script Paths • Saves • Sound Effects • Statistics • Vehicles • Wanted levels • Weapons|
|Tools||CLEO • Collision File Editor II • G-Tools • GXT Editor • IMG Tool • Limit Adjuster • KEd (map editor) • Sanny Builder • TXD Workshop • Magic.TXD|
|Tutorials||How to create a mission • How to create a script • Vehicle Mod Installation|
|Multiplayer||GTA:LC Multiplayer • gtaTournament • Multi Theft Auto • State Of Liberty Online • Vice City Multiplayer • Vice City Online|