Skip to main content

Glow, Blur, Pixelate: Physion's New Visual Filters

· 12 min read
Physion
Physion Author

Physion 0.8.4 adds Visual Filters: 35 effects that any Node can wear, from a glow or a drop shadow to CRT scanlines, a halftone pattern or a shockwave that ripples out of a body when it lands. Select a Node, switch a filter on, and it is drawn that way from then on, in the editor and while the simulation runs.

You can see all of this for yourself in a live demo scene, already set up with a filter on each body.

The filters are purely visual. They change how a Node looks, not how it behaves: a glowing ball has the same mass, shape and bounce as a plain one, and a shockwave that visibly bends a box does not actually move it. That makes them safe to use anywhere, from a single body you want to stand out to a whole scene you want to look like a 1980s monitor.

This post covers what each filter does, how the editor works, and which of them animate.

The 35 filters

Every filter below is applied to the same subject: a blue plate with a yellow circle, a red triangle and a green bar. That makes it easy to compare all 35 side by side, each shown with its default look.

A couple of cells bend that rule a little: Shockwave is caught mid-wave since it is normally moving, and Cross Hatch is shown on a darker version of the subject, since it only draws its hatching over the darker parts of a picture.

They come in five groups, which is how the editor lists them:

GroupFiltersWhat they are for
BlurBlur, Kawase Blur, Motion Blur, Radial Blur, Zoom Blur, Tilt Shift, Bloom, Advanced BloomSoftening. Motion, radial and zoom blur smear in a direction, around a point or out of a point. Bloom lets the bright parts bleed.
ColorAdjustment, HSL Adjustment, Grayscale, Color Overlay, Color Gradient, Color Replace, Multi Color ReplaceRecoloring. Adjustment is gamma, contrast, saturation and per-channel gain; HSL rotates the hue. The replace filters swap one color, or a list of them, for another.
Light and ShadowGlow, Outline, Drop Shadow, Bevel, Emboss, God RaysMaking a Node stand out from its background, or lighting it.
StylizePixelate, Dot, ASCII, Cross Hatch, Noise, Old Film, CRT, ConvolutionRendering as something else: a low-resolution sprite, a halftone print, text, a sketch, a scratched film, a monitor. Convolution is the general one: it can sharpen, blur or find edges depending on the values you give it.
DistortBulge Pinch, Twist, Reflection, Shockwave, Glitch, RGB SplitMoving pixels around. Reflection mirrors the lower part of a Node in rippling water. Shockwave sends a ring out of a point.

Physion adds a few extra controls for the filters that animate, which we'll get to below.

Switching one on

Select a Node, find Visual Filters in the Property Editor, and click Edit...

The popover lists every filter under its group, each as a collapsible row with a switch in its header. The switch turns the filter on and off; the chevron opens its options. Every option is shown with the value that will actually be used, so a filter you have never touched displays its defaults rather than blanks, and the editor doubles as the place to find out what a filter's defaults are.

Each option shows up with whatever control fits it: sliders, steppers, color pickers, switches, and simple x/y fields for points. A handful of unusual options use a text field instead, and the editor lets you know if what you've typed doesn't work yet.

Three things about the popover worth knowing:

  • Changes apply as you make them. There is no Apply button. The Node in the scene updates while the popover is open, so a color or a distance can be tuned by looking at the result. The whole editing session undoes as a single step.
  • The search box filters the list by name, which matters with 35 rows.
  • Disable All switches every filter off but keeps its settings, so switching one back on restores what you had. Reset forgets everything.

A tag at the top counts how many filters are on. Next to it is a note that they are applied in the order they are switched on, which is worth a section of its own.

The order matters

Filters run one after another, each over the output of the one before, and the order is the order in which they were first switched on. That is not a technicality. The same two filters in the other order give a different picture:

Pixelate first and glow second draws a smooth halo around a blocky shape. Glow first and pixelate second pixelates the halo along with everything else. Neither is wrong; they are two different looks, and the order is how you pick one.

Since a filter keeps its place in the order when it is switched off and on again, the way to reorder from the editor is Reset, then switch the filters on again in the order you want.

Filters on groups, and on the whole Scene

A filter is drawn over a Node and everything inside it. Put a Glow on a Node with children and the children glow too, as one shape rather than each on its own. That is also how the subject in the gallery above was made: four plain shapes under one parent, with the filter on the parent.

The Scene is a Node as well, so it has the same property. A filter on the Scene covers everything in the scene at once:

That is the cover scene with CRT switched on at the Scene level, on top of the filters the five bodies already had. Scanlines and a vignette cover everything; the individual glow, pixelation and halftone are still there underneath. The background color is not affected, because it is painted behind the scene rather than by it.

