Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Is there a script to move the axes to the center of the object itself?  (Read 26746 times)

lppena

  • Sr. Member
  • ****
  • Posts: 299
  • Anim8or, does a body good.
    • View Profile
    • Truespace Anim8or Casual Modeling Forum.

I've been playing around with Anim8or for years but have always struggled with the axes moving off the object center as I edit them. Can the process of moving the objects axes back to the center be done with an ASL script and how would it done? Thanks, Leroy.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile

One quick way you can center the pivot is to select all the faces (Ctrl+A) and then detach faces (Shift+d).

A script can also be made. It'd only work on mesh objects though.
Logged

lppena

  • Sr. Member
  • ****
  • Posts: 299
  • Anim8or, does a body good.
    • View Profile
    • Truespace Anim8or Casual Modeling Forum.

One quick way you can center the pivot is to select all the faces (Ctrl+A) and then detach faces (Shift+d).

A script can also be made. It'd only work on mesh objects though.

A simple script would be nice as my other modeling software has a tool to move the axes to the center of the object, and another one to normalize object rotation back to 0 0 0. What are parameters for working with axes in Anim8or? Thanks.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile

Sounds like I should add a command to do this.

Logged

lppena

  • Sr. Member
  • ****
  • Posts: 299
  • Anim8or, does a body good.
    • View Profile
    • Truespace Anim8or Casual Modeling Forum.

Sounds like I should add a command to do this.



That would be very useful as we edit meshes the axes tend to move around in Anim8or. Thanks Steve, Leroy.
Logged

Hypure

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: Is there a script to move the axes to the center of the object itself?
« Reply #5 on: November 13, 2015, 04:20:07 pm »

Yes that would be nice nice.
Logged

Unobtainium

  • Newbie
  • *
  • Posts: 22
  • Engineer dabbling in various technical arts
    • View Profile

I've been missing those functions as well, would be nice to have them natively in Anim8or.
Logged

Gyperboloid

  • Sr. Member
  • ****
  • Posts: 282
  • It's better not to do anything, than to do nothing
    • View Profile
Re: Is there a script to move the axes to the center of the object itself?
« Reply #7 on: August 15, 2017, 11:55:07 am »

Yeap, a "reset object pivot" whould be a good addition. But should be carefully implemented, like the pivot should have the same orientation ( has the same rotation values ) as the object and not being only set to the center of the object with zero orientation as it does with the join solids command. Also maybe more than one options would be good to have, like set the pivot to the center of world pivot and set the pivot to the upper/lower/left/right corner of the object. That would help in further manipulations on the object like specific rotation and such.
While it is not available yet, the trick somebody can do to simply reset the object pivot to the object's center is to use the " Join Solids" command from the Build Menu as mentioned above, to only that object, since there is no restruction on the number of solids can be joined ( so you can join a single mesh...well to itself ). The only " problem" is that you loose the name of the mesh(es) from that you gave it to the standard  "mesh#" that Anim8or gives it when using the Join Solids command. Other restruction is that you can apply it to one mesh per time ( else, you simply will join several meshes to one with its pivot somewhere in the middle between meshes ) , which wont happen if Steve will implement it so you can reset multiple meshes at once. And the last thing is that after the command, the object pivot gets reset according world pivot, so if you rotate the mesh you may get a result different of what you realy want. See the picture. A cube with a name " little red Cube " ( mesh) ( A ): move its axis in Object/Axis Editor and get the mesh (B), simply rotate the pivot and get the mesh (C) and move and rotate the axis so you get mesh (D). With the Join Solids command ( 3 times , one mesh per time ) you get 3 cubes with names "mesh01", "mesh02","mesh03" e.t.c. BUT, if you have a mesh with orientation different than 0,0,0 like the cube (E) with move pivot or without (G) when you will use the Join Solids command they become as cube (F). Though if Steve will add the "reset pivot possibility" it should go from cubes forms (E) and (F) to final result of cube (G). Don't know actualy if it's possible to implement something like that since the object's orientation relies on the orientation of object axis and not the opposite. ::)
« Last Edit: August 15, 2017, 12:00:52 pm by Gyperboloid »
Logged

RudySchneider

  • Sr. Member
  • ****
  • Posts: 449
  • There are no problems, only opportunities
    • View Profile
Re: Is there a script to move the axes to the center of the object itself?
« Reply #8 on: August 15, 2017, 02:22:31 pm »

It's not just the orientation of an object that would make "correcting" the pivot point, but the symmetry of the object!  For instance, a cube is a symmetrical object, and you could locate the center of the object based on the planes defined by the faces.  But the same can't be said for more complex, non-symmetrical objects.  It's anybody's guess where the "correct" pivot point should be.
Logged
G

Gyperboloid

  • Sr. Member
  • ****
  • Posts: 282
  • It's better not to do anything, than to do nothing
    • View Profile
Re: Is there a script to move the axes to the center of the object itself?
« Reply #9 on: August 15, 2017, 03:52:21 pm »

Well, that, exactly. But I guess you are referring more about user defined object pivot possition in general, rather than center of an object. And for that matter there's the Object/Axis Editor, though an addition to that in Edit Locate menu for exact location of the object axis would be great. As for the center of an object, and particulary quick "reset" of pivot after its random shift ( since I guess that's what most want ), it's not the user who will defind the center of an object, no matter it's a symmetrical or a complex asymmetrical one, but Anim8or itself and doing it always on exact and the only way, by finding actually realy the center of an object by dividing it in half, from the upper ( highest ) to the lower ( bottom ) ( Y - axis ), nearest to the furthest ( Z - axis ) and from one side to the other ( X - axis ), as it actualy did always. The real solution to the problem, I guess, is just to figure out finaly what's going on with that shifting of object pivot position after some non uniform scaling and other scaling manipulations in general.
Logged