Author Topic: Aligning to weird angles in Blender?  (Read 16731 times)

0 Members and 1 Guest are viewing this topic.

Offline Sannit

  • 22
Aligning to weird angles in Blender?
Hi!  I'm new here, had zero modeling experience as of a few days ago, and until very recently thought a Bezier curve was a type of women's undergarment, so please don't eat me alive.  Please.  Normally starting a topic would not be the first thing for me to do on a new forum, but I've been looking for an answer to this problem for [redacted] hours and I swear thinking about nothing but normals and extrusions and please for the love of all that is holy why won't you snap to the obviously correct vertex at 5:00 AM has actually plunged me into an altered state of consciousness, so I'm bringing out the Shivan Super Lasers and coming to you guys for halp.

So I'm making a cruiser in Blender, as one does, and I've got a wing, which is poking out at God knows what angle, and there's some geometrical decoration that I want to put on it.  I have the decoration, and I have the plane, and all I want to do is put one on the other and be done with it.  If there were some way to A) divine the exact angle of a selected edge relative to that apparently-just-there-for-decoration grid or B) auto-snap a given collection of vertices with a given plane such that they are flush with one another, I'd be all set.  But I can find no such options, and the Internet, sage though it may be, is of no help to me in this matter.

Basically I guess I want a way to magically make two planes be parallel to one another, regardless of whatever funky angles they may have started out at.  Thanks guys!  Unless you don't help me.  In which case, again, please don't with the eating.

 

Offline ION3

  • 27
Re: Aligning to weird angles in Blender?
Which blender version? Edit: may not be important, but you never know.
« Last Edit: December 22, 2010, 08:43:02 am by ION3 »

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Aligning to weird angles in Blender?
Ugh, I feel your pain. 3DS Max has this nifty function called AutoGrid that lets you create any object on a temporary grid aligned with the normal of your selected face... but as far as I know, Blender doesn't. Another frustration is that there's no way (that I know of) to make selected verts/edges/faces coplanar.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

  

Offline ION3

  • 27
Re: Aligning to weird angles in Blender?
You can always align your view to the selected face using the * on the numblock and then edit your object in camera space. But that only works if your object is aligned with the face in the beginning.
« Last Edit: December 22, 2010, 08:59:17 am by ION3 »

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Aligning to weird angles in Blender?
Ah, but you CAN set your new objects to be created relative to camera space...
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline ION3

  • 27
Re: Aligning to weird angles in Blender?
Also try selecting a face and hitting crtl v

 

Offline ION3

  • 27
Re: Aligning to weird angles in Blender?
OK I found a solution. I attached 4 blend files. The first one is a challenge: Align the structure with one of the surfaces of the cube.

The second and third .blend show various stages of the alignment. The fourth file shows the final product.

Blender Rotation Alignment Tutorial

Step by step tutorial:

1. Open rotationtest.blend.
2. Edit mode
3. Set rot/scale/   pivot point to median point. (at the lower edge of the 3D view)
4. select one of the faces of the cube. Hit shift-D S 1.25 enter. I'll call the created plane the "reference plane"
5. Hit P (selected) This makes our reference plane an extra object.
6. Make our "detail" (remember that word) a seperate object, too.
7. Select the "detail", go to edit mode, select all vertices (A) and remove doubles (W).
8. Select the four vertices of the "base surface" (remember that word) of the "detail" which we want to align to our reference plane (which is aligned to one of the cubes surfaces) and use shift-s (cursor to selection).
9. Go to object mode and hit the button "center cursor" under editing/mesh. This moves the origin point of our detail to the center of its base surface.
10. Select the reference plane, go to edit mode, select all vertices and hit Shift-s (cursor to selection).
11. Object mode    Select the detail, Shift-s (selection to cursor)
12. Select the detail and the reference plane and join them. (crtl j)
13. Split the window (go to the lower border of th 3d view (below the buttons) and do a right click (split area)) Split the 3d view in half.
14. In edit mode, select the base surface of the detail and hit Shift-d s 0 enter. This creates a vertex in it's center.
15. Set rotation/scaling pivot to 3d cursor (on the lower border of th 3d view).
16. Select one of the vertexes of the base surface AND the vertex of the reference plane next to it.  Shift-D 1.5 enter
17. Select the two vertexes just created and the vertex in the middle of the base surface. F
18. Keep the selection.
19. Go to editing/mesh tools more   and activate "edge angles"
20. You now see an angle displayed near the center of the base surface. Write it down.
21. Hover your mouse over the left viewport and hit Shift-v (top). Your viewport is now aligned to the polygon and therfore to the angle displayed.
22. In the right viewport select all vertexes exept for the reference plane and the vertex which was a copy of one of the corners of the reference plane. (the right viewport must be used as you are not allowed to shift the view around in the left viewport, as it must stay aligned to the polygon.

You're now at the point of rotationtest2.blend

23. Hover your mouse over the left viewport, hit R and enter the angle which you wrote down before. Hit enter. (maybe you need to set a minus in front of the angle)
24. If you now shift-select the lone vertex, which was a copy of a corner of the reference plane, our angle in the middle of the base surface should pop up. It should read 0.

Now you can repeat steps 16-24 for one of the other corners and then the detail should be aligned to the reference surface.

[attachment deleted by admin]
« Last Edit: December 22, 2010, 11:07:41 am by ION3 »

 

Offline esarai

  • 29
  • Steathy boi
Re: Aligning to weird angles in Blender?
Aight, there are a few tricks you should know about that will help you greatly.

1.  There is a function called 'Edge Angles' in the Editing Buttons (F9) view, in the 'Mesh Tools More' box.  What you need to do is make a duplicate of the vertices creating the corner you want to align to, scale it by zero along the axis you are viewing it from (assuming you're looking down either the x or y axis).  Then, make a face from these new vertices and turn edge angles on.  This will give you the angle of the corner.  But, what if there isn't an edge of this face parallel to a global axis?  Then delete one vertice, select the center vertex of the corner you're attempting to measure, press e and extrude constrained to a global axis.  Then repeat.  This will give you the proper angle.

2.  Select the face you wish to align to, press shift+v, and select top.  You will now be staring straight down at the face.  Press shift+s to bring up the snap menu, and snap cursor to active.  Then, go to object mode, select the object you wish to snap, press shift+s again, and snap active to cursor.  Your surface detail will now be centered at the face median point.  Go ahead, select view front or side (whichever is relevant) and rotate until it looks about parallel, or with step 1 complete, press n and enter the angle value you got into the Rot<axisname> field in the transform properties box.  <axisname> is the name of whatever axis you were looking down at the time you took the angle measurements.  For increased control, in editmode, in the header of the 3D window, find the dropdown menu that says 'global.'  If you set it to anything else, you change the axes about which the transform widget will act, and can use this to make adjusting the location of the detail piece easier by setting it to local.  When you grab or scale and wish to constrain to the widget, press the axis to constrain about twice, and it'll switch from global axises to the axises defined by the widget (global, local, normal, view). 

I hope these two bits help you out.
<Nuclear>   truth: the good samaritan actually checked for proof of citizenship and health insurance
<Axem>   did anyone catch jesus' birth certificate?
<Nuclear>   and jesus didnt actually give the 5000 their fish...he gave it to the romans and let it trickle down
<Axem>and he was totally pro tax breaks
<Axem>he threw out all those tax collectors at the temple
<Nuclear>   he drove a V8 camel too
<Nuclear>   with a sword rack for his fully-automatic daggers

Esarai: hey gaiz, what's a good improvised, final attack for a ship fighting to buy others time to escape to use?
RangerKarl|AtWork: stick your penis in the warp core
DarthGeek: no don't do that
amki: don't EVER do that

 

Offline ION3

  • 27
Re: Aligning to weird angles in Blender?
I tried that eserai and i don't understand it.

Edit: Damn I need to continue the terran standart container.
« Last Edit: December 22, 2010, 11:13:25 am by ION3 »

 

Offline ION3

  • 27
Re: Aligning to weird angles in Blender?
I think my method only works if there is a vertex in the middle of the base surface, and two other vertexes, also in the plane of the base surface, which form a triangle with the center vertex. That triangle must have a 90 degree angle at the corner of the center vertex.

A Similar right angled triangle must exist on the surface which we want to align our object to. These vertexes already exist in my above example, because i used squares.

 

Offline Sannit

  • 22
Re: Aligning to weird angles in Blender?
Thanks guys!  Unfortunately I don't think I really have the stamina to pull off what I was trying to do, even with your help.  Somewhere around the 15,000 vertex point for one wing's worth of decoration my will to live was shattered.

Oh well.  Thanks anyway, again.  Your helpfulness has restored my faith in humanity, if nothing else.

 
Re: Aligning to weird angles in Blender?
I'm resurrecting this old thread because I was struggling for hours with the same problem and this is one of the threads I read while searching for a good solution. I finally found a great, relatively simple way of straightening objects that are inclined in Blender. This method does not require any scripts or addons and it should be perfectly accurate. Here's a short video explaining the process:
http://oneminutevideotutorials.com/?p=142