i have a script request! (Poses)

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

slice11217 wrote:
Genete wrote: First you store a fixed (but can be modified) number of poses in the first frames (they can be stored in the negative frames after fantastic heyvern discovery.
Well see, this is partly what I'm addressing: if I'm animating and I run into a problem (which happens far more frequently than I'd like for it to), and I need a pose that I didn't anticipate then I'm screwed. The script as it stands right now requires that you anticipate everything you're going to need up front. I don't know about anyone else but this is very difficult to do.
Imagine for a moment that you were using a switch layer with smooth interpolation. The responsibility on anticipate what do you obtain when you interpolate between two switch layers is your responsibility. If you don't like an intermediate pose just modify the points of the vector switch layer. Where? in the frame 0 I guess. Here the same but instead of frame 0 do it in its own frame.
I tried the following but it didn't work: using DarthFurby's head turn file with the script applied to it, I went to one of the vector layers. I picked a random point on the timeline and set a keyframe on the point motion. Then I went to another random point on the timeline and set another, making sure that the two poses would be quite different. My hypothesis was that if I set the two keyframes on the point motion and then removed the script from the layer, that the animation would hold. Alas, it did not.
This script doesn't produce any point motion keyframe. It only would parse the relative bone motion to produce weighted interpolated poses. If you want to fix the point motion to produce its own keyframes you can do it using this or other script. It could solve partially the problem you have. Your work flow would be this:
1) Animate the main poses using bone motion.
2) Grab the point motion keyframes.
3) Remove the script.
4) Fix some intermediate poses you don't like. You'll need to fix each frame because there is a keyframe in each frame.
Genete wrote: They are like the child vector layers of a switch layer but they are fixed. They have not option to have a animation by the time as far as it hasn't its own time line.
Child vector layer as also fixed, but less so. While a child vector is selected I can set point motion animation but while it is interpolating from one child to another, I cannot.


You cannot do that with switch layers but you can modify the origin or the destiny interpolation vector children meanwhile it is interpolating with the ability to place the particular point(s) in the particular place. Later you can recover the original shape of the vector child just copying its keyframe form the frame 0 when needed.
Genete wrote: There are two benefits from the usage of switch layers:
1) Visual control of the interpolated pose
2) You can stop at any intermediate pose and / or can combine several poses at the same time.
I've never been able to combine more than two switch child vector layers at any time. Moreover, the only visual control of an interpolated pose that's available is the timing of it, and I'd personally prefer to be able to manipulate the ease the in/out of that manually.
you're right. The problem is the weight function. it discards every other pose that is far from the selector bone length. It should be more kinds of weighted interpolations for each pose, even influence each weight with the pose bone length, what would give you more flexibility interpolating poses.

The rest of the post has been replied by heyvern.
Anyway, hopefully this makes it a little clearer as to what I'm thinking about. I like the script, I just want more!

-S
You're welcome! :)
User avatar
Víctor Paredes
Site Admin
Posts: 5815
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

hi, i'm glad to see this topic is far to be dead! :D
i'm sorry i have no time right now to read carefully each reply... but i will be back and re-read all the replies.

I have an idea, I don't if it's possible to do, but could be a option to pause the script in one frame, move the points you want in another and resume the script?

i think, what if you have a pause button which creates a keyframe for all the points, then after this keyframe, move the points you want and press the pause button again (to resume the script) so the control bone have the power again?

could it be possible? can a script store a range of frames in which be unavailable?

thanks for all.
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I tried "pausing" with scripting for different purposes and it just doesn't work. There is no way to "stop" the playing of an AS file with a script that way.

I was trying to create "interactive" tutorials within AS that would start and stop like Flash (I used a counter to go back to the same frame x times before moving on). It actually worked but it kept throwing weird lua errors (with no line reference) for no apparent reason.

There isn't a script interface control for "play" and "stop".

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

But it should be possible to allow disable temporary the embedded script using a cross variable modified by a button script for example.
DarthFurby
Posts: 510
Joined: Sat Jul 29, 2006 1:34 pm
Location: New York City
Contact:

Post by DarthFurby »

If you disable the script doesn't the mesh revert back to it's default state?

I agree with slice, there should be a way to keyframe/save the point motion between pose bones, and modify them anywhere on the timeline, ideally while the pose bone script is still active.
slice11217
Posts: 279
Joined: Thu Mar 30, 2006 6:12 pm
Location: Verona, New Jersey

Post by slice11217 »

DarthFurby wrote:If you disable the script doesn't the mesh revert back to it's default state?

I agree with slice, there should be a way to keyframe/save the point motion between pose bones, and modify them anywhere on the timeline, ideally while the pose bone script is still active.
Hi again.

I was a little tired and irritable yesterday so I decided to wait 'til today when I'm a little less distracted by The Dark Knight to comment about this.

I'll admit that I was a little whiney when I was talking about the amount of work involved with the mouth phenomes. You're right, there's no getting around it, it's gonna be a lot of work no matter how you slice it.

Here's the thing, and I think this is getting lost in what I'm saying here: I like this script and the idea/implementation of it. It makes an otherwise complicated and tedious process simpler and easier. I simply think there could be more to it, and I say this based on experiences I've had where you work yourself to the ground on something and then at the 11th hour a director asks you to make a change to your project that he sees as being very small but to you is quite a huge effort.

Suppose for example, that you have a scene where with a character reacting to something another character says. Character 1 swings his head rapidly in reaction to Character 2. You do it by the script and the timing's right and your director voices reservations but approves it anyway.

Then later, after he's seen the shot a dozen times in the edit suite he realizes what's missing: he'd like a smear frame on the animation of Character 1 ala Chuck Jones' The Dover Boys. Well, you've got some work to do now! The script as it stands forces you to disable it, create the smear frames, create new point bones for it (and hopefully all this won't destroy or otherwise make the animation you've already set up turn all wonky), and then re-enable everything and hope it all works.

Moreover, what if said Director then sees the smear frames, likes it, but wants it to be a little different, to tweak it a little more. Then you've got to go through the above process all over again.

This is why I think that it might be good to have the script in such a way where the point animation can somehow be left unlocked, just to make the modifications a little easier. I've worked in far too many production environments where similar things happen, and far too often.

Further, suppose you've successfully done 30 scenes using this script. Then the director calls for just a little more emotion out of the character; the character's supposed to go from neutral to angry and his face doesn't really show the transition. You've not had a need for 'angry phenomes' before now, and since his head is turning this is a lot of work to re-incorporate back into this script.

I guess the thing is that I'm coming at this from a production environment, with problems that I see everyday in the studio. When you're working on your own project and there's no deadline then the problems that I illustrate here aren't as big, but when other outside people are involved things can get kinda hairy. Right now I'm working on a show where the production types have no idea what it takes to carry out the directions as they're laid out in the animatic and at no point do they ask for consultation about the best/easiest way to do it. This is a problem you don't have to deal with when you're working on a project solo. You can simply plan for the problem ahead of time.

Again, I like the script and I like how it's implemented. I don't want to make anyone feel as though I'm raining on their parade because I know that a lot of thought went into the script itself. I know I was a bit whiney before and I'm sorry about that and yet I think that there's still a level at which the script could have just a little more functionality to it.

Thanks,

S.
User avatar
Víctor Paredes
Site Admin
Posts: 5815
Joined: Wed Jan 26, 2005 12:18 am
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Genete wrote:But it should be possible to allow disable temporary the embedded script using a cross variable modified by a button script for example.
DarthFurby wrote:If you disable the script doesn't the mesh revert back to it's default state?
But what if when you disable the script, it create a keyframe of the points, so you mantain the actual shape?
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

selgin wrote:
Genete wrote:But it should be possible to allow disable temporary the embedded script using a cross variable modified by a button script for example.
DarthFurby wrote:If you disable the script doesn't the mesh revert back to it's default state?
But what if when you disable the script, it create a keyframe of the points, so you mantain the actual shape?
I didn't mean to disable the script like the normal user would do. I mean that the embedded script would do the following meanwhile it is active:

if a variable (shared with the external button script) is ON then do the script thing as usual.
Is the same variable is OFF then simply return. The embedded script is not working and you could insert keyframes and tweak points.

The script should do one thing more when the variable is ON: BEFORE force the point to move it would look if there is a keyframe for the current point in the current frame. If there is then use the keyframe value, if not then move it as interpolated between poses.

This would allow the user tweak some frames and let the script do the rest of animation.

Even more, if other external shared variable is ON then not only move the point but create a keyframe if there is none on the current frame (you only can run this one time obviously because in the second one you just written keyframes would override the script work). This would allow the user who is frightened on using script to save the animation by keyframes before render it.

Please be patience with me and my contributions. I have so less free time ;)

-G
DarthFurby
Posts: 510
Joined: Sat Jul 29, 2006 1:34 pm
Location: New York City
Contact:

Post by DarthFurby »

selgin: Don't you think it would be better if we could adjust the pose bones AND point motion at the same time? Keying the point motion while turning off the pose bones is also a good solution, but I feel it's not as flexible. However, your proposal may be the most reasonable given our limited resources. After all, there is only so much Genete to go around. Until we get him into a cloning lab, only one copy exists.

Genete: Here is my proposal: I will create a pose bones head turn model of your choice from any character in my gallery, AND make a video tutorial/promotional video about the script, if you can fulfill my feature request, which is this:
The ability to key/adjust the pose bone and point motion at the same time anywhere on the timeline, including the following channels:
Point Motion, Selected Point Motion, Point Curvature, Selected Point Curvature, Fill Color, Selected Fill Color, Line Color, and Selected Line Color.

I don't know if it's possible, but I'd love to see it happen.

Post a picture of the character you want me to use if you accept the deal(gallery is http://darthfurby.blogspot.com), or tell me it can't be done. Either way, I always look forward to seeing any progress on the script!
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

I thought this thread had stopped ages ago,it's not flagging for me. :? Ironic as I'm so interested in it and the script has so much potential, so I'm posting merely to get updates on it's progress. :)
It seems to work so well judging by dark furby's excellent example.
Thanks Genete. Vern. Trip et al.
Did anyone notice the page turn/ peeling effect that you can get by putting the bones in 2 vertically aligned pairs?

I'm gonna give it a try now and probably start asking stupid questions , so I'll make a pre-emptive apology.....sorry guys :wink:

First one , do the pose bones have to be in a linear pattern or can we do the pose array as Selgin first suggested??
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

The pose bones can be any where you want. Scattered to the wind or neatly lined up.

-vern
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Ummm I'm feeling a little stupid.
Can someone demonstrate how to get the script to work this smily face file, based on Selgin's original idea?
My poses are snapping not morphing.:cry:
I have had some success with linear poses but not with the look up/down additions or with extra bones(note my eyebrows don't budge).
So... if I put all the pose bones in a row, it works very well from one to another, but what about the full array?
Is this not possible? IS the pose array not to be?
ImageImage
Here are the project files....anyway .
http://charleskenway.com/anime/poseface.zip
http://charleskenway.com/anime/posefacelinear.zip
:D
User avatar
heyvern
Posts: 7042
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Try making the pose and boneselector bones longer on frame 0.

I think it has to do with bone strength and length. Unitl it gets close enough to a pose bone that has influence it "snaps". By increasing the length on frame 0 the "blend" works better. Maybe increasing strength helps too.

-vern
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Thanks Vern I tried that and I've updated the poseface .anme file above, still no luck, it does however now snap to the centre pose in between the other poses.
DarthFurby
Posts: 510
Joined: Sat Jul 29, 2006 1:34 pm
Location: New York City
Contact:

Post by DarthFurby »

At least 2 pose bones need to be in the blue circle of influence of the pose selector bone for a smooth morph. The picutre on the right has pose 3 and pose 4 bones in the circle. The picture on the left has no bones in the circle. You can still set up the array, just space the pose bones closer together. Or move the pose bones to the selector bone instead of vice versa.
Post Reply