43
$\begingroup$

How do you snap an object on top of the surface of another object? I tried using the shrinkwrap modifier but that produced weird results.

If I have a cone, and a cube - I want to move the cone around so that it snaps perfectly along the faces of the cube

enter image description here

$\endgroup$
40
$\begingroup$

Use Blender's snapping feature with Snap Element set to Face. The configuration group is right on the 3D View's header.

If you activate Snap during Transform (Shift + Tab or the magnet button), you don't have to hold Ctrl while grabbing the object.

You can also Align rotation with Snapping Target (2nd button from the right) so the snapped object aligns its orientation with the face's normal.

...

It's possible to snap the lower (-Z) part of an object to another's surface, by placing the object above its intended target. It seems snapping uses the nearest point of grabbed object, and its relative position to target before transformation. I get these inconsistent snapping positions if the object's moved from above the target, and need manual adjustment to keep it outside the surface:

...

$\endgroup$
  • 3
    $\begingroup$ That works very well, the only slight gripe is that it it will place the objects origin on the face of the other object. However, although I could see why snapping the origin makes sense, what I really am looking for is snapping object A's face to object B's face $\endgroup$ – onedayitwillmake Jun 1 '13 at 1:05
  • $\begingroup$ It is possible to snap the surface, though only in certain orientation. Edited my answer accordingly. $\endgroup$ – Adhi Jun 1 '13 at 2:11
  • $\begingroup$ Doesn't work for me youtu.be/Y3K_3w8wfr8 $\endgroup$ – Dims Nov 28 '15 at 15:06
7
$\begingroup$

Adhi's answer says it all, but I really recommend you to check out step 18 and 19 of this tutorial: Modeling A Modern Interior Scene In Blender. It explains how Blender aligns the orientation of a snapping object.

"Once you’ve turned the snapping on, set the snap element to ‘Face’ and the snap target to ‘Active’. In the 3d viewport header, next to those options you’ll see two icons, make sure the first one, ‘Align rotation with the snapping target’ is selected, and the second one, ‘Project individual elements on the surface of another objects’ is deselected. You just told Blender to snap the active object (using the origin as reference), to the face of another object and to match it’s rotation. The way the rotation matching works is that Blender aligns the objects local Z Axis (img. 2) with the normal of the face you are snapping it to (img. 1). This is very important for you to understand so make a couple of tests until you feel comfortable with it."

$\endgroup$
  • 4
    $\begingroup$ It's always good to leave a summary of sorts, just in case the link goes. $\endgroup$ – iKlsR Jun 1 '13 at 1:20
  • $\begingroup$ "The way the rotation matching works is that Blender aligns the objects local Z Axis (img. 2) with the normal of the face you are snapping it to (img. 1)." that explains the weird behaviour. $\endgroup$ – bubakazouba Dec 11 '18 at 2:40
5
$\begingroup$

The snapping behavior is good for getting the objects touching, but I had trouble getting the rotation to work correctly. After much searching I finally stumbled upon using custom Transform Orientations.

In edit mode, select the face of the object you want to align to.

Create a Transform Orientation from Selection (which is down at the bottom of the Properties toolbar (N), in the Transform Orientations section. Looks like a +)

In object mode, select the object that you want aligned.

Select your new Transform Orientation, (should be called Face, in the Transform Orientations section of the Properties toolbar.)

Now use Object->Transform->Align to Transform Orientation

$\endgroup$
  • 2
    $\begingroup$ Can you please elaborate this procedure ? (object selection order, how to access the function you quote...) $\endgroup$ – Polosson Jan 5 '14 at 2:53
  • $\begingroup$ I elaborated somewhat, hope that it's clearer now :) Also I'm pretty new to blender so if I mislabeled something lemme know. $\endgroup$ – sleepylemur Jan 5 '14 at 19:02
4
$\begingroup$

Snapping any face to any other face works quite reliably with a custom Transform Orientation and a helper object as described in How to Align Any 2 Faces .

Snapping to any face in Blender 2.8

We want to have this, but the round object is rotated in an unsuitable fashion.

enter image description here

Step 1 – Select the face to align in edit mode, and create a new Transform Orientation (called “Face” here). Back in object mode, add a new plane.

enter image description here

Step 2 – Select the plane and apply the “Face” Transform Orientation with Object > Transform > Align to Transform Orientation. This rotates the plane so its normal points the same way as the normal of the previously selected face. Then, parent the object to the plane.

enter image description here

Step 3 – Select the plane, reset its rotation with Alt+R to rotate it together with the object so the face normal aligns with the global coordinate system. In this case, the object needs to be flipped by another 180°.

enter image description here

Step 4 – Apply the rotation with Ctrl+A. Now the object can be snapped to any face with face snapping and “Align rotation to Target” checked.

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Could you paraphrase or quote some of the information in your links in the body of your answer? Link-only answers are discouraged, as if the links die, the answer does too. Thanks! $\endgroup$ – gandalf3 Jul 10 at 19:16
  • 1
    $\begingroup$ @gandalf3 Done! $\endgroup$ – Simon A. Eugster Jul 12 at 14:21
  • 1
    $\begingroup$ Wow, nice answer! $\endgroup$ – gandalf3 Jul 12 at 18:56
3
$\begingroup$

You can do this with Mesh Align Plus (my addon). After installing the addon, either watch the steps in the GIF or read the text version below:

Align two objects by their faces

The feature you're looking for is the Quick Align Planes operator in the 3D View > Tools Panel (T) > Mesh Align Plus Tab, in its own panel.

1. Pick a destination target (stationary plane that you're aligning to)

  • In edit mode (Tab), shift + right click to select the three verts you want to align your object with
  • Hit Grab Destination

2. Pick a source target (plane that will be aligned with the destination)

  • In edit mode (Tab), shift + right click to select the three verts that need to line up with the destination when the alignment is applied. Leave them selected (and make sure Auto Grab Source is checked, it is by default).

3. Apply the operation

  • Make sure the object you want to move is selected, and (in object mode or edit mode) hit Apply to: Object
$\endgroup$
  • 1
    $\begingroup$ The video explanation is nice, a bit more information on what you're doing and why would be recommended however. Also it's worth mentioning in the text that this is an Addon, just in case the link breaks. This way users know what to search for on Google later on. $\endgroup$ – aliasguru Aug 6 '16 at 15:46
  • $\begingroup$ Good point! I'll update this shortly. $\endgroup$ – egtwobits Aug 6 '16 at 18:10
  • $\begingroup$ It looks like you are the developer of this addon. If so, would you mind disclosing your affiliation in your answer? Thanks. $\endgroup$ – gandalf3 Aug 6 '16 at 18:58
  • $\begingroup$ Will do. Also, it's free/open source, in case anyone want to use the code ;) github.com/egtwobits/mesh-align-plus $\endgroup$ – egtwobits Aug 6 '16 at 19:29
1
$\begingroup$

I made an addon to solve this specific problem:

$\endgroup$
  • 10
    $\begingroup$ It's always good to leave a summary of sorts or usage examples, just in case the link goes etc.. $\endgroup$ – iKlsR Jun 10 '13 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.