Combining the two levels is the natural way to work: a look for the scene, and a filter or two on the Nodes that need to stand out from it.

Seven of them move

Most filters produce one still picture, which is exactly what you want most of the time. But seven of them are alive: they keep shifting while the scene plays.

Three copies of the subject animating side by side: light shafts drifting across the first, ripples running through the reflection of the second, and a shockwave expanding out of the third and starting again
FilterWhat movesControl
God RaysThe light shafts drift.timeScale, default 1. Set 0 to freeze.
ReflectionThe ripples in the water run.timeScale
CRTThe scanlines roll and the noise crawls.timeScale
ShockwaveA ring expands out of the center.period, in seconds, default 2.5: the wave fires again every period. Set 0 to fire it once. speed is how fast the ring travels, in pixels per second.
GlitchThe slices twitch.animated, default on
NoiseThe grain is redrawn.animated
Old FilmThe scratches and grain are redrawn.animated

They move while the scene is playing, hold still while it's stopped, and pick up right where they left off when you press play again. God Rays, Reflection, CRT and Shockwave stay in sync for everyone watching, no matter their device's frame rate, even together in a Scene Session. Glitch, Noise and Old Film redraw their grain randomly instead, so no two runs look quite the same, which is the whole point of grain.

God Rays, Reflection, CRT and Shockwave each have a time option too. It sets where the animation starts from, and dragging it while the scene is stopped is a handy way to preview different points in the effect.

Pixels and fractions

Two conventions run through all the options, and knowing them saves guessing:

  • Sizes are in screen pixels. A glow with a distance of 10 reaches ten pixels out of the Node, a drop shadow's offset of { x: 4, y: 4 } is four pixels, a shockwave's wavelength of 160 is 160 pixels. They do not scale with the zoom, which is what you want for an effect: a Node's glow is as wide when you zoom out as when you zoom in.
  • Centers are fractions of the Node. Bulge Pinch, Shockwave, Radial Blur, Zoom Blur and God Rays take a center, and Twist an offset, given as two fractions of the Node's on-screen extent: [0.5, 0.5] is its middle, [0, 0] its top-left corner, [1, 0.5] the middle of its right edge. The editor steps these by tenths so that a click moves the point but does not leave the Node.

That's Physion's own addition: a fixed pixel position would only be right at one particular zoom and pan, so using a fraction keeps the center in the same spot on the Node no matter how you're viewing the scene.

Things worth knowing before you use them everywhere

  • Scenes without filters pay nothing. The filter code only loads the first time you switch one on, and never before.
  • More filters cost more performance, especially the blur family. If you want the same look across many bodies, put the filter on their shared parent or on the Scene instead of adding it to each one separately.
  • God Rays lights up the whole rectangle a Node occupies, corners included, so on a circle or a hexagon you'll see a lit square around the shape. It looks best on a rectangle, a group, or the whole Scene.
  • Tilt Shift's focus band is measured against the screen, not the Node, so it works best on the Scene or on something large enough to fill it.
  • A few filters that need an external image aren't included yet, such as Color Map and Displacement. They're planned for a later release that can pull images from the Assets Library.
  • Your filter choices travel with the scene. They're saved with it, copied with the Node, and in a Scene Session shared with everyone in it, like any other setting.

Frequently asked questions

What are Visual Filters in Physion?

Visual Filters are GPU effects that a Node can wear: a glow, a drop shadow, a blur, pixelation, CRT scanlines, a shockwave, and 29 more. They change how the Node is drawn and nothing else. Its shape, mass and collisions are exactly what they were before, so a glowing ball bounces the same as a plain one.

How do I add a visual filter to a Node?

Select the Node, find Visual Filters in the Property Editor and click Edit. The popover lists every filter in five groups. Flip the switch in a filter's header to turn it on, expand it to adjust its options, and the scene updates as you go.

Can I apply a filter to the whole scene?

Yes. The Scene is a Node too, so it has the same Visual Filters property. A filter on the Scene is drawn over everything in it, and a filter on any Node also covers the Node's children, so a group of bodies can share one effect.

Do visual filters affect the physics?

No. Filters change how things look, not how they behave. A shockwave that visibly bends a box does not move it, and a blur does not soften a collision. Physics runs exactly the same whether the filters are on or off.

Do the filters animate?

Seven of them do: God Rays, Reflection, CRT and Shockwave drift and shift over time, and Glitch, Noise and Old Film reshuffle their grain every step. They move while the scene is playing and hold still while it is stopped, and each one has a control to freeze it.

Try it

Every picture in this post came out of the running app. Open the app, select something, and click Edit... next to Visual Filters. A Glow is a good first one.