SPR: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎top: clean up, replaced: {{goldsrc → {{gldsrc)
No edit summary
Line 1: Line 1:
{{stub}}{{back|Half-Life SDK}}<!-- Change target when proper sprites page is created -->
{{stub}}{{back|Half-Life SDK}}<!-- Change target when proper sprites page is created -->
{{code|.SPR}} is a file format used to store 2D [[Sprite|sprites]] in {{gldsrc|4}}. It is a modified version of the SPR format used by {{Quake|2}}, adding a dedicated color palette and additional translucency formats.
{{code|.SPR}} is a file format used to store 2D [[Sprite|sprites]] in {{gldsrc|4}}. It is a modified version of the SPR format used by {{Quake|2}}, adding a dedicated color palette and additional translucency formats (Quake SPRs only support alphatest transparency).


== Limitations ==
== Limitations ==

Revision as of 22:20, 2 September 2024

Stub

This article or section is a stub. You can help by expanding it.

Half-Life SDK

.SPR is a file format used to store 2D sprites in GoldSrc GoldSrc. It is a modified version of the SPR format used by Quake Quake, adding a dedicated color palette and additional translucency formats (Quake SPRs only support alphatest transparency).

Limitations

Warning.pngWarning:All frames in a multi-frame sprite share the same palette.
Icon-Bug.pngBug:Oriented sprites are finicky; see The303's tutorials for more information.  [todo tested in ?]
Icon-Bug.pngBug:Sprites being displayed via env_glow cannot be oriented in the map editor. If rotation is necessary, use env_sprite instead.  [todo tested in ?]

Image format types

Format Explanation
Normal Opaque image with no transparency
Additive Same as Normal; Additive translucency can be achieved for any image format by changing the sprite's rendermode (either in a sprite entity, or via code)
IndexAlpha Single-color with 8-bit translucency
AlphaTest Binary alpha-tested transparency; pixels using the last color in the palette will be transparent

Orientation types

Orientation Explaination
Parallel Rotates to always face the camera
Parallel Upright Like parallel, but doesn't rotate around Z axis
Oriented Rotated in map editor to face a specific direction
Parallel Oriented Combination of parallel and oriented.
Facing Upright Like parallel upright, but rotated based on player origin, rather than camera.

External links