View Full Version : Locker Rig
cambhav 09-11-2008, 06:04 AM Hello ,
I am actually new to using the utility nodes... Presently I am rigging a locker and i want to use these there... and now i am stuck up at a point where I am not understanding how to go about.. I have attached a link with which you will understand what I am trying to explain here...
Well if my nob rotates 1080 in the z direction the lock completely comes out... now if the lock is out my door should not open i.e it should not rotate in z direction... and if it is not out it should open... . that means if and only if its rotate z is 0 the door should rotate and even if it is more than 0 (say 1 in rotate z) the door should not rotata.
I hope I am making myself clear..
Any kind of suggestion is welcome .. even methods apart from what I mentioned will do...
Thanks for sparing time...
|
|
Try condition node.
It works like if-else statement in mel.
In first term you pipe the rotation of the lock, set second term to 0, in Color If True pipe rotation of the door control, set Color If False to 0, set operation of the condition node to "equal", and pipe the Out Color into the door object rotation.
I hope it's what you are looking for.
cambhav
09-11-2008, 08:53 AM
Actually i am really new to it.. so i have not understood it properly... can u please write it in a more detailed way so that i can also learn along.....
Thanks....
I am at work now, but at evening I will make a better guide for you.
cambhav
09-11-2008, 09:04 AM
sure sir ....thanks a lot:)
Actually lady :).
Here we go.
I tryed to make my explanation as detailed as I could so you can follow it, since you are a beginner, as you say.
In the sample "doorTest_start.ma" scene I made for you, you will find a simple door, a door knob and curve controls for them. Door knob is just parented under the doorKnob_ctrl, which is parented under the door object - we want our door knob to follow the door when it opens. Door is not parented under the door control because we want to restrict the rotation of the door depending on rotation of the doorKnob_ctrl, and in some situations even door_ctrl is rotating, the door itself will not.
1. Select doorKnob_ctrl and door_ctrl, open hypershade and click on button "Input and output Connections" (I hope you can find it). Ignore the shape nodes - you can even move them out of the way, we will work only with transforms.
2. Create a condition node (you will find it in the General Utilities section of the hypershade). Open attribute editor for condition node and set Operation to "Equal", Second Tirm to 0, and Color If False to 0 0 0.
3. In hypershade middle mouse drug-n-drop the doorKnob_ctrl node over the condition node, a little menu will appear - click on "Other..." option. Connection Editor will open. On the left side click on Rotate Z, then on the right side click on the First tirm. Connection is made.
4. In hypershade middle mouse drug-n-drop the door_ctrl node over the condition node, click on "Other..." and in Connection Editor connect Rotate on the left side to Color If True on the right side.
5. Select condition node and the door object and click on button "Input and output Connections" in hypershade. Again, ignore the door object's shape node. Then middle mouse drug-n-drop the condition node over the door transform node, click on "Other..." and in Connection Editor connect Out Color on the left to Rotate on the right.
That's it. In the "doorTest_end.ma" you can see how it should work. Now if your doorKnob_ctrl has 0 in z rotation your door will open when you rotate the door control. If doorKnob_ctrl's z rotation is not zero, door is not going to open.
This is a simple example to illustrate the point, but you can plug different channels into the condition node to get different results. Also check out the Maya help files on the topic.
Hope it helped :).
cambhav
09-12-2008, 11:07 AM
yuppie!:)
Thanx a lot sir.... i could complete it with your guide.... Thanx so much for the spending time for this.....
Bhavna....
cambhav
09-12-2008, 11:24 AM
Sir if u have time any hour later i would also like to learn how xactly that condition node works... or if you can guide me to a tutorial which can make my need full i would be very thankful....may be some tutorial which explains about all the utility nodes.
Bhavna.....
You are welcome, glad to help :).
There is a very good learning DVD dedicated to utility and render nodes from Digital Tutors "Mastering Maya Render Nodes":
http://www.digitaltutors.com/store/product.php?productid=91
Then there is also Maya documentation to look at - it's your best friend!
CGTalk Moderation
09-12-2008, 03:08 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.