Globals Handlers Table of Contents

Plug-in Classes

The plug-in SDK divides plug-ins into classes according to what they do. Each class plugs into LightWave at specific points and performs a well-defined set of tasks.

Class Index
AnimLoaderHandler
AnimSaverHandler
ChannelHandler
ColorPicker
CommandSequence
CreateToolHandler
CustomObjHandler
DisplacementHandler
EnvironmentHandler
FileRequester
FrameBufferHandler
Global
ImageFilterHandler
ImageLoader
ImageSaver
ItemMotionHandler
LayoutGeneric
MasterHandler
MeshDataEdit
ObjectLoader
ObjReplacementHandler
PixelFilterHandler
ProceduralTextureHandler
SceneConverter
ShaderHandler
ToolHandler
TransformToolHandler
VolumetricHandler

The following summary loosely groups the classes into a few broad categories. These categories are merely suggestive. They don't have any technical significance, and there are certainly other ways the classes can be grouped. The classes in the ignominious Other category are actually among the most interesting; they're categories unto themselves.

File Handling

ImageLoader
LightWave relies on image loader plug-ins to read image files. An image loader converts the image information in a file into a rectangular bitmap in one of LightWave's internal formats, which include 8-bit grayscale, 8-bit indexed color, 24-bit RGB, 32-bit RGBA, and floating point grayscale, RGB and RGBA.

ImageSaver
As you might guess, image savers work very much like image loaders in reverse. Loaders and savers employ the same protocols, and the loader and saver for a given format almost always share source code and reside in the same .p file.

AnimLoaderHandler
Animation loaders treat animation files (AVI, QuickTime or MPEG files, for example) as a sequence of still images. LightWave calls on them during rendering to retrieve one frame at a time from an animation file. Frames are passed to LightWave using the image loader protocols.

AnimSaverHandler
Animation savers write out a sequence of rendered images as an animation file. The rendered frames are added to the animation file as each frame is rendered. The rendered image is passed to the saver in the same way it's passed to frame buffer display plug-ins, except that there is no pause function call after each frame, and animation savers are initially given a filename.

ObjectLoader
Object loaders read and convert object geometry files.When Layout or Modeler encounter an object file in a format they don't recognize, they call the object loaders in sequence until one of them recognizes and loads the object. Any geometry data that LightWave's native object format supports can also be passed to LightWave by an object loader.

There isn't a corresponding object saver class. You can implement an object saver using the MeshDataEdit class in Modeler or the mesh access globals in Layout.

SceneConverter
Scene converters are used to load foreign scene formats. When Layout encounters a scene file it can't load, it passes the filename to the scene converters in sequence until one of them recognizes the format. The converter rewrites the scene as a temporary LWSC file and passes the filename of the temporary file back to Layout, and after Layout loads the file, it calls the plug-in again to delete the temporary file.

Dialogs

FileRequester
File requester plug-ins replace the host platform's default file selection dialog, or provides one if none exists.

ColorPicker
Color picker plug-ins replace the host platform's default color selection mechanism.

Modeling

MeshDataEdit
Mesh editing Modeler plug-ins can examine, modify and create points and polygons. They're listed in the Modeler interface in the Custom pop-up under Tools.

CommandSequence
These Modeler plug-ins can issue commands similar to the operations available to the user in the interface. They can also do the same mesh editing that MeshDataEdit plug-ins do. CommandSequence plug-ins appear in the Custom popup in the Objects menu, and the user has the ability to set the string arguments they receive.

ToolHandler
CreateToolHandler
TransformToolHandler
Description.

Rendering

DisplacementHandler
Displacement plug-ins deform objects by moving their points. The evaluation function is called for each vertex at each time step.

ItemMotionHandler
At each time step, item motion plug-ins can translate, rotate and scale any item that can be keyframed (objects, lights, cameras, bones).

ChannelHandler
Channel handlers are similar to item motion handlers, but they work on a single keyframe channel, and the data they control can represent anything, not just the familiar motion channels. These can be used in combination with custom objects.

ObjReplacementHandler
Object replacement plug-ins can replace the geometry of an object at each time step. The evaluation function replaces an object simply by returning the filename of a different object. This can be used to load object sequences, analogous to image sequences, or to manage multiple versions of an object modeled at different levels of detail.

ShaderHandler
Shaders modify the appearance of a surface during rendering. The shader evaluation function is called at every pixel in which the associated surface is visible, and at each of these surface spots, the shader can modify any or all of the surface's basic attributes.

ProceduralTextureHandler
Procedural textures are functions that modulate the parameters of a surface. They are exactly like Layout's built-in textures (fractal noise, for example), taking an arbitrary 3D vector as input and producing another vector as output. They work at a lower level than shaders.

ImageFilterHandler
Image filter plug-ins apply image post processing (filtering) effects to the final rendered image. Each filter is applied after all the antialiasing and motion blur passes are complete. The filter has access to LightWave's internal image buffers, and it does its work by modifying the red, green, blue and alpha values of the final image. Image filters may also be called to apply their effects to a test image in a preview window.

PixelFilterHandler
Pixel filters apply image post processing effects to individual pixels (strictly speaking, samples) in the rendered image. Pixel filters have access to the same internal buffers as image filters, but differ from image filters because they work on one sample at a time, rather than the entire image, and they're called before antialiasing and motion blur. Pixel filters also resemble shaders, except that they work on the rendered image rather than a single surface.

EnvironmentHandler
Environment handlers replace Layout's backdrop and fog effects. They can draw the sky and the horizon, for example, on the scene's infinitely distant backdrop, or attenuate and whiten the color of distant objects to simulate fog.

VolumetricHandler
Volume rendering plug-ins integrate opacity and color along rays fired through the scene. The rays are fired by Layout and passed one at a time to the volume renderer for evaluation. Volumetric rendering can be used to create smoke plumes, splashing liquids, x-ray views, hair, fur, feathers--anything that involves light transmission effects or details too fine to model with explicit geometry.

MasterHandler
Master plug-ins manage complex animation effects that require the coordinated operation of multiple plug-in instances, or multiple plug-ins of different classes. Examples include surface effects that the user can apply to all surfaces simultaneously, and a physics engine that can control motion, deformation and volumetrics through a single interface.

Other

FrameBufferHandler
Frame buffer plug-ins display the rendered image as each frame is completed. They include a pause function to give the user time to view the image and decide whether to continue rendering.

Global
Global plug-ins provide services that any other plug-in can use. These services are added to the list of services available through the GlobalFunc every plug-in receives in its activation function. The globals page explains how both built-in and plug-in Global class services are made available to other plug-ins.

LayoutGeneric
Generic plug-ins are utilities that perform non-rendering tasks such as configuring external devices or performing calculations. Generics can also issue commands that alter the scene.

CustomObjHandler
These can be thought of as custom null objects. The plug-in controls how the object looks to the user in Layout's interface and can get and set an arbitrary number of channel parameters.