Image to Depth Map

· · Regular & Ultra

Open Window > Image to Depth Map. It is a window of its own that never docks: the sidebar on its left runs the steps from top to bottom, and the preview on its right shows the picture, its mask and the depth map as they are made. It needs at least a depth model, which you download yourself — see The AI models are yours. What the window makes in 3D is on the next page, Depth Maps in 3D.

The Image to Depth Map window in the Midnight Purple theme after Make depth map on Emi_front.png (1637 x 4096): Load image, the Presets row on Base3, Run on the second graphics card, Detail: whole image only, the Saved line, and the Relief Settings accordion open -- Surface detail 6.00, Shape kept, Shape size, Depth detail, Edge rounding, Outline height, Photo detail, Midtones, the Shading part and the Photo overlay; the preview on the Depth map view shows the character as a light grey relief over black
A character's front view made into a relief depth map, Relief Settings open.

The steps

  1. Load image...: a photo or a render of the object.
  2. In Background, say how the background is taken away and choose the models.
  3. Pick where the models run and how fine the detail is, then press Make depth map.
  4. Shape the result in Relief Settings: every slider changes the preview at once.
  5. The depth map is already saved, in a new folder in your Downloads folder (What is saved, and where). Save depth map... saves a copy where you choose, or go on to Make 3D.

Every value in the sidebar is kept between sessions: a change is saved about a second after you make it.

Loading a picture

Load image... opens a file dialog for PNG, JPEG, WebP, JPEG XL, TGA, BMP, TIFF and EXR files. A photo of the object works, and so does a render — a figure, a relief, a face. File names in any language load and save. The new image starts on the Photo view, fitted to the preview, and the title bar names it with its size and the file's bit depth — for example Image to Depth Map - figurine.png - (1536px X 2752px, 8-bit), or 16-bit, or 32-bit float.

Use Load image... for this window: a picture dropped onto Vertexix goes to the open model's textures instead.

A picture that is already a depth map

An image with no colour may be a depth map already, so the window offers to use it as one: the Make 3D (simple) accordion opens, ready to use, and the status line says This image has no colour, so Make 3D can use it as a depth map as it is: white is near. If it is a photo, Make depth map still works. The image is read again at the file's own precision — a 16-bit PNG at 16 bits, an EXR as floats — so its gentle slopes do not come out in steps. A black-and-white photo looks exactly the same to the window: for one of those, press Make depth map as usual, and the depth map made takes over from the image. Making 3D from a depth map you already have is described in Depth Maps in 3D.

Presets

The Presets row under Load image... keeps the sidebar's values as named presets: the background, the models, Run on, the detail, the relief and the Make 3D settings — all of them but the normal map's direction, which belongs to one picture. Picking a preset in the dropdown applies it at once. When you move a value after that, the preset's name is marked with a *: pick it again to go back to what it holds, or update it to keep the new values. A different model in a preset is only used the next time the depth map is made.

ControlWhat it does
(no preset)In the dropdown: shows no preset, and leaves the values as they are.
Create new preset (the plus)Asks for a Preset name and saves the values under it. The prompt shows the file it will write — Saves as name.vdmp, or Replaces name.vdmp when there is a preset of that name already — and its button reads Create or Replace. Enter does the same; Esc cancels.
Update current preset (the disk)Saves the values now in the sidebar into the preset on show.
Delete preset (the bin)Deletes the preset's file, after asking. The values in the window stay as they are.

Presets are .vdmp files in the dm_presets folder of your Vertexix user folder (%APPDATA%\Vertexix\dm_presets in an installed copy); one copied in from another computer turns up in the list by itself. A preset can name a model or a graphics card this computer does not have: that value is left as it was, and the row says so — Not on this machine, so left as it was: …. The Image to 3D windows make their views' depth maps with these presets too.

The sidebar's accordions

The settings sit in four accordions — Background, Relief Settings, Make 3D (simple) and Models — and the controls that run each step stay in view between them. Opening an accordion closes the one that was open. To keep one open while you use another, click the thumbtack at the other end of its bar from the arrow (it shows while the mouse is over an open accordion): a pinned accordion stays open, its bar no longer closes it, and a second click on the thumbtack unpins it. Which accordions are open and pinned is kept between sessions. When the window opens without a depth model or a background model to use, the Models accordion opens by itself, with the download links (listed here) and Open the models folder.

