Spout Lab

What's Happening

As of Web Driver 3.0, particle effects are now accessible in code through the WTSpout object. If you have used WTStudio, you may recognize this object as an Emitter. A spout is a particle generator that continuously creates 2D sprites in 3D space. You're probably most familiar with seeing them used for fire or smoke. Spouts have many different properties, allowing you to create a wide variety of effects.

You are looking head-on at a spout. Drag the mouse around to spin the view and use + and - to zoom. You can set most of the properties of the spout using the controls on this web page. Just type in new numbers and click away to update. Click the "Show size box" checkbox to gauge the relative size of your spout as you zoom. Below are some brief descriptions of each of the properties of the spout.

Note that when a property has a Min and Max value, the actual value will be random over time between these two limits. All you have to do if you don't want the property to be random is to simply set the Max equal to the Min.

Choose the CUSTOM shader to pop up a window that allows you create your own simple shader. Be aware that a color key of magenta (255, 0, 255) is applied to all bitmaps. You should also try some of these preset spouts: fire, smoke, fireworks, space warp, rain, snow, waterfall, sparkles, flashing sign, and martial arts movie background.

The numbers in the controls above (like "1 - Angle") correspond to the integer enumerations that you will use in the API.

Key Methods Used

WT::createSpout, WTSpout::setSurfaceShader, WTSpout::setMode, WTSpout::setRate, WTSpout::setSourcePointRange, WTSpout::setExternalForce, WTSpout::setParticlePropertyRange, WTSpout::setScaleRange

Points to Remember