fractalNoise โ
Blends a moving cloud of noise over the picture: mist, smoke or texture.
tsx
import { Clip, Composition, Effect, Keyframe, Track } from "@cutcraft/kit";
// fractalNoise: Blends a moving cloud of noise over the picture: mist, smoke or texture.
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">
<Effect id="look" type="fractalNoise" params={{ blend: "screen", size: 140, contrast: 1.6, evolution: 0.5 }}>
<Keyframe id="k1" param="opacity" at={0.5} value={0} />
<Keyframe id="k2" param="opacity" at={1.5} value={0.6} easing="ease-in-out" />
</Effect>
</Clip>
</Track>
</Composition>
);
}The coffee footage is Pixabay videos 209419 and 209424, under the Pixabay Content License.
Params โ
Drawn as a shader.
| param | type | default | description |
|---|---|---|---|
size | number (2..2000) | 160 | How big the noise's features are, in pixels. |
octaves | integer (1..8) | 5 | How many layers of finer detail the noise has. |
evolution | number (0..10) | 0.2 | How fast the pattern changes in place, in changes per second. |
contrast | number (0..10) | 1 | How far the noise is stretched from mid-grey, as a multiplier. |
color | string | "#ffffff" | The colour the noise is tinted with. |
blend | "normal" | "multiply" | "screen" | "overlay" | "softLight" | "overlay" | How the noise is blended onto the picture, as a W3C blend mode. |
opacity | number (0..1) | 0.5 | How much of the blended noise to mix in: 0 leaves the picture as it was, 1 is the full blend. |
seed | integer (0..โ) | 0 | Picks the pattern; the same seed draws the same noise. |