Fire, smoke, water and magic
Bring a simulation and get a game effect: Pixor turns the .vdb files Blender, EmberGen and Houdini write into looping pixel-art fire, smoke and water, on the same palette as your sprites. No simulation tool? Pixor has its own effects too.
Every frame above is Pixor’s: the simulations were baked in Blender and opened in Pixor as they came out, a .vdb file a frame. All three are in the free library, with their .vdb files and Blender scenes.
Simulations from your tools: OpenVDB
Pixor reads the .vdb files that Blender (Mantaflow), EmberGen and Houdini write: smoke, fire, explosions and liquids. It finds the density, the flames and the heat, and the velocity it uses to keep flicker down. A liquid’s surface is drawn solid, with a hard edge.
- A file a frame: open the first file of a sequence,
fire_0001.vdb, and Pixor plays the rest. - Take one in N: a simulation written at 48 frames a second becomes 12 frames of a sprite.
- Loops that close: the last frames are cross-faded into the first, so a campfire or a torch burns round and round without a jump.
- Steady at sprite size: a 256³ simulation is cut down to about a voxel per pixel as it loads, so a plume at 32 px does not shimmer, and a long sequence costs reading time, not memory.
Drawn like everything else
A volume goes into the same picture as your model. A flame sits in front of a hand, and a character stands inside smoke. The light bands, the palette and the cleanup treat it as they treat any surface. Its soft edge is dithered in a pattern fixed to the volume, never blended, so every pixel stays on the palette and nothing crawls as it moves. Where a fire is hot it burns in its hot colour whatever the light, and the emission layer hands your engine just the parts that glow, to bloom.
Fire in a hand, smoke from a blast
A volume can be carried by a bone, so a torch’s flame follows the hand through every clip and stays upright, as fire does. Or it can be carried by an effect, so an explosion brings its own smoke and a spell its own fire. Put a fire beside a walk cycle and the fire’s frames are the walk’s frames.
No simulation tool? Pixor’s own effects
Built-in volumes, Puff, Flame, Cloud and Mist, made from seeded noise, so the same settings always give the same voxels. And thirteen particle effects: explosion, hit spark, slash, magic burst, heal, portal, smoke puff, dust, fire loop, rain, snow, fireflies and falling leaves. Each is drawn from 3D particles through your look and palette. Place one on a bone, time it to a clip’s hit frame, or render it alone.
pxr effect magic-burst --size 64 -o spell.png Water, waves and weather
Liquid simulations are read as a surface. For a pond, a lake or a coast, the world’s Water node makes a sheet of water with waves that loop, foam along the shore and the scene reflected in it. Rain, snow, drifting cloud shadows and wind in the grass loop too, in whole steps, so the last frame leads back into the first. See Worlds.
Free effects in the library
The free library’s elements are effects ready to render or to learn from: fire, water, lava, lightning and magic, each with its sprite sheets. The simulated ones come with their .vdb files, the Pixor project and the Blender scene that simulates them. CC0.
On the command line
# a simulation, 24 frames, one file in two, the last four faded into the first
pxr render - --volume fire_0001.vdb:1.5::24,2,4 -o fire.png
# a torch's flame in the hand, through every clip
pxr render hero.glb --volume flame:0.25:0,0.05,0@hand.r -o hero.png Everything about volumes is in the manual: Volumes: smoke, fire and liquids.