SALVL - X-Hax/sa_tools GitHub Wiki
Note: This is using images from an older version of the software. Some things may look different.
SALVL (formerly SADXLVL2) is a level editor for Sonic Adventure games. It is mainly meant for editing SADX PC (2004) level layouts but it also has limited support for other games.
Navigating the Editor
3D Viewport
The 3D Viewport (highlighted in yellow) is the primary window into the scene. You can use it to fly around and view the stage from various angles, select move and rotate objects within the scene, and various other tasks.
See 3D Editor Controls for default camera controls.
Scene Graph
The Scene graph (highlighted in blue) shows a list of everything inside of the level that can be edited, sorted by type. You can select items here and it will function in exactly the same way as if you had clicked the item inside of the Viewport. The Scene graph supports multi-select by holding the SHIFT key.
Inspector
Every object in the game world has many properties associated with it, and many times the game have properties that cannot be manipulated directly in 3D space via the viewport. For this reason, the Inspector (highlighted in green) will display as much information as possible about the currently selected object (In the case of multiple selected objects at once, it will display information that is common across the entire selection).
Character Select
The character select behaves exactly like you expect it would. Click on a character's icon to switch their version of the stage. Note that this only changes the currently loaded SET and CAM layouts, as all characters share stage geometry.
Model Library (under construction)
The model library (highlighted in red) is a palette that contains a series of 3d models, stored in memory until you decide to add them to the stage. You can add a model from the model library to the stage by clicking on it and dragging the icon into the 3d viewport. You can import external 3d model files (obj and sa1mdl formats supported) into the Model Library by using the File->Import->To Model Library menu option.
Transform Handle Tools
SALVL uses a feature called a Transform Handle for manipulating the selected stage objects. The transform handle resides in the 3D viewport and is directly manipulated by the mouse, using a click and drag action.
The following menu buttons alter the behavior of the transform handle
Lights Editor
SADX has two types of light data: Stage Lights (LE_LIGHT_ENV
) and Character Lights (LE_PALIGHT_ENV
). Stage Lights are used for level and object models, while Character Lights are used for characters, some specific enemies and bosses. You can edit both types of lights and preview changes in the editor. If a light of a selected type is not present in the selected level, click the +
button to create it (if a light already exists, it will be overwritten with default data). To clear the current light, click the -
button. Click Apply
to update the lights in the main editor.
Stage Lights
Each act in a level can have up to four Stage Lights. You can switch between the four lights using the Light Index control. Each light has the following parameters:
- Diffuse Color
- Ambient Color
- Diffuse: Directional light intensity
- Specular: Unused
- Use Direction: Indicates a directional light; if this flag is disabled, only ambient lighting will be used
- Light Direction
Character Lights
Each act in a level has three types of Character Lights:
- Character: Used for most playable characters and NPCs, as well as some enemies such as the Spinners
- Character Alt.: Additional light type used for Super Sonic, E-102 Gamma and some Egg Carrier NPCs
- Boss: Used for boss models
Each Character Light can be configured with the following parameters:
- Enabled: If this flag is off, the game will use the light from the previous act, or a default one if it doesn't exist or is disabled
- Use Direction: If this flag is enabled, the game will use this light's direction; if this flag is disabled, the game will use the Stage Light's direction
- Ignore Direction: If this flag is enabled, light direction will not be set
- Double: If this flag is enabled, an additional light will be created with an inverted direction
- Diffuse: Unused
- Light Direction
- Ambient Color
- Color 1 RGB and Power: First component used for diffuse palette generation (see notes)
- Color 2 RGB and Power: Second component used for diffuse palette generation (see notes)
- Specular 1 RGB and Power: First component used for specular palette generation (see notes)
- Specular 2 RGB and Power: Second component used for specular palette generation (see notes)
Notes on Lights
- The lighting system described above is used in SADX Gamecube and later ports. The original Dreamcast version uses a different system that loads lighting data from PL and SL files. Use PLTool to edit those.
- The lights are applied differently in the Gamecube version, so the same values will produce different results in the PC version.
- The Gamecube version generates 256-color palettes for diffuse (Color 1 and Color 2) and specular (Specular 1 and Specular 2) character lighting, which are used as a lookup texture in a way similar to the palettes in the original Dreamcast game's lighting system. However, in all later ports (including the PC version) there is no palette generation, and only Ambient Color and Specular 1 RGB have any meaningful effect.
- Specular lighting is disabled for Stage Lights, and the
Specular
value has no effect. - The
Diffuse
value has no effect on Character Lights. - For Station Square and the Mystic Ruins, Act 0 is Day, Act 1 is Evening and Act 2 is Night. Sky Deck Act 3 and Twinkle Park entrance area in Station Square use hardcoded lighting that cannot be edited in SALVL. Casinopolis has hardcoded light rotation. Some other levels have hardcoded ambient color or light direction overrides.
Fog Editor
SADX PC has fog settings for each detail (clip) level. Since lower clip settings were meant for underpowered machines by 2004 standards, in the majority of cases there is no point in using anything other than High (Far). If a selected act in a stage does not have fog data, click the +
button to create it (if fog data already exists, it will be overwritten with default data). To remove current fog data, click the -
button. Click Apply
to update fog in the main editor.
The following fog parameters can be adjusted:
- Fog Toggle: Enables or disables fog for this act and detail setting.
- Fog Start: Distance from camera where fog starts.
- Fog End: Distance from camera where fog ends.
- Fog Color
Notes on Fog
- Positive and negative values for Fog Start and Fog End produce the same results.
- The game uses default fog settings if the difference between Fog Start and Fog End is too small. This behavior is replicated in the editor.
- The A value in Fog Color is ignored.
- In some areas, such as Lost World Act 2, there are hardcoded fog overrides that cannot be edited in SALVL.
- In the Mystic Ruins, the following Acts are used for different times of day:
- Day: Level act number matches fog act number
- Evening: Act 0 (Station) is 4, Acts 1 (Angel Island) and 2 (Jungle) are 5
- Night: Act 0 (Station) is 6, Acts 1 (Angel Island) and 2 (Jungle) are 7
- Act 3 (Mystic Ruins Base) always uses 3