Creating depth map images using google

since Mill Mage has brought out v carve and 3d relief , ive tried a few ways to convert images using photoshop etc with mixed results., just couldnt get that fine detail right

i bit the bullet and decided to ask google AI. :frowning:

how do i ask you to convert an image into high quality depth map, it gave me a few sentences, which i than asked it with an image.

after nearly 2 hrs , i think that one was bit retarded didn’t understand plain old English

we got there, have attached final script at bottom of post for you all to try and tweak :slight_smile:

the original pic is one that i got of one of my FB pages i follow, this lady creates ai generated pics

final depth map pic

MM preivew

after got to that point i asked it to write me a script for further pics

this one was from asking the script

here is the script it wrote me , still may need some final tweaks , will see what they carve out like before confusing it more

Generate a high-resolution, 8-bit grayscale depth map based on the provided image for 3D Z-axis displacement mapping.

Key Spatial Rules:

  • Tonal Gradient: Use a smooth, continuous gradient where pure white (#FFFFFF) represents the closest foreground elements and pure black (#000000) represents the furthest background or horizon.
  • Mid-ground Separation: Calibrate the contrast curve so mid-ground elements (like trees or terrain) sit at distinct grayscale values, separating them clearly from the background without flattening out.

Advanced Mesh Displacement Optimization (Dual-Zone Filtering):

  1. INTERIOR COMPONENT (High Definition): Maintain clear, crisp volumetric contours, muscular structure, and textural definitions inside the main subject (e.g., [INSERT YOUR SUBJECT HERE, e.g., “the body of the stag and the rock faces”]). Do not flatten or blur the internal features; they must retain sharp structural definition to drive localized depth displacement.
  2. OUTER SILHOUETTE (Ultra-Soft Rollover): Apply a heavy, localized feathering filter strictly to the outer perimeter outlines and narrow extremities (such as antlers, fur tips, or edges). The border transition from the subject to the background must be a broad, smooth, sweeping gradient.

The final asset must look crisp and detailed on the inside, but fade smoothly on the outer borders so that Z-axis displacement rolls over softly at the edges instead of lifting sharply or tearing the mesh.

Thanks for sharing this Terry! I’ve been wondering I would generate a usable depth map. Your script works great. I downloaded your elk picture and ran the script. I then put the depth map into MillMage and did a 3D Relief carve. WOW, it only took a few minutes to complete from beginning to end.

How cool is that, nice!

where is the script? Sounds like it would be worth trying. I have this great 0.5 mm ball end 15 degree taper bit I want to use on an image. thanks for sharing your update. Looks really great!

This is the script.

under the pic of the trough is the script

your welcome, got give back to the group , ive learned so much on here since joining

yes a few min instead of 5 hrs like it used to take haha

cheers ryan

im in the process of milling it now

need to lower my step over on next one

thats a 1.5mm bull at 10% step

looking pretty cool though

straight of the table , pretty stoked with the finish

the step over lines disappeared with some scotch pad 320

That turned out great Terry. What was your final depth?

cheers Britt 12mm

depth to leave going drop that to 1mm

i find doing raster on angle comes out nicer step over lines arnt as harsh and drops machine time a fair bit also , generally between 22 -40 deg can cut time down by least 30 min

That looks great

thank u

just re looking at your d map compared to mine

yours doesn’t have soft edges around antlers etc ? which is odd

at the bottom of Advanced Mesh Displacement Optimization (Dual-Zone Filtering) in script

it says to do this

picking you copied and pasted it all

ill run some more tests when get a chance and see what happens

maybe you got one of those lazy bots that only read half of the instructions, without the rolls off the antlers they would just get ripped off while milling

I redid the depth map and it looked the same. I then repasted just:

  1. OUTER SILHOUETTE (Ultra-Soft Rollover): Apply a heavy, localized feathering filter strictly to the outer perimeter outlines and narrow extremities (such as antlers, fur tips, or edges). The border transition from the subject to the background must be a broad, smooth, sweeping gradient.

The final asset must look crisp and detailed on the inside, but fade smoothly on the outer borders so that Z-axis displacement rolls over softly at the edges instead of lifting sharply or tearing the mesh.

and Gemini softened the edges like yours. I wonder why it isn’t following the entire script the first time.

bloody AI haha

after reading a topic on grey scale, the consensuses is meta ai is way better when it come to image edits ,

so I gave it a go , and yes it is 100 times better the fine detail is crazy

i took a screen shot of a very low image of a coin , usig the above script asked it to generate depth map to be exact to image , about 10 min and a few tweaks and this is it

that photos a photo of a photo of a photo of the depth map in millmage, i set that up on table so anyone watching my live can see what im making

final diameter of coin will be 225mm, that’s after 3 hrs , 7 hrs to go , 0.5mm bullnose, step overs still to big on softer wood think that’s 8%, but on med dentistry like Totara its mint

Did you try running the Bull Elk through Meta AI? I just did my GSP image. I feel like it has too much detail. The preview in MillMage has a lot of indentations.

Original image:

Gemini image:

Meta image:

Did you change anything in your prompt for Meta?

no ddint try the deer,

that is its only down fall is it is so detailed , going to need re write some of the script

not to start with , did ask it to remove some of the finner detail and smooth it out after

to elemate what you see in dogs face in the preview . which helped

it reckons png is better than bmp for MM, ?

asked google last week to make me stand alone app for depthmap , , had a basic version working , than i asked it to add couple features and it broke , it :(, gave it to meta and ssaid do u think your smarter than google fix this and make it work , its fixed lot of issues but still not right