Monday 31 January 2011

3D Eye Depth Map and Gradient Maps

Now we have a laser cutter I was intrigued to see what sort of 3D objects it could make. The way in which is works is when it is in 'Raster' mode, it works like a dot matrix printer, creating more and more sparse spots the lighter the area is. So the blacker an area, the more dense the dots and the further into the material the laser should go. I think they'll be a slight rough texture to it though.


My idea was to just have sections of the face imprinted into acrylic or some such transparent material. My main focus was on the eye section of a face. I thought of taking the already made 3D me but after many trials it wasn't good enough. Here's some pictures


Sooo, I got a picture of Anaïs' eye and made in mudbox (it's good practive anyway) and here's the result:


I was quite pleased with this, but perhaps I should say how I got the depth map. So, Mudmox doesn't do Depth Maps. I exported from Mudbox as an OBJ and imported into Maya. I had to create another sphere for the eye. I got a new camera and pointed it at the eye. It was quite hard working out how to do a depth pass, but I found it here. Particularly Emil3d - 03-26-2007, 03:31 PM.

So, go to the render properties, check the "Z-Depth" option, and also make sure it saves it as IFF format. Do a batch render and somewhere you'll find an .IFF file. Open this in FCheck and it'll list the channels that were rendered. Check the z-depth one (or something similar) and you'll see the Depth Map. Save this as a TIFF.

I then put this into Photoshop and re-adjusted to get the whites - white and the blacks - black. But I also thought that the lasercutter could only cut 8mm at a time, so I'd need to separate the picture into segments for each cut. I did this by having another curves layer and creating a straight line from bottom to top, for just 1/4 of the graph, 4 times. Images look like this:
 
 


So 8mm X 4 = 32mm = 3.2cm. I think this is about right for the depth of Anaïs' eye?

Another problem would be the 'dithering' that it need to do. To achieve different depths it doesn't vary the power of the laser, just the amount of dots. So this might make it look pretty weird. But it's something we'll need to trial and error.

Whilst looking into the gradients, I found 'Gradient Mask'. It looks at the gradients in the image, and applies whatever gradient over the top of it. Works nicely with depth maps. An example is a multiple black and white gradient based on this depth map. It could be used to make stuff look like terrain maps:

I also overlaid it to keep the depth.

I also thought about adding texture for the eye, but thought it'd look good with skin as well. So I took the original photo of Anaïs and overlaid it.



No comments:

Post a Comment