nyahkitty Posted October 20, 2005 Share Posted October 20, 2005 Basically what the subject of this topic says. How would I set up an expression on a bone so that for each degree I turn the handle of the bone, it's scale in local Z axis scales up a set number of units (the bone gets longer by an inch or foot or whatever as per degree of rotation). I'm trying to set up an infinite scale control on a bone without using pose sliders. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
3DArtZ Posted October 20, 2005 Share Posted October 20, 2005 are there 2 bones or 1 bone involved. Like is it Bone1 rotates and bone2 scales? If so right click on bone2's z scale channel, edit expression and then with your mouse in the tree workspace touch bone1's rotation channel. You might have to put a zero in the bone1's rotation channel to get it to show up in the project workspace.... If it is one bone.... I'm not sure if it will be able to scale itself, but set it up the same as above but just using one bone.... I might have missed a step but this should get you close enough. Your going to have to do some math on the end of the expression like maybe mult it by .1 or something Mike Fitz www.3dartz.com Quote Link to comment Share on other sites More sharing options...
Steven Cleary Posted October 21, 2005 Share Posted October 21, 2005 To make a bone scale itself along it’s Z-axis: in a relationship (could be in a pose, action, choreography) go to the bone’s properties and select Transform > Scale > Z, right click it and select ‘Edit Expression’. Now enter this expression: 1+(..|..|Rotate.Z/360) The ‘1’ denotes the starting percentage (A:M uses decimal percentages so 1 = 100%, 0.5 = 50%, etc.) and the next part adds another decimal percentage based on the degree of rotation. To make the bone scale a specific amount, type this expression, replacing ‘L’ with the normal/unscaled length of the bone being scaled and ‘D’ with the distance needed to be travelled: 1+(..|..|Rotate.Z/360)*(D/L) Replace the ‘360’ in the expression with whatever degree of rotation you need for the distance to be covered in. I hope that is useful to you, Steve. Quote Link to comment Share on other sites More sharing options...
nyahkitty Posted October 21, 2005 Author Share Posted October 21, 2005 I will try these suggestions tomorrow. Thanks! Quote Link to comment Share on other sites More sharing options...
nyahkitty Posted October 21, 2005 Author Share Posted October 21, 2005 -Steven Cleary: I'm trying that out. Evidently I'm lacking experience with using expressions. Would it be too much trouble for you to take a series of screen shots of the properties, in order to show the steps I would take to do this? It's not working for me right now. Thanks! Quote Link to comment Share on other sites More sharing options...
nyahkitty Posted October 21, 2005 Author Share Posted October 21, 2005 I worked around the problem by using nulls, a pose and a smartskin. I've attached the project folder with two light rigs I've come up with. Hopefully everything is clearly labeled. -The Orbiting Klieg Rig is for the convenience of positioning the light from camera view. - The Manual Klieg Rig allows is versatility for positioning the light. Try playing with these in a choreography or an action. The bones are the key to controling the rigs. For either rig, you will want to turn on the Setup pose slider, when in a Chor or an Action. I'd still like to see the step-by-step screen captures for how to make the expression, if that's alright. *File Removed* Quote Link to comment Share on other sites More sharing options...
Steven Cleary Posted October 21, 2005 Share Posted October 21, 2005 I'd still like to see the step-by-step screen captures for how to make the expression, if that's alright. No problem. Here's an example of the process starting from scratch: Create a model with a single bone in it with it's origin at 0,0,0 and make it point upwards with the end at 10cm in the Y-axis. Create a new action for it. Select the bone then go to it's properties. The image below shows me applying the expression in an action at the stage of right clicking the ‘Z’ of the Scale properties. Once you select ‘Edit Expression’, a box will appear for you to enter an expression whereupon you just need to copy and paste this expression into it: 1+(..|..|Rotate.Z/360)*(5/10) [attachmentid=10309] I’ve attached a zipped model file with the expression in a pose which you can see if you follow the hierarchy tree shown in the image below: [attachmentid=10306] I made the expression scale the bone in the Z-axis so that it extends 5cm for each full rotation of the roll handle. You can change that by replacing the '5' with any number you like. Steve. [attachmentid=10307] rotation_scales.zip Quote Link to comment Share on other sites More sharing options...
Fishman Posted October 21, 2005 Share Posted October 21, 2005 Have you watched the Tech Talk on Expressions? Great step by step stuff. Scott http://www.hash.com/forums/index.php?showt...49&hl=tech+talk Quote Link to comment Share on other sites More sharing options...
Steven Cleary Posted October 22, 2005 Share Posted October 22, 2005 I forgot to mention that the interpolation method makes a difference (you can find it on the top menu bar under Tools > Options... and select the Action tab). Euler interpolation makes it so that the bone will have unlimited extension as the rotational value is unlimited. Vector and Quarternion on the other hand will make the bone jump back down to it's original length as the roll only goes up to 180 degrees before it jumps into negative values. Steve. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You are posting as a guest. 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.