Finger curl using scripted operators.

Issues concerning rigging & Face Robot...
Post Reply
User avatar
minilogoguy18
Posts: 83
Joined: 24 Dec 2012, 20:34

Finger curl using scripted operators.

Post by minilogoguy18 » 04 Feb 2017, 06:39

I tried reverse engineering the biped rig that comes with SI but on that I couldn't even figure out how to see the script that controls the fingers.

I'm trying to control my fingers using sliders similar to the stock biped but I don't know enough about the scripting process to even get it to work. I can do it of course using expressions but when I do that I seem to lose the ability to apply action sources that I have stored such as the hand relaxed, in a fist and fingers spread. I there any sort of tutorial out there or maybe someone can type up an example on how to control local rotx using a slider that's stored under a custom parameter?

User avatar
Mathaeus
Posts: 1660
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Finger curl using scripted operators.

Post by Mathaeus » 04 Feb 2017, 17:16

What you want is custom parameter set, I think. If so, you can create it without any scripting, while in case of many parameter in one set, it's probably easier to write a small script in some text editor. Let's say, try to create one simple set just for testing, then copy and adapt the script log for something real with many parameters.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

User avatar
minilogoguy18
Posts: 83
Joined: 24 Dec 2012, 20:34

Re: Finger curl using scripted operators.

Post by minilogoguy18 » 04 Feb 2017, 18:00

Yeah, I've got the custom parameter set made with all the sliders named after each bone but translating that into the motion is what I can't seem to figure out.

I know how to do it through expressions but every time I do that it breaks when I use my poses for the hands so I'm trying to create a scripted operator like the Get>Primitive>Character>Biped uses.

User avatar
AceMastermind
Posts: 150
Joined: 15 Jun 2009, 00:57
Contact:

Re: Finger curl using scripted operators.

Post by AceMastermind » 04 Feb 2017, 19:57

minilogoguy18 wrote:Yeah, I've got the custom parameter set made with all the sliders named after each bone but translating that into the motion is what I can't seem to figure out.
sideshowbob's 2 part video shows how to set up custom parameters to use sliders for animating.
https://vimeo.com/6183375

User avatar
minilogoguy18
Posts: 83
Joined: 24 Dec 2012, 20:34

Re: Finger curl using scripted operators.

Post by minilogoguy18 » 04 Feb 2017, 20:55

Every time I do it that way using expressions though they break when I try to use my scripts that apply a stored pose to relax the hand, make a fist or spread the fingers.

Like I was posting, look at the biped in the primitive menu. It uses some odd method of doing the same things as that video shows but doesn't break the slider when using stored anim poses.

User avatar
Mathaeus
Posts: 1660
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Finger curl using scripted operators.

Post by Mathaeus » 04 Feb 2017, 21:53

minilogoguy18 wrote:Every time I do it that way using expressions though they break when I try to use my scripts that apply a stored pose to relax the hand, make a fist or spread the fingers.

Like I was posting, look at the biped in the primitive menu. It uses some odd method of doing the same things as that video shows but doesn't break the slider when using stored anim poses.
It should not break if you add a proxy parameter. Proxy does not shows link in its divot, it's just a 'clone' of parameter.
However in case of plain expression link from parameter in Custom parameter set, to prevent breaking, you'll want to exclude a driven parameter from storing into clip, let's say to make it no-keyable. Instead, it's parameter from custom set, who is going into clip. Anyway, proxy should be better option.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

User avatar
Draise
Posts: 719
Joined: 09 Oct 2012, 20:48
Skype: ondraise
Location: Colombia

Re: Finger curl using scripted operators.

Post by Draise » 04 Feb 2017, 23:12

It's all screaming ICE to me... it's much easier programming it than using expressions, scripts and animating parameters with keysets. You'd just have to link the custom parameters with equal expressions to what you want to drive, create some controlers, then you can Get Data them parameters and modify them with ICE and the controlers, animating the SRT's of them. I'm uploading a tutorial on it soon.

User avatar
Mathaeus
Posts: 1660
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Finger curl using scripted operators.

Post by Mathaeus » 04 Feb 2017, 23:43

