Jump to content

IK Foot Rig With 5 Toes


MatrixNAN

Recommended Posts

  • 2 weeks later...

Arctor I am going with that. I am going to do a double one so I have forward toe wiggle and Inverse. :) Hopefully I will have it done this weekend I started writing code to do it but then I realised what am I doing I can just center it with the other balls of the foot. My one concern though with this idea is that the balls of the feet do not line up perfectly so there would be problems with the working smothly throughout all the toes. Grrr. So that means go back to coding. I know what the code would look like in say C++ so I am going to write a sort code snipet of what I want to do and hopefully the great minds here will know how to translate it.

Code

OnEventBallsControlRotation do

{

Ball1Control.RX = BallsControl.RX;

Ball2Control.RX = BallsControl.RX;

Ball3Control.RX = BallsControl.RX;

Ball4Control.RX = BallsControl.RX;

Ball5Control.RX = BallsControl.RX;

}

OnEventBall1ControlRotation do

{

Ball1Control.RX = Ball1Control.RX;

}

OnEventBall2ControlRotation do

{

Ball2Control.RX = Ball2Control.RX;

}

OnEventBall3ControlRotation do

{

Ball3Control.RX = Ball3Control.RX;

}

OnEventBall4ControlRotation do

{

Ball4Control.RX = Ball4Control.RX;

}

OnEventBall5ControlRotation do

{

Ball5Control.RX = Ball5Control.RX;

}

You may be wondering the reasoning for the bottom set of code. Well when I copy pasted a reference of BallsControl Rotation for X into the channels for X Rotation for Ball 1-5 it worked, but also when I went to rotate each individual ball all of them rotated which did not work. So ... Any ideas???

Cheers,

Nate Nesler

P.S. Thanks for the help. Yeah Jens several people said shoes. lol I don't want him to have shoes and I will just have to figure it out. Don't learn anything if I don't do something I have not before. ;):):blink:

Link to comment
Share on other sites

Well the hand has a two joint thumb that comes at a 45 degree angle from rest is one difference but not a big one. The biggest one is the way a foot has Inverse and Forward Kinematics. The nulls and node systems for movement end up being quite different. My first inclination was to transfer the hand rig to the foot. Only after view the Video about 5 times on hand rigging from sidefx I realised that it was not going to work. Grrr. Yeah I was hoping for a no op but when I did a copy rel ref or just ref from the BallControlsFroward into the Ball1-5Control any time I moved individual ball controls they all moved. So basically I was thinking order of execution and to change the Value at the right moment in the chain of execution. Of course the best thing would to be not to have to do that but so far I have not been able to get around making the icons drive other ones through any other code means. So its become a pain in the butt op or op->butt :o:blink: and the following faces go along with that. lol So anyhow getting to my question. How do you change the Channel Value of the RX through the Scripting in Houdini and how do you link that to controls or the actual channel. This is quite different from Maya Expressions or MEL it seems like. I tried setting up alias for the ch("/obj/Ball1Control/rx") and then using set to change the values of the channel since you can not just say set ch("/obj/Ball1Control/rx") = ch("/obj/BallControlsForward/rx") or setenv either for that matter did not work when I did alias either. I tried to set up variables that were assigned the value of the channel but this still does not let me change the value of the channel. So how do you?

Cheers,

Nate Nesler

P.S. Thanks for all the help guys!!! B)

Link to comment
Share on other sites

I tried setting up alias for the ch("/obj/Ball1Control/rx") and then using set to change the values of the channel since you can not just say set ch("/obj/Ball1Control/rx") = ch("/obj/BallControlsForward/rx")

I think I'm getting even more confused. In your example, I can just put ch("/obj/BallControlsForward/rx") inside /obj/Ball1Control/rx.

Link to comment
Share on other sites

Hey Edward,

Oh sorry. Well basically I want the BallControlsForward null to send the values from the Rx channel to the Rx channels for Ball1-5Control. Since set seems to be the way to assign values for local and setenv is assigned values Global, I figured I would just set the value of the RX channels. I got an error trying to do this directly. However you can do an alias for the rx channels.

alias Ball1ControlRX ch("/obj/Ball1Control/rx")

Now Ball1ControlRX is a direct reference for Ball1Control's RX channel. You also do not get an error when you use set or setenv with an alias of a channel.

set Ball1ControlRX = ch("/obj/BallControlsForward/rx")

The only problem with this is nothing happens. There is no error message but then again nothing happens. lol So ... back to square one. I have no idea how to set values to channels from the textport. Much less as a graphical button plugin.

Oh if you mean you can just put the expression ch("/obj/BallControlsForward/rx") into the channel of /obj/Ball1Control/rx your correct you can. The problem is that the node relationships don't just flow down the chain but also back up. So what happens is when you rotate BallControlsFoward on X the Ball1Control rotates on X. Well thats good now when you rotate Ball1Control on X BallControls also rotate on X. Well thats no big deal if you only have one toe but once you make a reference Expression copy to Ball2Control's RX and so on and so forth for the rest of the Ball Controls. Then when you go to rotate a single toe they all rotate.

Cheers,

Nate Nesler

P.S. Thanks all of you for helping me I still feel like I have so much to learn. Unlike on someother programs where I can just jump on them and learn them in just a few weeks Houdini is one wonderfully complex program. B)

Link to comment
Share on other sites

To set parameters, do a "help opparm" in a textport. Variables are something entirely different from parameters. Parameters (and channels) are those which are owned by an operator. Variables are just something that exist for scripting ease of use.

Try the attached file. You can pick the MASTER_ROTATE objecto move all of them at the same time or individually rotate each toe bone.

toe_test.hipnc.gz

Link to comment
Share on other sites

Hey Edward,

Yeah thats what I tried at the beginning of the week. Only to realize that a real humans foot ball joints are not straight across. If you have a right foot then if you do the master null like that then you are going to have bones moving that can not move and have a rather odd deformation as you get closer and closer to the pinky toe. So as I was going to get the image of my characters toes I found out that I missed this detail somehow when I was modeling. All the balls of the toes are in alignment which is wrong but I am not going to fix it which will let me get on with my rig. Maybe sometime later I can write out the expressions for the proper rig and roll it into a plugin for auto rigging a 5 toed character in houdini.

Cheers,

Nate Nesler

P.S. Thanks Edward. :ph34r::blink:;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...