<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Need help wiring parameter linked to Percent in 3ds Max Animation and Rigging Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-animation-and-rigging/need-help-wiring-parameter-linked-to-percent/m-p/7020733#M7565</link>
    <description>&lt;P&gt;I've rigged a bike and a rider. The wheels of the bike are wired to the position of a point helper I have (brown point in attached image). When I constrain that brown point to a spline the wheels turn based on the position of the brown point. However, I've learned that if I move that spline around in the world, &amp;nbsp;things, timing, ect., move around and get offset in an undesirable way.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've provided a photo that shows my wiring of the wheel to the position of my brown point.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've learned that if I remove the path constraint from that brown point that the bike wheels are linked to and attach the brown point to a helper, I can then path constrain that helper and can now move the spline around without messing up anything.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, now my wheels don't turn because the brown point now has no position data to pass along to the wheel rotation. I need to wire the 'Percent' of the new helper on the spline so that it drives the wheels.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not a programmer and have tried creating the math to wire this but can't figure it out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I wire the 'Percent' position of a helper to the rotation of a wheel?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BikeRig.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/345470iA232197A68E4E0BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="BikeRig.jpg" alt="BikeRig.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Apr 2017 13:46:47 GMT</pubDate>
    <dc:creator>RobH2</dc:creator>
    <dc:date>2017-04-17T13:46:47Z</dc:date>
    <item>
      <title>Need help wiring parameter linked to Percent</title>
      <link>https://forums.autodesk.com/t5/3ds-max-animation-and-rigging/need-help-wiring-parameter-linked-to-percent/m-p/7020733#M7565</link>
      <description>&lt;P&gt;I've rigged a bike and a rider. The wheels of the bike are wired to the position of a point helper I have (brown point in attached image). When I constrain that brown point to a spline the wheels turn based on the position of the brown point. However, I've learned that if I move that spline around in the world, &amp;nbsp;things, timing, ect., move around and get offset in an undesirable way.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've provided a photo that shows my wiring of the wheel to the position of my brown point.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've learned that if I remove the path constraint from that brown point that the bike wheels are linked to and attach the brown point to a helper, I can then path constrain that helper and can now move the spline around without messing up anything.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, now my wheels don't turn because the brown point now has no position data to pass along to the wheel rotation. I need to wire the 'Percent' of the new helper on the spline so that it drives the wheels.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not a programmer and have tried creating the math to wire this but can't figure it out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I wire the 'Percent' position of a helper to the rotation of a wheel?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BikeRig.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/345470iA232197A68E4E0BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="BikeRig.jpg" alt="BikeRig.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2017 13:46:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-animation-and-rigging/need-help-wiring-parameter-linked-to-percent/m-p/7020733#M7565</guid>
      <dc:creator>RobH2</dc:creator>
      <dc:date>2017-04-17T13:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Need help wiring parameter linked to Percent</title>
      <link>https://forums.autodesk.com/t5/3ds-max-animation-and-rigging/need-help-wiring-parameter-linked-to-percent/m-p/7023153#M7566</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/222618"&gt;@RobH2&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to get a rotation (of a wheel) from a distance, you'd need :&amp;nbsp;Circumference = 2*Pi*SqrRadius.&lt;/P&gt;
&lt;P&gt;The formula you are looking for uses that Circumference equation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need the Radius of your rotating object.&lt;/P&gt;
&lt;P&gt;You'll need to convert the percent of the spline into a measured distance, for that you need to get the length of the spline.&lt;/P&gt;
&lt;P&gt;To get the Spline length you may use :&lt;/P&gt;
&lt;P&gt;getSegLengths &amp;lt;splineShape&amp;gt; &amp;lt;spline_index&amp;gt; [****:&amp;lt;boolean&amp;gt;]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This outputs the lengths of all the segments of the spline into an array, the last element of the array is the total length of the spline.&lt;/P&gt;
&lt;P&gt;The code would look like :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;((getSegLengths $Line001 1 ****:true)[(getSegLengths $Line001 1 ****:true).count])&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then you'd need to multiply by the Percent and then divide by the Circumference (in example below, the Circumference is 25.0) :&lt;/P&gt;
&lt;P&gt;((getSegLengths $Line001 1 ****:true)[(getSegLengths $Line001 1 ****:true).count]) * &amp;nbsp;Percent / (2*pi*(pow 25.0 2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will output a rotation value in Radian, now just need to convert the Radian to Degrees:&amp;nbsp;" RadToDeg "&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The finale formula would look like :&lt;/P&gt;
&lt;P&gt;radToDeg((getSegLengths $Line001 1 ****:true)[(getSegLengths $Line001 1 ****:true).count]) * &amp;nbsp;Percent / (2*pi*(pow 25.0 2))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WireParam.jpg" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/345917iF4F7D77D9D5E21D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="WireParam.jpg" alt="WireParam.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;That is a screenshot of the final formula, and I've attached a little video that demonstrate that working in Max.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this can help! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edits:&lt;/P&gt;
&lt;P&gt;Sorry for the code looks strange ... the "****" are not as intended ... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; the formatting of the site converts "c u m" (with no spaces) for cumulative as a "bad" word &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please read "c u m" where **** are shown&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 12:17:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-animation-and-rigging/need-help-wiring-parameter-linked-to-percent/m-p/7023153#M7566</guid>
      <dc:creator>ads_royje</dc:creator>
      <dc:date>2017-04-18T12:17:00Z</dc:date>
    </item>
  </channel>
</rss>