Draise wrote:It's all screaming ICE to me...
Wouldn't say so... Expressions are part of let's say 'core' kinematics in SI, evaluated before constraints, they are blazing fast. Much less of possible problems with them, much faster to evaluate, at least. And btw, proxy parameter is... proxy parameter, not an expression.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

User avatar
minilogoguy18
Posts: 83
Joined: 24 Dec 2012, 20:34

Re: Finger curl using scripted operators.

Post by minilogoguy18 » 05 Feb 2017, 07:50

I guess I worded it wrong but it doesn't seem like proxy parameters aren't going to work, at least I can't seem to get them to.

When I apply a stored pose the fingers that are linked either through expression or proxy don't move, they'll only move with the slider control, I need both.

I found that the Get>Primitive>Model>Biped-Rig has the exact controls that I'm looking for, they just seem to be beyond my knowledge/experience on how to recreate it. It uses both expressions and scripted operators to work. I've also noticed you can run the control in reverse and it doesn't break, meaning, you can rotate the fingers using the standard transform gizmo and watch the sliders move.

If anyone has the time to open the synoptic of the stock biped rig and click on the sliders button under the hands tab to see exactly what I'm talking about. I'm sorta starting to recreate it but I'm doing a bunch of copy/paste without actually understanding how it works. Some odd things to note would be that the rotx on the RHand_grab object seems to move all the sliders at once so it's got some kinda buffer object rather than the bones being directly linked to the sliders.

Thanks for all you guys' help. I'm just a self taught game modder trying to learn how to build advanced rigs lol.

User avatar
Mathaeus
Posts: 1660
Joined: 08 Jun 2009, 21:11
Location: Zagreb, Croatia
Contact:

Re: Finger curl using scripted operators.

Post by Mathaeus » 05 Feb 2017, 14:03

minilogoguy18 wrote:
When I apply a stored pose the fingers that are linked either through expression or proxy don't move, they'll only move with the slider control, I need both.
Well, it should, as long it is proxy parameter, and plain apply action (no one clip in Mixer controls that parameter). Now I have to admit, that I never ever used sliders to animate, anywhere, XSI PPG or Maya Channel Box, so I don't know if there is some 'practical' problem with this. It's always possible to apply the static pose directly.
Anyway VB script code for inspecting from RigSynoptic_T3 is something like that:

Code: Select all

'-------------------------------------------------------
' Lhand Sliders
'-------------------------------------------------------
sub lhand_sliders(in_obj)

	set oRoot = Application.ActiveProject.ActiveScene.Root
 	set myObj = oRoot.FindChild(in_obj)

	Inspectobj myObj.model & ".LArmEff.lhand_sliders"
end sub
'-------------------------------------------------------
'Inspect' here means 'popup that PPG'.
And that's code for applying the particular action, assuming there is action of same name stored in Mixer as Source (so not a live clip).

Code: Select all

'-------------------------------------------------------
' Lhand Relaxed
'-------------------------------------------------------
sub lhand_relaxed(in_obj)

	set oRoot = Application.ActiveProject.ActiveScene.Root
 	set myObj = oRoot.FindChild(in_obj)

	logmessage  "pose: lhand relaxed"
 	ApplyAction myObj.model & ".Mixer.lhand_relaxed"

end sub
'-------------------------------------------------------
I don't see anything connected to 'LArmEff.lhand_sliders', like SCOP or else, it's looking like plain Custom PSet with proxy parameters. Regarding SCOPs, I'll suggest to avoid them unless you're completely sure about what you're doing, otherwise there's chance to run into new chain of misunderstanding, I'm afraid.
The renderer "turtle" used by this scene, is not currently available. The "turtle" renderer will be used instead.

User avatar
minilogoguy18
Posts: 83
Joined: 24 Dec 2012, 20:34

Re: Finger curl using scripted operators.

Post by minilogoguy18 » 05 Feb 2017, 18:11

Seems I was doing it wrong on the Proxy Parameters. I got it working now, thanks so much. This actually works so much better than an expression based control which seems to be the main method that is taught in so many tutorials.

User avatar
sirdavid32
Posts: 157
Joined: 10 Feb 2010, 05:36
Location: Ecuador
Contact:

Re: Finger curl using scripted operators.

Post by sirdavid32 » 25 Jul 2017, 02:04

Could you post a video about this, please? How are you using this method on your own setup?
Thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest