Deform (Material global keyword)

Description

The deform keyword applies the specified type of deformation to a material shader.

Usage

In the global section of your material shader type…

deform <type> [<parameters>]

Parameters

  • <type> - The deformation type to be used.
  • <parameters> - The exact definition varies depending on the type of deform.

Types

eyeBall
Used for eyeball materials on NPCs to allow for pupils to move along with whatever the NPC is looking at.

expand <amount>
Expand the surface along it’s normals.

flare <size>
Used for light flares which are seen as bloom-like areas around light fixtures.

move <amount>
Moves the surfaces along it’s X axis.

Example:

deform move (time * 1)

particle <particleDecl>
Emit the specified particles from the surface.

particle2 <particleDecl>
It will emit particles like particle while ignoring the surface area. As a result, small surfaces emit as much particles as large surfaces.

sprite
Causes any surface to which this material is applied to behave as a sprite in that it always faces the player.

tube
Causes the surface to appear bent around a tube.

turbulent <table> <range> <timeoffset> <domain>
Causes wave-like distortion based on the given table.

Example:

deform turbulent sinTable 0.05 (time * 1) 10

Notes

Any material shaders that make use of the deform keyword coupled with flare, sprite, tube, eyeball, cannot be illuminated by lights because these types of deforms are rendered in a separate pass.

The examples, move and expand types were taken from the id.sdk: Tables & Materials page.