Background

The background is taken away first, so the depth is the object's alone. The first dropdown of the Background accordion says how:

ModeWhat it does
Remove with an AI modelThe default. A background-removal model (BiRefNet) cuts the object out of any background; choose it in the dropdown below, from the models folder's background folder.
The image's transparencyFor a PNG already cut out: its transparency is the mask. An image without any stops with The image has no transparency to use as the mask.
Key out the border colourA green screen or a plain backdrop: the colour round the image's border is the background. Tolerance (0.02 to 0.50, 0.12 by default) is how far a colour may be from it and still count as background.
A mask imageLoad mask... takes a separate image (PNG, JPEG, WebP or TIFF) in which white is the object; its name shows under the button.
Keep itNothing is taken away: the whole image is the object.

The fill dropdown under it sets what the depth model sees where the background was. It must differ from the object's edge, or a dark shoe on black is taken for background. Fill: automatic, the default, picks white or black against the object's edge; Fill: white, Fill: black and Fill: grey force one. The status line names the fill each depth map was made with.

The Image to Depth Map sidebar in the Forest theme with the Background accordion open: Remove with an AI model, BiRefNet-general-epoch_244.onnx, Fill: black, then the Depth part with da3-large / model.onnx, Surface detail with moge-2-vitl-normal / model.onnx and Surface detail: 256 px tiles; the preview shows the character's depth map
The Background accordion: what takes the background away, and the depth and surface-detail models.

The models

The Depth part of the same accordion chooses the models, from what the models folder holds:

ControlWhat it does
The depth modelA Depth Anything model from the models folder's depth folder. Without one, Make depth map stays greyed out.
Surface detailA second model (MoGe-2, from the normal folder) that reads the surface's form from its shading — fingers, knuckles, folds, a face — which Depth Anything's depth does not hold. Its detail goes into the depth, as much as the relief's Surface detail slider says, and it gives the 3D outputs their true proportions. None -- Depth Anything alone leaves it out.
Its tilesWith a surface-detail model: Surface detail: 384 px tiles (faster) (the default), Surface detail: 256 px tiles or Surface detail: 180 px tiles (finest, slowest). Smaller tiles let the model see the surface finer — crisper creases — at the cost of more passes: 256 px takes about twice as long as 384, 180 px four to five times.

Making the depth map

Between the Background and Relief Settings accordions are the controls that run the models:

