0
$\begingroup$

I'm trying to set the origin of a mesh to the center.

Originally the rocket and the launcher were stacked over each other:

enter image description here

I have "put" the rocket into the launcher.

I have used Object -> Set Origin -> Origin to Center of Mass (Volume), and it resulted in this origin:

enter image description here

The arrows that I have added in GIMP reveal that there's a problem, as they don't have the same length.

What might be the problem here?

I have uploaded my Blend file here.

Thank you so much!!

Edit: Here is a screenshot of where the 3D Cursor is for me after I have clicked "Cursor to Selected":

enter image description here

The 3D is not centered vertically. What might go wrong here for me?

$\endgroup$
5
  • $\begingroup$ Shift+S to snap. To set the origin Go to Object>Set Origin. A lot of the keyboard shortcuts disappeared in 2.8. You can re-assign them or create your own. $\endgroup$
    – user1853
    Jun 7, 2019 at 2:09
  • $\begingroup$ Read: developer.blender.org/T55162 $\endgroup$
    – user1853
    Jun 7, 2019 at 2:12
  • $\begingroup$ The video shows you in Object Mode. When snapping the cursor in that context, as @cegaton says in his answer, 'selected' means the location of the selected object, as defined by its existing origin. Or, if there is more than one object selected, the average location of their existing origins. Vertex locations are ignored, unless you have made a selection of them to snap the cursor in Edit Mode, or directly choose one of the 'Origin to..' options, not using the cursor. $\endgroup$
    – Robin Betts
    Jun 7, 2019 at 14:51
  • $\begingroup$ @RobinBetts I have tried that, it didn't place the origin where I would expect it to be. I have uploaded the Blend file to the post now if somebody wants to try it himself. $\endgroup$
    – tmighty
    Jun 9, 2019 at 14:07
  • $\begingroup$ @tmighty .. see edit to answer.. is this what you were after? $\endgroup$
    – Robin Betts
    Jun 9, 2019 at 18:18

3 Answers 3

5
$\begingroup$

Further to @cegaton's answer.. the behavior of Shift S Cursor to Selected respects the current Pivot point.

enter image description here

in Edit Mode with all selected:

  • if the Pivot is set to 'Median', the cursor goes to the location of the smaller empty in the illustration, at an average position of of Suzanne's selected vertices, giving them all equal weight. Since she has more vertices in her face than at the back of her head, that drags the location towards the front.
  • If the Pivot is set to 'Bounding Box' the cursor is sent to location of the larger empty, at the center of Suzanne's bounding box.

I'm not sure if this is what you want, but illustrated below is the result of Shift S Cursor to Selected in Edit Mode, with all vertices selected, and the Pivot set to Bounding Box Center, followed by Shift Alt O in Object Mode > Origin to 3D Cursor

enter image description here

The cursor and origin are at the center of the object's bounding box.

The "Bounding Box Center" option is located here:

enter image description here

$\endgroup$
6
  • $\begingroup$ Thank you very much. I have edited my question because I wasn't sure if I explained it correctly. $\endgroup$
    – tmighty
    Jun 7, 2019 at 20:25
  • $\begingroup$ Could you please tell me which Shortcut you've used to switch to this "Camera setting" in the latest picture? $\endgroup$
    – tmighty
    Jun 11, 2019 at 13:48
  • $\begingroup$ I have added another screenshot to my post. This screenshot should were the 3D Cursor is located for me. It's not centered vertically. But for you, it is, have I understood that correctly? $\endgroup$
    – tmighty
    Jun 11, 2019 at 13:57
  • $\begingroup$ @tmighty Your picture shows your Pivot set to 'Median', (just to the right of the 'Global' Xform Orientation, header center). The Pivot should be set to 'Bounding Box' to send the cursor to the right place. (The view is as yours, Numpad 5 Ortho, Numpad 1 Front. For illustration, I put the object's origin at the center of its bounding box as described, switched on 'Bounds' > ' Box ' in Properties > Object > Viewport Display, set the position of the object to world 0, and rotated it to get landscape proportions) $\endgroup$
    – Robin Betts
    Jun 11, 2019 at 15:43
  • 1
    $\begingroup$ @tmighty Cheers. I hope the edit tidies it up a bit. The interface bit is a little tricky.. different location in the two versions. $\endgroup$
    – Robin Betts
    Jun 13, 2019 at 20:31
2
$\begingroup$

When you use "cursor to selected" in Object Mode, the cursor will move to the object's origin.

If you need to place the cursor in the middle of some vertex group, you need to enter Edit Mode. Select the vertex group, and then use cursor to selected.

Exit edit mode and use Set Origin to 3D cursor.

$\endgroup$
2
  • $\begingroup$ Thank you, but I think the problem is not clear yet. My mesh consists of 2 vertex groups. If I don't select any vertex group, the cursor is still placed in the middle of the first vertex group, I think. I have edited my post and added the link to a video where I show the problem. $\endgroup$
    – tmighty
    Jun 7, 2019 at 11:28
  • $\begingroup$ I have found out that my problem is not related to the vertex groups. Even if I delete the vertex groups and don't use the 3D cursor, the origin is not where I expect it to be. I have uploaded my Blend and added a link to it in my post in case you want to have a look at it yourself. $\endgroup$
    – tmighty
    Jun 9, 2019 at 14:09
2
$\begingroup$

Copy location constraints

Particularly in regard to

However, the origin is still not where I expected it. Blender seems to put it in the center of the "launcher" vertex group. However, I would like to have it in the center of both the launcher and the rocket vertex group.

Similarly to the method used in my answer to this one How to get a Center Point from multiple Vertex Locations?

The copy location constraint can be subtargeted to a vertex group. And add more constraints for more vertex groups to get an average location, and see where this is before setting the origin.

enter image description here Simple setup, empty displayed as a circle.

As a very basic example I have stretched the default cube in z and made the top face the "Top" vertex group, the bottom "Bottom"

An empty is added to the scene with two copy location constaints, the first with influence 1 targetting "Top" vertex group, and the second influence 0.5 the "Bottom"

There is some influence to from the vertex group weights, especially if they are zeroed.

Adjusting the second constraint influence moves the empty between them.

Further fine tuning can be achieved, by setting empty's modifier offset to true and tweaking empty location.

Once you are happy with the location of empty, snap the cursor to it and set the geometry from it.

$\endgroup$
1
  • $\begingroup$ Thank you. I have stripped down my project very much, and the problem is still the same. $\endgroup$
    – tmighty
    Jun 7, 2019 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .