Sprite: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 26: Line 26:
==Creation==
==Creation==
{{todo|...guidelines/checklist for designing & implementing sprites.}}
{{todo|...guidelines/checklist for designing & implementing sprites.}}
<!--
 
* design guidelines.
* Design guidelines.
** the image inside the sprite already depicts a three dimensional object;
** the image inside the sprite already depicts a three dimensional object;
** the animation is constantly changing or depicts ''rotation'';
** the animation is constantly changing or depicts ''rotation'';
** the depicted object has a similar appearance from many common viewing angles (such as something spherical);
** the depicted object has a similar appearance from many common viewing angles (such as something spherical);
** the viewer accepts that the depicted object only has one perspective (such as small plants or leaves).
** the viewer accepts that the depicted object only has one perspective (such as small plants or leaves).
** the sprite exists only briefly, is NotSolid, ... player cannot inspect it closely.
** the sprite exists only briefly, is NotSolid, ... player cannot inspect it too closely.
* [[Vtex]] config.
* [[SPR]] file format...
* [[SPR]] file format.
* VTF: [[Vtex compile parameters]] "clamps", "clampt". note: [[env_sprite_oriented]] #angles ...
-->
* VMT: [[Shaders_in_Sprites\]]

Revision as of 14:06, 7 May 2008

Stub

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

In source, a Sprite is a rendered world object with very special geometrickery. The sprite itself is a (static or animated) 2D image that looks 3D when viewed Normally (ie perpendicular to its surface). The trick is to make sure the player always views the sprite normally; which usually means the sprite effectively rotates about its origin so it is always facing the Player. Obviously in multiplayer this would not work, so the sprite is not rotated in World, but only in the Player View.

Although their usefulness is severely limited, sprites are significantly "cheaper" to render than models or brushwork, and can also achieve convincing effects that would be impractical to model in 3D.

  • Lighting: Sprites cannot cast or receive any kind of shadows, nor reflect cubemaps.
  • Physics: Sprites cannot be Solid to anything.

Sprite entities


Placement

Todo: ... general usage guidelines ... configuring sprite entities in Hammer.

Creation

Todo: ...guidelines/checklist for designing & implementing sprites.
  • Design guidelines.
    • the image inside the sprite already depicts a three dimensional object;
    • the animation is constantly changing or depicts rotation;
    • the depicted object has a similar appearance from many common viewing angles (such as something spherical);
    • the viewer accepts that the depicted object only has one perspective (such as small plants or leaves).
    • the sprite exists only briefly, is NotSolid, ... player cannot inspect it too closely.
  • SPR file format...
  • VTF: Vtex compile parameters "clamps", "clampt". note: env_sprite_oriented #angles ...
  • VMT: Shaders_in_Sprites\