Notes:Sonic Adventure (Dreamcast)
This page contains notes for the game Sonic Adventure (Dreamcast).
LANTERN
Sonic Adventure is notable for being one of the earliest console games to implement Phong lighting[1], using a implementation of the reflection model famously conceptualized by Bui Tuong Phong.
At its core, Sonic Adventure 's visuals undergo a three-phase pipeline that takes the ambient color of a model, applies a diffuse layer with a specular highlight pass, and combines them to display a 3D model with lighting. Internally labelled LANTERN, this engine allows Sonic Adventure to apply various tints to a model's color and illumination in a dynamic flexible manner; the most obvious example is Sky Deck's two phases of altitude, and the game's day-evening-night systems. The lighting is stored in two files; PL, which contains the palette and SL, which contains light direction and miscellaneous info. They can be opened and edited in PLTool.
The game can use up to 8 palettes at once (plus 4 special palettes) and their use is listed below:
- Diffuse 0: Level geometry
- Diffuse 1/3: Unused
- Diffuse 2: Playable characters, NPCs and certain objects (such as the meteors in Twinkle Park)
- Diffuse 4/5: Fire effect in Mystic Ruins, Chaos 2, 6 and Perfect Chaos
- Specular 0/1: Level geometry if "ignore specular" material flag is on or off
- Specular 2/3: Playable characters, NPCs and certain objects if "ignore specular" material flag is on or off
- Specular 4/5: Fire effect in Mystic Ruins, Chaos 2, 6 and Perfect Chaos
If a level is given no lighting file at all, it will only render the ambient colors, resulting in a "fully lit" appearance. PRACTICE 3 from the AutoDemo has no lighting file, which is why the level appears solid white when loaded in-game.
Infamously, Sonic Adventure DX would overhaul this engine for a otherwise basic shader that heavily emphasizes specular highlights (which itself was further simplified on PC due to using DirectX), leading to much of the characters adopting a "plastic" appearance. The Preview prototype still has LANTERN present in a semi-functional state, and the lighting files are still in the final GameCube version, byte-swapped for its big-endian format.
Textures
Sonic Adventure makes use of the native PVR format for textures, stored in either standalone files, PVM, PRS, or PB files (the last of which defines texture resolution and format at the beginning, not for every individual texture; this format is only used by the Zero and E-101-R bosses). PVR supports the following image types:
- RGB565 (5-bits for red and blue, and 6-bits for green)
- ARGB1555 (5-bits for red, green, blue, and 1-bit for transparency)
- ARGB4444 (4-bits for red, blue, green, and transparency)
- VG and SmallVQ (creates a palette for the most common colors in the image, and then interpolates the rest)
The GameCube version of Sonic Adventure DX adopts this system into the GVR format with similar archives, including support for higher quality formats such as ARGB8888, however textures generally end up being poorer quality; Sonic Adventure 2: Battle includes a script in the files that was likely used in SADX to convert the textures en masse. The PC version and all future ports go back to PVR, and are generally even poorer quality due to further color information being lost, although some textures are higher quality in DX than the Dreamcast version.
References
- ↑ This is not to be confused with Phong shading, the game's renderer internally uses Gouraud shading (lighting per vertex), not Phong shading (lighting per pixel). This might've been the basis for the Hikaru platform's Phong engine, although not enough research has been done to prove this.