ControlWhat it does
Run onThe CPU or a graphics card (through DirectML). The CPU always works but is slow: a minute or more for a detailed map. A card that also draws your screen can stutter while it works, and is marked This card also draws your screen. More in The graphics card, or the CPU.
The detailBesides the whole image, the depth model runs over overlapping tiles of the full image, and the tiles are blended in: smaller tiles, finer detail, more passes. Detail: whole image only is fast and soft; Detail: fine (336 px tiles), Detail: normal (448 px tiles) (the default) and Detail: broad (672 px tiles) add the tiles.
Enlarge small images x 2On by default. A photo under 2048 pixels on its longer side is enlarged twofold before the models run: they find finer forms (a face's eyes and lips, fingers) when there are more pixels to write them at. It takes about four times as long, and the depth map and the 3D outputs come out at the enlarged size — the title bar shows it. The tiles grow with the image, so they still cover the same part of the photo. Changing it loads the image again at once. A picture that is already a depth map is never enlarged.
Make depth mapTakes the background away, runs the depth model over the whole image and its tiles (and the surface-detail model over its own), and shapes the result as a relief. It needs an image and a depth model. While it works, a progress bar shows the step and the seconds so far, and Cancel stops it.

When it is done the preview turns to the Depth map view, and the status line says how long it took: the number of tiles, the time of each step, the fill, and any model that had to run on the CPU instead of the card, with the reason. A change to the background, the models, Run on or the detail counts from the next Make depth map; the relief does not need one. A moment later the status line adds where the depth map was saved, Saved in …, and Show the result's folder under it opens that folder (What is saved, and where).

Relief Settings

The Relief Settings accordion shapes the depth into the relief the window shows and saves — a squashed overall shape with its detail kept and boosted, the look of a carved relief map. It works once a depth map has been made, and every change shows in the preview at once: the models do not run again. These sliders shape the saved picture; the 3D outputs are made from the models' own depth instead (why).

ControlWhat it doesDefaultRange
Surface detailHow strongly the surface-detail model's fine forms go into the depth: 0 is Depth Anything alone, 1 their true proportion, 3 exaggerated as a carved relief's are. Greyed out unless a surface-detail model ran when the map was made.3.000 – 6
Shape keptHow much of the large-scale depth stays: low flattens the object into a relief, 1 keeps it.0.350 – 1.5
Shape sizeWhat counts as large-scale shape, in image pixels.40 px8 – 200 px
Depth detailThe strength of the depth's own detail: whatever is smaller than the shape size.2.000 – 5
Edge roundingRounds the outline down towards the background, as a carved piece's edge.0.250 – 1
Edge rounding widthHow far in from the outline the rounding reaches. Small keeps the edges crisp.6 px1 – 40 px
Outline heightThe step up from the background at the figure's outline. Higher keeps the edges light and crisp; 0 lets the figure fade down into the background.0.150 – 0.8
Photo detailFine detail taken from the picture itself — lace, hair strands, stitching. Painted edges become small bumps too: lower it for a painted object.0.600 – 3
Photo detail sizeThe size of the picture's detail that is used, in image pixels.3.0 px1 – 12 px
MidtonesLike the middle value of Photoshop's Levels: lower darkens the middle heights and spreads the figure's values apart, bringing out its shading; 1 leaves them as they are. Done in 32-bit floats, so it never bands.1.000.05 – 1.5

Shading

The relief can be lit like grey clay and mixed into itself, so folds and creases read as sculpted while near stays light and far dark. It is off by default; the four sliders after Shading only matter once it is above 0.

ControlWhat it doesDefaultRange
ShadingHow much of the clay lighting is mixed in. 0 leaves the plain depth.00 – 1.5
Light angleWhere the light comes from: 0 from the right, 90 from above, 135 from the upper left.135°0 – 360°
OcclusionHow much the crevices darken — between hair locks, under ruffles, behind a raised hand.0.650 – 1
Shading heightHow tall the relief is for the lighting, as a share of the image's size: higher gives stronger light and shadow on its slopes.0.110.02 – 0.4
SmoothingSmooths the surface before it is lit, so the depth model's faint grid does not show as a hatched texture.3.0 px0.5 – 8 px

Photo overlay

The photo, in black and white and without its background, can be blended over the depth map the way a layer is in Photoshop.

ControlWhat it doesDefault
The black-and-white profilePhotoshop's Black & White presets, with the same weights: Luminance, Default, Blue Filter, Darker, Green Filter, High Contrast Blue Filter, High Contrast Red Filter, Infrared, Lighter, Maximum Black, Maximum White, Neutral Density, Red Filter and Yellow Filter. It is used for the overlay and for Photo detail. A blue filter brings out skin's creases; look at the result in the B&W view.Luminance
The blend modeHow the black-and-white photo is blended over the depth map, by Photoshop's layer blend modes: Normal, Darken, Multiply, Color Burn, Linear Burn, Lighten, Screen, Color Dodge, Linear Dodge (Add), Overlay, Soft Light, Hard Light, Vivid Light, Linear Light, Pin Light, Difference and Exclusion. Only over the figure: the background stays out.Overlay
OpacityHow much of the blended photo shows, from 0 % (none: the overlay is off) to 100 %.0 %

Reset to when the window opened, at the bottom of the accordion, puts every value in it back to what it was when this window was opened. Nothing outside the accordion changes.

The preview

The buttons along the top of the preview choose what it shows. Until a depth map is made, the depth map, mask and black-and-white views show the photo.

ViewShows
Depth mapThe relief, exactly as Save depth map... writes it.
MaskThe object's mask: white is the object.
PhotoThe picture as loaded.
B&WThe photo in black and white, by the profile chosen in the Photo overlay.
NormalsThe normal map (Depth Maps in 3D).

The mouse wheel zooms about the cursor, from the whole image fitted up to 64 times that; any mouse button drags the image; a double click fits it again. The zoom shows at the right end of the row of views. All the views share one zoom and position, so switching between them compares the same spot. A new image starts fitted.

What is saved, and where

Every depth map you make here is saved by itself, the way Image to 3D (Online) saves what it makes: in a new folder in your Downloads folder, named after the picture with _depth_map added. Nothing is written over: when the name is taken, (2), (3) and so on is added. The line under Make depth map says where your Downloads folder is, and Show the result's folder opens the last one.

FileWhat is in it
<name>_depth.exrThe depth map as the Depth map view shows it, 32-bit float: the same file Save depth map... writes as an EXR.
<name>_depth.pngThe same depth map as a 16-bit PNG, which any program opens.
<name>_mask.pngThe background mask (16-bit): white is the object.
<name>_cutout.pngThe picture with the background taken away: the mask as its transparency.
<name>_normals.pngThe normal map, as the Normals view shows it (16-bit, Depth Maps in 3D).
<name>_mesh.obj, .mtl and _mesh.pngThe mesh Make 3D made from this depth map and opened as the Loaded Mesh, with its material and the photo it wears. Only once you have made one.
<name>_cloud.plyThe point cloud Make 3D made from it, the one opened as the Loaded Mesh or saved with Save point cloud... (whose dialog starts in this folder). Only once you have made one.
job.txtWhen it was made and how long it took, the picture, the background mode, the models and the card they ran on, the preset, the files (Make 3D's too, with when each was made and its size), and every value the window had — in the same lines a preset file holds.

What the folder holds follows the window. Move a Relief Settings slider and the depth map in it is written again about a second after you let go. Change the normal map's direction or the Make 3D settings and the normal map is written again too, the next time the Normals view shows it. Press Make 3D's button again and its mesh or point cloud is written over the last one. Load another picture, or make another depth map, and that folder is left as it is: the next depth map gets a folder of its own.

The depth maps the Image to 3D windows make in this window are not saved here: those windows keep their own (When Image to 3D is waiting).

Saving the depth map

Save depth map..., under the Relief Settings, saves a copy of the relief where you choose, once a depth map has been made: the dialog starts in the depth map's own folder. The file is named after the image with _depth added, as an EXR unless you choose otherwise:

FormatPrecision
OpenEXR (.exr)32-bit float. The default, and what a name typed without an extension is saved as.
TIFF (.tif, .tiff)32-bit float.
JPEG XL (.jxl)32-bit float, lossless.
PNG (.png)16-bit.

The three float formats keep the relief's full precision, so a gentle slope never terraces; the status line says where the file went. The window reads every one of these formats back with Load image..., and takes such a file as a depth map.

When Image to 3D is waiting

The Image to 3D windows make their views' depth maps in this window: it opens by itself, shows each view's depth map as it is made, and closes again at the end if it was closed before. When Image to 3D (Local) does this with Let me check each view's depth map first ticked (it is by default), every view stops here once its depth map is made, and a bar across the top of the window says Image to 3D is waiting: view 1 of 4. While it waits you can change any setting and press Make depth map again as often as you like; if you close the window, it opens again.

ButtonWhat it does
Use this depth mapAccepts this view's depth map as it is now, and Image to 3D goes on to the next view.
Use this and the rest as they comeAccepts this view and converts the remaining views with the settings as they are now, without asking again. Not shown on the last view.
Cancel Image to 3DStops the Image to 3D run.

As the note under the bar says, the 3D shape takes the background, the device and the detail level from here (make the depth map again after changing them), and the Make 3D (simple) settings; the Relief Settings shape the saved picture only. If another image was loaded meanwhile, accepting loads the view again and asks you to convert it first. These depth maps are kept by Image to 3D, not in a _depth_map folder of their own.

Troubleshooting

ProblemWhat to do
Make depth map is greyed out.Load an image and choose a depth model: the dropdown in the Background accordion's Depth part lists the Depth Anything models in the models folder. A red line above the button means Vertexix's copy of ONNX Runtime is missing (onnxruntime.dll is not beside vertexix.exe): install Vertexix again.
Choose a background-removal model first (or another background mode).Put a BiRefNet model in the models folder's background folder, or choose another background mode.
A dark part of the object vanished into the background.The fill was too close to it: choose Fill: white (or black for a light object).
The status line says a model ran on the CPU.The card had too little graphics memory free for it. Close other programs using the card, or use a smaller model (BiRefNet lite, Depth Anything 3 Base).
It is slow.Run it on a graphics card. Broader tiles, larger surface-detail tiles, or Enlarge small images x 2 turned off all cut the time, at some cost in detail.
The relief looks blown out, all in a few light values.Lower Midtones to spread the figure's values apart.