• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

[Blender 2.6x] Axis Orientation Copy?

Messages
588
Country
germany
Hi.

Prior to Blender version 2.5, there was a nice script called "Axis Orientation Copy" which allowed you to change the axis orientation of an object without moving the mesh. In Max, that would equal to manipulating the "Pivot" only. That script was lost in Blender since 2.5 and I've been wondering how to go about this task after moving to Blender 2.6. I have a workaround now but I wondered if I just missed something in the new interface that does just that. Anyone know what I'm talking about?
 
Messages
453
Country
russia
Ok, there is no such easy thing as in 3ds max.. like affect pivot only thing (grab & rotate ) If I understood you right you want to Copy the pivot orientation of another object, so basically the pivot of the first is oriented alike in the second.. I'll try to make lil tut so you can see what do I mean. Honestly I never used this technique in blender, but I just found the work around.. LOL Just bear with me..
 
Messages
588
Country
germany
You are fast, man. but that is not exactly what I meant. I mean for the object to *have* the new orientation as its own "Local" orientation (so when I choose "Local" with the object selected it shows the orientation I want). Here's what I do (note to self):duck::
  1. Add an empty and position it at the origin of the object I want to reorientate (is this even proper english?)
  2. Add the transform orientation (say "Face") I want the object to end in
  3. Align the empty to that transform orientation
  4. Now make the empty parent to the object
  5. Then align the empty to "Global"
  6. Now unparent the object with "Keep Transform"
  7. Then "Object→Apply→Rotation" on the object. now the object has rotation of 0,0,0.
  8. Now align the object to "Face", et voila!

You see that this is a somewhat cumbersome workaround... But I need it for proper animation with rotation.
 
Messages
453
Country
russia
Thanks for the fast compliment :D
Sure I got ya from the first post.. I know what you exactly mean...
Ill try to find the solution if no one else will. As I said that I never used this as my primary use of blender is architectural stuff at some stage..
 
Messages
588
Country
germany
Not sure I follow the question. You want to manipulate the local axis of an object or simply rotate an object on its local axis?

I want to animate an object with rotation about one of its local axis. Let's say I separated a hatch from the fuselage with P. It would now have the same axis orientation as the fuselage. But I need it to animate with respect to another axis at a certain angle. Then I would first have to set the proper axis orientation on the hatch.

Basically, I want to be able to change the "local" coordinate system of an object without affecting its mesh coordinates.
 

hairyspin

Resource contributor
Messages
3,253
Country
unitedkingdom
Sounds as if this is a noticeable difference in method to those of Gmax/Max. Interesting question!
 

Dutcheeseblend

Resource contributor
Messages
1,541
Country
netherlands
I was looking for the same thing, but I didn't find it yet.

Though, I'd use an empty at the proper placing, let it be a parent of the mesh, and animate the parent. Maybe this will work out.
 

Dutcheeseblend

Resource contributor
Messages
1,541
Country
netherlands
Sorry, my option won't work, try instead moving an empty at the proper place, move 3D cursor to Selected, and set origin of the object to 3D cursor.
 
Messages
1,693
Country
unitedstates
I want to animate an object with rotation about one of its local axis. Let's say I separated a hatch from the fuselage with P. It would now have the same axis orientation as the fuselage. But I need it to animate with respect to another axis at a certain angle. Then I would first have to set the proper axis orientation on the hatch.

Basically, I want to be able to change the "local" coordinate system of an object without affecting its mesh coordinates.

You mean separate the mesh selection creating a new object, then manipulating it along the same axis parameters as the original, but not along the same point of origin as the original. Correct? If so you just need to set origin to a new point on the object.

To manipulate along its local axis you just select object, then press the corresponding letter twice for the axis you want manipulation for, that sets manipulation to the objects local axis.

I set the origin in many ways. the best way for door pivot is demonstrated in the images.
 

Attachments

  • blendax.png
    blendax.png
    8.5 KB · Views: 869
  • blendax2.png
    blendax2.png
    83.7 KB · Views: 863
  • blendax3.png
    blendax3.png
    30.4 KB · Views: 798
  • blendax4.png
    blendax4.png
    41.9 KB · Views: 852
  • blendax5.png
    blendax5.png
    20.2 KB · Views: 834
Last edited:
Messages
588
Country
germany
Explanation attempt 1

... then manipulating it along the same axis parameters as the original, but not along the same point of origin as the original. Correct?

No, I need the "local" axis also to be different from the original object's axis (while the mesh has to remain in place). With the "Axis Orientation Copy" script, one would add an empty, orient it in the right direction and then copy the axis directions to the newly created object. How can I explain this?

