Go Back   AC3D Forums > General > AC3D General
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 12th July 2007, 02:24 AM   #1
radrawing
Junior Member
Junior member
 
Join Date: Jul 2007
Posts: 6
Default A face from a photo

Hi Guys

I am just trying out AC3D and it looks good. My main aim for using the program is to create a 3d image of faces from photos. I want to use the photo as a reference in a view then model up. I then want to send this to my cnc router to cut the face in wood. Is there a way to do this?

Roger
radrawing is offline   Reply With Quote
Old 12th July 2007, 04:15 PM   #2
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: A face from a photo

Neat!

Modeling a face from a photo is certainly doable, but I don't think that's the hard part.

As for sending it to your cnc machine, it depends on what kind of equipment you have. My brother does work on race cars, and a good friend of his owns a machine shop where they build custom turbos. I know the cnc machines in the shop will take a DXF file for input, which is a format that AC3D supports. I know many machines use DXF, but I assume not all will, so you will need to find out what kind of files your equipment will use. The DXF format will allow you to embed curves and other shapes as well as polygon data, so find out as well what "flavor" of DXF it needs to be sure you make a compliant file. (DXF is plain text, so it's easy to look inside and see what's in there.)

You'll also want to check with your equipment manufacturer to find out what kind of limitations you might have to be careful of in your geometry. For example, I know the 5-axis machines can do all kinds of weird shapes, but some of the 3-axis and other machines have limitations on concave shapes or other kinds of cuts. Things like nostrils can get you into trouble on some machines. I assume that cutting into wood instead of metal only makes this more complicated. Depending on how large you are making your model and the capacity of your machine, you may also need to plan your seams. Many machines can't work on a large, solid block. A head is fairly uniform and convex, so I wouldn't think it would be too bad, but it is something to be aware of. I make latex masks and puppets as a hobby, and subtle changes in the design of an arm or a leg can make the molds 10x as complicated; it's my understanding that cnc is a lot the same. Again, your equipment manufacturer or an expert in cnc equipment can help you here.
lisa is offline   Reply With Quote
Old 12th July 2007, 04:58 PM   #3
radrawing
Junior Member
Junior member
 
Join Date: Jul 2007
Posts: 6
Default Re: A face from a photo

Lisa

My machine is home built X Y Z. I use Vcarve program to create all the text and carvings. There is lots you can do with it. Vcarve gives me the Gcode to send to my cnc software Mach3. I do lots of signs and plaques. I also have a small program called BMP to CNC. Here you load in a photo and you set the depths and outer adjustments. It then created a 3d type image of the picture using shades of grey colours. You can set the depth of white or black. This is more like engraving in a heavier scale. But its not a true 3d. What I am after is to produce a 3d image about 300x300 and only 6mm in height. I don’t want a full 3d depth. It’s only for pictures. I want to import a portrait picture. Draw/model the solid faces then send it to Vcarve.
Here is there site. http://www.vectric.com/WebSite/Vectr...snew_index.htm

I am looking to model say the fish.
radrawing is offline   Reply With Quote
Old 12th July 2007, 09:12 PM   #4
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: A face from a photo

Gotcha!

Your machine is a router then, right, not a mill?

I think you can get a pretty realistic result even from something like BMP2CNC if you use AC3D to generate a heightmap as input instead of using a photo. You can do this by creating a model in AC3D, then exporting it to POVRay. In POVRay, you need to apply a "slope" material, and make the color a function of the height.

i.e. Like so:
Code:
// this texture colors pixels based on height, so that an arbitrary 3D object can be converted to a simple heightfield
#declare texturebyheight = 
texture 
{
    pigment {                                      
            slope { 
               <0,1,0>,                            // set axis we're interested in
               0.0, 1.0                            // use the full range of slope, we're really only interested in altitude   
               altitude <0.0, 1.0, 0.0>,           // set axis we're interested in
               0.0,                                // lowest altitude, adjust based on size of model
               0.2                                 // highest altitude, adjust based on size of model                                                                                    
             }                      
            pigment_map {
               [0.0 color rgb < 0.0 0.0 0.0>]      // make low areas black
               [1.0 color rgb < 1.0 1.0 1.0>]      // make high areas white
            }   
   }
   finish {
      ambient 1.0                                  // self illuminating
      diffuse 0.0                                  // ignore diffuse lighting, there is none
      specular 0.0                                 // ignore specular lighting, there is none
   }
};
A heightmap will look much more 3D than converting a photo.

I looked at that VCarve site you mentioned. It seems the VCarve guys have another piece of software called VCut that's meant for importing 3D models, and it supports several file formats that AC3D can write to. Perhaps write them and see what they think?
lisa is offline   Reply With Quote
Old 13th July 2007, 05:05 AM   #5
radrawing
Junior Member
Junior member
 
