Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Pages: 1 [2]

Author Topic: Trackball Rotation in the Sequence Editor  (Read 6155 times)

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1448
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #15 on: March 19, 2016, 11:40:36 am »

I'd forgotten about that kind of linking via ASL.

I know I'm steering the topic shamelessly, but one of the things I was wanting to do when slex asked about it (and one of the examples for why I recently made a post about controller script changes), is to make a "lookAt" script for an arbitrary bone. This is a simple implementation with math of which many examples can be found online, but without the ability to get the position and orientation of a bone, it's nearly impossible to make a lookAt script (or an IK script). Also, things would be simplified if it was just a simple "orientation" parameter rather than separated x/y/z parameters.

Coupled with those changes,

...scene mode in Anim8or would be greatly improved if that script could be implemented and used on gui in some next development built, so the bone/s could be controlled with the target directly- the same way as the object,camera or light can...

If a few enhancements to interfacing between the user and scripts, such as being able to load scene scripts from the scripts directory as script elements (selectable in a scripts menu), and allowing scripts to set parameters the same way parametric shapes are done (in a dialog box via the GUI), with these parameters being keyable, then lookAt, IK, particles, physics, etc can be implemented via scripts in a user-friendly way. Some of these scripts can, if useful enough, be packaged with Anim8or internally and become an integral part of the animation experience.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #16 on: March 19, 2016, 05:41:14 pm »

As I've mentioned before after working on modeling I will be addressing animation.  Many of these issues will improve but not necessarily in the ways described here.
Logged

johnar

  • Sr. Member
  • ****
  • Posts: 814
  • Make it, Move it--Give it Life
    • View Profile
    • youtube vids
Re: Trackball Rotation in the Sequence Editor
« Reply #17 on: July 01, 2016, 12:05:08 pm »

 Toggling trackball visibility seems a bit confusing as is.
 (visibility is being turned on and off in regards to order of selection,  a shortcut key is needed to toggle visibility in this fashion)
 It is also necessary to have the extra option to turn ALL trackball visibility completely off, and stay off until toggled back on. (imho)
 
Logged
%

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #18 on: July 02, 2016, 10:36:13 pm »

johnar: I agree, the trackball visibility option is clumsy to use.  I'll clean this up.  Currently I think that adding a per-bone disable check box in the bone parameters dialog, plus a global button to override this and disable all trackballs would work.  (Or possibly a 3-state button with (Use Bone Default)/(Disable All)/(Enable All), or would that be too confusing?
Logged

johnar

  • Sr. Member
  • ****
  • Posts: 814
  • Make it, Move it--Give it Life
    • View Profile
    • youtube vids
Re: Trackball Rotation in the Sequence Editor
« Reply #19 on: July 03, 2016, 01:29:03 am »

 Hi steve
Adding a per-bone disable checkbox in the bone parameters dialog could actually be un-necessary.
 The option of disabling the visibilty of trackball came about because of the mess created when multiple bones are selected.
 Choosing seperately which bones show trackball and which bones don't, may in reality not be an easilly workable option. (when working intertmittently with single then multiple bones, it would be near impossible, in most cases, to know beforehand which trackballs you need to hide.) (if this doesn't make sense, let me know and i'll try explain more clearly).
 My feelings are that a simple Disable All and then Enable All, would be a good place to start. Perhaps an on/off button in the top(?) toolbar, backed up with a shortcut key, may be all that's required....
 
Logged
%

johnar

  • Sr. Member
  • ****
  • Posts: 814
  • Make it, Move it--Give it Life
    • View Profile
    • youtube vids
Re: Trackball Rotation in the Sequence Editor
« Reply #20 on: July 04, 2016, 06:56:09 am »

Quote
Perhaps an on/off button in the top(?) toolbar
Maybe it would fit in the sidebar, next to the 'axis' button?




« Last Edit: July 04, 2016, 07:03:52 am by johnar »
Logged
%

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #21 on: July 04, 2016, 05:06:54 pm »

Good idea (and nice glowy colors :) )
Logged

daniel99

  • Sr. Member
  • ****
  • Posts: 312
  • Me : Anim8or RULLZ \m/
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #22 on: August 06, 2016, 11:40:36 am »

Hey, Steve. I've just seen this post, and that script is just amazing and very useful.
But I have a little problem, I hope you can help me:

I have a character, and I've tried to link the tail bones to a target (example: bone09, bone10, bone11). All is well and good, but it only reacts to X coordinates.

When I changed the script like this:
________________________
point3 $angles;

$angles = QuaternionToRPY(GetAttributeQuaternion("tail", "orientation"));
$joint.bone09_X = -$angles.x;
$joint.bone09_Y = -$angles.y;

___________________________

I keep getting this error :

Parse error on line 5

So it seems I can not add the Y coordinates, or I'm not doing it right.

Same problem if I try to change the X to Y coordinate:

$angles = QuaternionToRPY(GetAttributeQuaternion("tail", "orientation"));
$joint.bone09_Y = -$angles.y;


Can u help? Thanks!

« Last Edit: August 06, 2016, 11:43:15 am by daniel99 »
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #23 on: August 06, 2016, 09:59:24 pm »

daniel99: Joint controllers are scalars and each controls only one angle: X, Y or Z.  Your script must be for the X joint angle which is why you can't assign the Y component - there is no predefined variable $joint.bone09_X to assign anything to. So you need to write multiple scripts:

1) Double click on the bone09-X joint in the track window to assign the X component to $joint.bone09_X = -angles.x;
2) Double click on the bone09-Y and then bone09-Z and assign them their respective values.

I've attached simple example that does something similar.
Logged

daniel99

  • Sr. Member
  • ****
  • Posts: 312
  • Me : Anim8or RULLZ \m/
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #24 on: August 06, 2016, 11:11:34 pm »

Thanks, Steve.  Got it! :D
Before you replied, I have just rotated the bones in the figure mode, so the X axis became Y axis. (wich I needed most in my scene)

But I did how you said, and now I have control over X and Y axis.
I had to create a keyframe for bone_Y (it didn't show otherwise), and after I created the script, the keyframe disappeared and now the controller works just fine.
One million thanks for this, man!

Btw, any updated versions for the IK tool?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1532
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #25 on: August 07, 2016, 03:21:36 am »

I should be posting an IK update in a day or two :)
Logged

daniel99

  • Sr. Member
  • ****
  • Posts: 312
  • Me : Anim8or RULLZ \m/
    • View Profile
Re: Trackball Rotation in the Sequence Editor
« Reply #26 on: August 07, 2016, 01:07:30 pm »

Great news. Can't wait to test it :D
Logged

johnar

  • Sr. Member
  • ****
  • Posts: 814
  • Make it, Move it--Give it Life
    • View Profile
    • youtube vids
Re: Trackball Rotation in the Sequence Editor
« Reply #27 on: October 06, 2016, 09:29:21 pm »

Hi again steve, and an8 users
Been thinking more about trackball visibility, re difficulty in using overlapping trackballs.
 Just a thought here, but maybe, what if, only the last bone selected shows the trackball. That would end the birdsnest of multiple trackballs showing at once, and if the trackball you need isn't the one showing , when you enter FK from IK, then you just click on the appropriate bone to show the appropriate trackball.
 After all, is there any need to show more than one trackball at a time?
 I'm thinking maybe not??.......
Logged
%
Pages: 1 [2]