oilPaint
Smooths the picture into flat strokes with crisp edges, as oil paint.
tsx
import { Clip, Composition, Track } from "@uberscene/kit";
// oilPaint: Smooths the picture into flat strokes with crisp edges, as oil paint.
export default function Video() {
return (
<Composition fps={30} width={640} height={360}>
<Track id="main">
<Clip
id="shot"
src="asset:redCup"
in={18}
out={21}
fit="cover"
effects={[
{
type: "oilPaint",
radius: [
{ at: 0.5, value: 0, easing: "easeInOut" },
{ at: 1.5, value: 7 },
],
},
]}
/>
</Track>
</Composition>
);
}The coffee footage is Pixabay videos 209419, 209424, 46989 and 251, under the Pixabay Content License. The maker of the machine in the red cup shot has nothing to do with this project.
Params
Drawn as a shader.
| param | type | default | description |
|---|---|---|---|
radius | number (0..40) | 4 | How big the strokes are, in pixels: the side of the squares each pixel is smoothed over. |
sharpness | number (0..1) | 0.8 | How crisp the strokes' edges are: 1 keeps every edge hard, 0 blurs across them. |