Skip to content

findEdges ​

Keeps only the picture's outlines, light on black or dark on white.

tsx
import { Clip, Composition, Track } from "@uberscene/kit";

// findEdges: Keeps only the picture's outlines, light on black or dark on white.
export default function Video() {
  return (
    <Composition fps={30} width={640} height={360}>
      <Track id="main">
        <Clip
          id="shot"
          src="asset:coffee"
          in={12}
          out={15}
          fit="cover"
          effects={[
            {
              type: "findEdges",
              strength: 3,
              amount: [
                { at: 0.5, value: 0, easing: "easeInOut" },
                { at: 1.5, value: 1 },
              ],
            },
          ]}
        />
      </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.

paramtypedefaultdescription
strengthnumber (0..10)1.5How bright the edges are drawn, as a multiplier.
invertedbooleanfalseDraw dark edges on white, as a pencil sketch, instead of light edges on black.
amountnumber (0..1)1How much of the result to mix in: 0 leaves the picture as it was, 1 is edges alone.

All effects and transitions · Units

MIT licensed.