Skip to content

Generate Depth Map

Generate a depth map from an input image using AI (Depth Anything V2). Spends AI tokens per generation.

Category: AI Menu path: AI > Generate Depth Map

Ports

PortTypeDirectionDescription
image_inimageRgba16finputRequired — the image to derive depth from. An Image Source, a prior generation, or any rendered node (captured via the engine).
outimageRgba16foutputThe generated depth map (transparent until you generate one)

Parameters

All parameters are managed by the Generate panel in Properties (not standard rows):

ParamTypeDefaultDescription
modelstring(first available)Which AI model to use. Currently a single curated model (Depth Anything V2).
resultPathstring""Hidden — set automatically to the saved depth map under the project's generated/ folder.

There is no prompt and no aspect ratio — the depth map is derived entirely from the input image, and its dimensions match the input.

How It Works

Wire an image into image_in and click Generate. Caddis captures that input (a direct file for an Image Source / prior generation, otherwise a render of the upstream node) and sends it to the Caddis server, which deducts the model's token cost from your balance and runs Depth Anything V2. The resulting grayscale depth map is downloaded into your project's generated/ folder, and the node loads it like an image source — so it composites and caches exactly like any other image. If generation fails, your tokens are automatically refunded.

The token cost is shown on the Generate button. You need a saved project (so generations have a home), an image wired into image_in, and enough tokens. If you're short, the Generate button opens the token top-up dialog.

In the depth map, lighter values are typically nearer and darker values farther (model-dependent). The output is image data — feed it into masks, displacement, or a future depth-aware blur.

Usage Examples

Basic: depth from a photo

Add an Image Source, wire it into a Generate Depth Map node's image_in, and click Generate. The node outputs a grayscale depth map you can preview or composite.

Depth from a rendered chain

Wire any rendered node (a DrawShape composition, a processed image chain) into image_in. Caddis captures its rendered output at the current frame and derives depth from that — no need to flatten to a file first.

Driving a mask or displacement

Route the depth output into a matte, UV displacement, or blur amount to fake atmosphere, fog, or focus falloff. (A dedicated depth-aware camera blur is a planned follow-up.)

Running low on tokens

If your balance is below the cost, the Generate button becomes "Get tokens · N more" and opens the top-up dialog — the server never charges or fails a generation you can't afford.

Tips

  • Token cost is per generation and is shown on the button — re-running spends again.
  • Generations live in your project's generated/ folder; they travel with the project.
  • The node shows transparent until you generate, so an empty Generate Depth Map won't break a comp.
  • Import to Assets adds the depth map to the asset manager; Delete removes the file.
  • GenerateImage — Generate or edit an image from a text prompt (AI / tokens)
  • ImageSource — Load a still image from disk (no AI / no tokens)