Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography


Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies)
  Maxforums.org Members Gallery
(516 replies)
  SON OF POST YOURSELF
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

Limiting local tranformations
show user profile  Handelo
Okay, so after having my thread unanswered for a few days (http://www.maxforums.org/threads/biped_constraints_springs/0001.aspx) , I'm back to using normal bones.

Long story short - I've created bones that swing and jiggle realistically on a rig by using LookAt constraints to helpers with spring controllers.

Everything works fine, except that with excessive movement the controllers move too far and the parts (zippers, belts and such) clip into the body mesh.

Now for my question - is it possible to limit the local transformations of the helper objects? I've thought of using the Float Limit controller in the Curve Editor, but since they are applied spring controllers, there are no values there to limit. Using the bone's Rotational Joint limits also doesn't work, since the LookAt constraint overrides them.

I'm assuming I would have to resort to scripting, but am wondering if anyone has any other ideas, since my scripting skills are unfortunately close to nothing.

And before you ask, I can't use cloth or any physics engine to simulate the movement of these parts - they have to be skinned to bones (the model is for a gaming environment).

Thanks in advance!
read 381 times
9/11/2012 11:24:54 PM (last edit: 9/11/2012 11:24:54 PM)
show user profile  Joey Parker Jr.
Max 8 Tutorials have a section on rigging complex rigs and they use wire parameters
with a little bit of scripting to limit movement.
Here's the link to the pdfs. The info I used to do this was in Vol.2 - Creating complex rigs.


http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=9861621&linkID=10809867
 photo 2012-sig_small3_zpsbd114b69.png

read 377 times
9/11/2012 11:34:39 PM (last edit: 9/11/2012 11:36:45 PM)
show user profile  herfst1
There might be another way around this but I'm having trouble visualising. Could you post some screen shots or a quick video capture of your viewport demonstrating your problem? Maybe a diagram pointing to a helper and listing which bones it's linked to and with what constraints. Basically, anything that could help us help you.

It could be a case of applying orientation contraints with different weights, or position constraints, or fixing your linking, or using an extra point helper (or two) to influence the movements. Hard to say. Is it a robot or a human? Are these muscles you're trying to rig?
read 363 times
9/11/2012 11:56:28 PM (last edit: 9/11/2012 11:57:05 PM)
show user profile  Handelo
Thanks Joey, but unless I missed something, this doesn't help me - The bones don't use a manual controller, so they can't be wired to a controller with an expression that will limit their rotation.

I specifically need to limit the local X/Y/Z position transforms of the helper objects which are caused by the spring controller. I could use the X/Y/Z effect values, but I would have to change them for each motion manually, and I'm trying to get the rig as automated as possible.

I'm willing to resort to scripting as well, but I would need guidance in that direction...
read 362 times
9/11/2012 11:56:30 PM (last edit: 9/11/2012 11:56:30 PM)
show user profile  Joey Parker Jr.
Ahh! Sorry, you're right, that was for limiting a manual controller.
 photo 2012-sig_small3_zpsbd114b69.png

read 358 times
9/12/2012 12:05:53 AM (last edit: 9/12/2012 12:05:53 AM)
show user profile  Handelo
I guess I don't need guidance after all.
I've managed to create a limit by using an ExposeTm helper and a scripted limit.

Here's what I did - considering that "Root" is the root object, "Bone" is the bone and "Spring" is the spring controlled helper object:

1. Create an ExposeTm helper object, align it with theSpring and parent it to the Root.
2. Have the Exposer helper expose the Spring's local positions.
3. Make the Exposer helper the Bone's LookAt target.
4. Go into the Curve Editor and assign a Float Script controller on the X,Y and Z positions of the Exposer helper, with the following script for each of the XYZ values:

X:
$Exposer.localPositionX

Y:
$Exposer.localPositionY

Z:
if (abs $Exposer.localPositionX >= abs $Exposer.localPositionY) then
(if abs ($Exposer.localPositionX/$Exposer.localPositionZ) < 0.5 then
$Exposer.localPositionZ
Else
(abs $Exposer.localPositionX)*2
)
Else
(if abs ($Exposer.localPositionY/$Exposer.localPositionZ) < 0.5 then
$Exposer.localPositionZ
Else
(abs $Exposer.localPositionY)*2
)


This essentially gave the Exposer helper the same X/Y location as the Spring, but limited it's Z position relative to the root object to never make an angle lower than around 45 degrees (the 0.5 and *2 values work in this instance only, and can differ according to the length of the Bone and location of the Root's axis, as well as the desired minimal angle).

Now I just need to apply this method to the springs in my scene...

Here's a link to my sample scene if anyone is interested: http://www.mediafire.com/?lejzuzaxwl5nho6


All this scripting exhausted my already racked brain - I'm going to bed. Thanks for the help, everyone!
read 343 times
9/12/2012 1:40:56 AM (last edit: 9/12/2012 1:45:28 AM)
show user profile  Joey Parker Jr.
Nice!
 photo 2012-sig_small3_zpsbd114b69.png

read 321 times
9/12/2012 5:15:35 PM (last edit: 9/12/2012 5:15:35 PM)
#Maxforums IRC
Open chat window


Support Maxforums.org