It's all about the "Local" transform orientation of an object. Let's say I have a rudder to animate. The rotation axis is obviously parallel to the leading edge of the rudder. So I want the rudder's local Z-axis to be aligned with the rotation axis.

I first start by separating the rudder from the fuselage,
aoc_workaround1_zpsfe527fd2.jpg


then setting it's origin to the point i want it to rotate about:
aoc_workaround2_zps34aa1127.jpg


Note that the local Z-axis (blue) of the rudder does not coincide with the axis of rotation (red line). I now create a new transform orientation (called "rudder"), aligned with the desired axis of rotation:
aoc_workaround3_zpseaf3179b.jpg


Note how the blue Z-axis is now parallel to the leading edge of the rudder. THE PROBLEM IS: This is not the rudder's "local" transform orientation, about which the animations are evaluated. So I want to change that "local" orientation to "rudder".
 
Messages
588
Country
germany
What I can do is add an empty, align it to the "rudder" transform orientation, make it parent to the rudder and animate the empty (like Dutcheeseblend said). But for workflow reasons, I don't want to export the empties, so that is actually a bad option, and the animationsmay be "wobbly"...
 

Dutcheeseblend

Resource contributor
Messages
1,541
Country
netherlands
My apologies, the method with an parenting empty won't work:eek: Then the animation is exported as around the initial origin, not the empty's. So you get a rudder flying free around the aircraft.

Again, apologies, I would have bet that it worked...
 

Dutcheeseblend

Resource contributor
Messages
1,541
Country
netherlands
Better try this, could also work:
Create a cube, or plane or any mesh.
Translate it into any desired position.
Remove all verts from this object in edit mode.
Leave Edit mode and select the rudder.
Shift select the empty object you just made.
Ctrl+J, to join it, et voila.

But a lot of work...
 
Messages
588
Country
germany
That's a better solution.

Thx Dutcheeseblend! Why didn't I think of that in the first place? That's a lot easier than my workaround and it should work.

Cheers,
 
Messages
1,693
Country
unitedstates
Thx Dutcheeseblend! Why didn't I think of that in the first place? That's a lot easier than my workaround and it should work.

Cheers,

I was just about to suggest that. There is another way, modify the mesh orientation in edit mode, then rotate in its local mode to the location you want. If you know the end result, this would be the easier method to work in while designing. If you have already completed the modeling, dutcheeseblend suggestion would be mine. There are currently 3 or 4 ways I know of to do this without delving into the console scripting.

Also, as you described with your rudder example, if you are using R then pressing the axis letter, just setting it to local does not manipulate the local variables using those commands. You would need to press Z twice (R + Z+Z ) would set to local modification of the Z axis (restricts along the Z axis, shift+Z+Z would restrict against the Z axis). As long as you are in object mode, it would change the local axis orientation without affecting the global and other object variables.
Just a note, there are a lot of blender scripts out there by 3rd parties that expand blender functionality. It just takes a little searching.
 

Attachments

  • blendaxn.png
    blendaxn.png
    10.8 KB · Views: 1,009
Last edited:

Dutcheeseblend

Resource contributor
Messages
1,541
Country
netherlands
Is it by the way sure that the local animations will work properly? Just to inform, because I remember about a half year ago, local animations were buggy, but maybe it has been a fault of mine.

Just take care.
 
Messages
1,693
Country
unitedstates
Is it by the way sure that the local animations will work properly? Just to inform, because I remember about a half year ago, local animations were buggy, but maybe it has been a fault of mine.

Just take care.

Yea, 2.67 and 2.67a if correct I remember had local issues. Its working fine for me in current version 2.69.
 
Messages
588
Country
germany
Script

Since joining two meshes messes up some internal blender data (like mesh names and maybe materials), I have now written a small script that simply rotates the mesh back in place. Seems to do what I want it to do... (this is in Blender 2.69)
Code:
[COLOR="Green"]#select objects with source as active and run script ;-)[/COLOR]
import bpy, mathutils

def Rotate(myMesh, mat):
    for v in myMesh.vertices:
        vec = mat * v.co
        v.co = vec

source = bpy.context.active_object
objects = bpy.context.selected_objects
mat_source = source.rotation_euler.to_matrix()
mat_source.invert()

for ob in objects:
    if ob != source:
        mat_ob = ob.rotation_euler.to_matrix()
        if ob.type == 'MESH':
            mat = mat_source * mat_ob
            Rotate(ob.data, mat)
            ob.rotation_euler = source.rotation_euler

If you care to test it, here is how: copy/paste the code into your Blender "text editor", select the objects you want to reorientate and select the object with the target orientation last. Click "Run Script" in the text editor (or Alt-P). I might incorporate it in the UI later on when I find out how to do that.
 
Last edited:
Top