Join Date: Jul 2007
Posts: 6
Default Re: A face from a photo

Lisa

I do thank you for your help.
Now, I have downloaded POVRay and there seems to be lots of learning. Stunning results in the examples.
Anyway. I have been looking at my BMP2CNC program and yes it dose give a good result. The program converts photos or any pictures to a height map. The lighter parts of the photo will be higher and the black lower. But by setting the depth to 6mm and blond hair on dark skin comes out as if they have had an accident. Now this gets closer when I edit the photo to negative and change setting in BMP2CNC. I have just noticed that BMP2CNC can save the map to a stl file. I thought export this into AC3D then I can pull up say the hair in front of the face to the correct position.
I saved the file as a stl. And exported it in. I get a small green box with arrows but there is nothing there. I have tried scaling up to 1000 but no joy. When I click of the box, the box disappears. So, can I be near. Am I doing something wrong?

Roger
radrawing is offline   Reply With Quote
Old 13th July 2007, 05:30 AM   #6
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: A face from a photo

Hi Roger,

AC3D's stl support is ASCII ( not binary-stl). Could this be the problem here?

I know a number of our users use Cut3D e.g. GreaseTattoo http://www.inivis.com/forum/showthread.php?t=4236. There may be others on the Vectric forum.

Let us know how you get on (and post some of your results ).

Andy
Andy is offline   Reply With Quote
Old 13th July 2007, 07:21 PM   #7
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: A face from a photo

Yes, please, post some pics when you're done. Just curious, Roger, you said you built your own machine... was it hard to do? Was it a kit\conversion, or totally from scratch? I'd really love to have my own someday.

Oh, here's a file with an old model of mine built in AC3D and exported to POV with the slope-map thing so you can see what I was thinking: http://download.tenfootpolesoftware.com/tmp/bear.zip You should be able to just copy and paste your own model over mine in the POV file if you want to use it... I know POVRay has a bit of a learning curve.

Here's another pic in red-blue instead of black and white to make the heightmap conversion easier to see.
Attached Images
 
lisa is offline   Reply With Quote
Old 14th July 2007, 05:45 AM   #8
radrawing
Junior Member
Junior member
 
Join Date: Jul 2007
Posts: 6
Default Re: A face from a photo

Hi Andy, Lisa

Andy
I have contacted BMP2CNC to ask about the ASII type files but I don’t think I will be having much joy. There support is rubbish. I have asked for help on various occasions and no replies.
Here are three pics from the program of a test face. It takes about 30 seconds to produce from scratch to the cnc Gcode. The pic is the photo, the second is the result and the third is a close up of the map. Can you see my point. The pupils in the eyes will look weird.

Lisa
Router CNC machines are so easy to make. My first was out of MDF with tubes and skate bearings for the slides OK. My next was out of steel and hard wood. I can cut 400x700x100. On this one I have purchased some special linear bearings. Wow what a difference. The tolerance I about 0.30mm. My next machine will be aluminium. You make up a sliding xyz axis. The more ridged the better. You use stepper motors to turn the treaded rods. A standard stepper with one pulse from the computer will turn 1.8deg. You turn a nut on a rod at 1.8deg and you get a very small movement. Steppers are from £10 up. Next, the drive board. I bought a kit from hobby cnc USA.
Then a computer. Then the software to read the Gcode. I purchased MACH3 from Artsoft. Now you need software to produce your images. It’s a fantastic hobby. Go to google a search hobby cnc, cnc zone. Look in goggle pictures.

The last pic is my latest customers house plaque. Here it is before the cut.

I don't know if you will see the pics as this site is saying it's having problems.

Roger
radrawing is offline   Reply With Quote
Old 14th July 2007, 07:34 AM   #9
Andy
Administrator
Professional user
 
Andy's Avatar
 
Join Date: Jun 2003
Posts: 4,563
Default Re: A face from a photo

Roger - make the images a bit smaller 640x480 or smaller is good (and medium compression if using jpeg).

Looking forward to seeing the pics!
Andy is offline   Reply With Quote
Old 14th July 2007, 01:35 PM   #10
radrawing
Junior Member
Junior member
 
Join Date: Jul 2007
Posts: 6
Default Re: A face from a photo

Here we go with the pics. I hope.
Here is the origional photo.
Name:  ScreenHunter_01 Jul. 14 10.05.gif
Views: 2235
Size:  46.8 KB
Here it is converted in BMP2CNC.
Name:  ScreenHunter_02 Jul. 14 10.05.gif
Views: 2288
Size:  28.3 KB
radrawing is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 12:24 PM.


AC3D Forum
(C) Inivis Limited 2020