Go Back   AC3D Forums > Resources > AC3D Tutorials and How-To's
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 4th October 2007, 04:57 AM   #1
Vespa
Junior Member
Junior member
 
Join Date: Nov 2006
Posts: 6
Default Rotated objects.

I need some help about a rotated object. It's a simple flat square that has a rotation angle on each plane.

I need to move it positioning on 0,0,0 coordinate (no trouble about that) and I need to rotate it to align the model to the x,y,z planes, figuring out the exact degrees of rotation.

How could I do that? Is there any plugin to perform this action?
Vespa is offline   Reply With Quote
Old 4th October 2007, 12:01 PM   #2
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: Rotated objects.

I can give you the math if you want to calculate the angle by pencil and paper:

- Align each axis one at a time. You'll want to repeat this procedure for each axis until aligned.
- For convenience, select an edge that's already nearly aligned with the axis you want to align to. Write down the position of the two end vertices.
- Create a vector by subtracting the first vertex from the second.
- Normalize your vector making it a unit vector. You can do this by first calculating the magnitude of the vector using Pythagoras: square root of x^2 + y^2 + z^2. Then, divide the x, y, and z components of your vector by the magnitude.
- Calculate the dot product (inner product) of your normalized vector and the axis you want to align to.
- Take the arc cosine of your dot product. This is the angle, in radians, you want to rotate by.

Just curious, though... why do you need it so precise? I'd think you could get it pretty close just by eyeballing it, then square up the corners after you rotate. (I assume you're doing something more tricky than that!)
lisa is offline   Reply With Quote
Old 4th October 2007, 02:42 PM   #3
Vespa
Junior Member
Junior member
 
Join Date: Nov 2006
Posts: 6
Default Re: Rotated objects.

Hi lisa, really thx for help even if....this is too much complicated for me:roll:

How can I align each axis? Just trying and guess?
From this point I'm lost

I need to do that since I have to use that gauge into a cockpit model. The game engine need objects aligned with the three axis and I have to write correct rotation value into a txt file.

I'm embarassed but...it looks so complicated for me...
Vespa is offline   Reply With Quote
Old 5th October 2007, 06:33 PM   #4
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: Rotated objects.

Lol! Nothing to be embarrassed about, it's not the kind of math most people do every day. How much algebra\geometry do you know? Is there something specific I could walk you through, or is it all soup?

Yes, you could do it by "guess and check". Or, better yet, just enter 1 degree--or less than a degree if you need more precision--in the angle for the Rotate button. Keep hitting the button until your shape looks aligned. Count the number of times you hit the button, and that's the angle you rotate by. Again, you'll need to do each axis one at a time.

Make sure you perform your rotations in the same order that the game is expecting. Most games want rotations in X,Y,Z order, but occassionally they might ask for something else. Also, make sure you enter your angle in degrees or radians as the game expects. You can use google to convert
(ie. Search 'convert 90 degrees to radians', etc.)
lisa is offline   Reply With Quote
Old 9th October 2007, 03:48 PM   #5
Vespa
Junior Member
Junior member
 
Join Date: Nov 2006
Posts: 6
Default Re: Rotated objects.

After 5 days of tryals I'm getting crazy and not able to align the damned surface correctly.

Any way to get some help about this issue?

Weird that AC3D doesn't have a tool to do that
Vespa is offline   Reply With Quote
Old 9th October 2007, 05:33 PM   #6
lisa
Senior Member
Professional user
 
lisa's Avatar
 
Join Date: Mar 2005
Location: Phoenix, AZ
Posts: 917
Default Re: Rotated objects.

Can you post your file?
lisa is offline   Reply With Quote
Old 9th October 2007, 07:33 PM   #7
luuckyy
Senior Member
Professional user
 
luuckyy's Avatar
 
Join Date: Jul 2005
Location: France
Posts: 737
Default Re: Rotated objects.

Quote:
Originally Posted by Vespa View Post
Any way to get some help about this issue?
What I would do myself in this case :

- Select your object and press the ">" near the "size to" panel (to memorize the size of your plane)
- In vertice mode, and using the green handle in the 3D view, align your vertices so that you finally get a plane aligned on each axis
- Then press the "size to" button

That's it, it takes 10 seconds
I just hope you know how to align vertices using the green handle (?).

HTH.
__________________
OL.
luuckyy is offline   Reply With Quote
Old 10th October 2007, 07:06 AM   #8
Vespa
Junior Member
Junior member
 
Join Date: Nov 2006
Posts: 6
Default Re: Rotated objects.

Green handle? :roll:

The objects is here, thx for help: http://twsim.net/download/rotated_object.zip
Vespa is offline   Reply With Quote
Old 10th October 2007, 08:51 AM   #9
luuckyy
Senior Member
Professional user
 
luuckyy's Avatar
 
Join Date: Jul 2005
Location: France
Posts: 737
Default Re: Rotated objects.

Yes the green "handles" ... have a look in the manual chapter "Selecting, resizing, moving and rotating".

Now for your problem :

Press the ">" button (in red on the picture)


In vertice mode, in the front view, left-click on the green square (in red again ...) and drag your mouse to the right till it has no more effect :


Now in the left view, select the 2 vertices at the left of the plane and drag them on the right (the same as above) :


The same for the vertices at the right of the plane :
__________________
OL.

Last edited by luuckyy; 10th October 2007 at 08:53 AM.
luuckyy is offline   Reply With Quote
Old 10th October 2007, 08:52 AM   #10
luuckyy
Senior Member
Professional user
 
luuckyy's Avatar
 
Join Date: Jul 2005
Location: France
Posts: 737
Default Re: Rotated objects.

Now push the "size to" button :



(I've made the plane 2-sided for more visibility on the screen)
__________________
OL.
luuckyy 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 07:48 PM.


AC3D Forum
(C) Inivis Limited 2020