<?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 Re: Cylinder animation in VRED Forum</title>
    <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342842#M6753</link>
    <description>&lt;P&gt;Unfortunately I'm not able to upload my file on the forum ! Don't know why !&lt;/P&gt;&lt;P&gt;But basically the steps are :&lt;/P&gt;&lt;P&gt;- Place both part of your piston at the zero of the scene and facing down. It can be two groups with all parts in each other.&lt;/P&gt;&lt;P&gt;-freeze all the transform on it.&lt;/P&gt;&lt;P&gt;-If it's the same piston each time, duplicate it as many time as needed.&lt;/P&gt;&lt;P&gt;-Then create the script depending on the names of your parts.&lt;/P&gt;&lt;P&gt;-Apply the script.&lt;/P&gt;&lt;P&gt;-Move the pistons parts in position and in the scene graph to parents them with the object they will move with.&lt;/P&gt;&lt;P&gt;-Now you just need to animate your objects and pistons will follow the movement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well it's not that easy to explain it by text, Sorry.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2018 10:56:10 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-18T10:56:10Z</dc:date>
    <item>
      <title>Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8338261#M6748</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;is there a way or workaround to animate an hydraulic cylinder?&lt;/P&gt;&lt;P&gt;i cannot prepare the animation in 3dsMax and import it, i have to move my model interactively in VR with the Vive.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/558228iD4EB8FDA59D30373/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 16:50:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8338261#M6748</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2018-10-16T16:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8340180#M6749</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can use the aimConstraint function to achieve this kind of effect.&lt;/P&gt;&lt;P&gt;Basically if you have a piston like yours, you're supposed to have two parts.&lt;/P&gt;&lt;P&gt;Part one is fixed to the frame (let's call it fixPiston)&lt;/P&gt;&lt;P&gt;Part two to the hinge (let's call it mobilPiston)&lt;/P&gt;&lt;P&gt;and Sphere to orient the piston (let' call it Sphere)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The script will be like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;createAimConstraint(["fixPiston"], ["Sphere"], "mobilPiston")

createAimConstraint(["mobilPiston"], ["Sphere"], "fixPiston")&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then you just have to put your mobil part in the Hinge in your scenegraph and piston parts will face each other everytime.&lt;/P&gt;&lt;P&gt;The biggest contraint is you 're supposed to have both element of your piston at the 0 of the scene and facing down.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope it will be helpfull.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Oct 2018 11:28:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8340180#M6749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-17T11:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342657#M6750</link>
      <description>&lt;P&gt;Thank you for the reply!&lt;/P&gt;&lt;P&gt;Unfortunately i have to put 3 cylinder i my model and 2 of these must rotate with half of the structure...&lt;/P&gt;&lt;P&gt;This is a simplified view of the first cylinder&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/558908i57EC26C2F59B5AEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and this is what i need to do...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 170px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/558909iAF90283872185AAA/image-size/small?v=v2&amp;amp;px=200" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;... to much work only to see something "beautifull" ...&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 09:20:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342657#M6750</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2018-10-18T09:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342735#M6751</link>
      <description>&lt;P&gt;You just have to duplicate the script as many time as you have pistons with new names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;createAimConstraint(["fixPiston"], ["Sphere"], "mobilPiston")
createAimConstraint(["mobilPiston"], ["Sphere"], "fixPiston")
createAimConstraint(["fixPiston1"], ["Sphere1"], "mobilPiston1")
createAimConstraint(["mobilPiston1"], ["Sphere1"], "fixPiston1")&lt;BR /&gt;createAimConstraint(["fixPiston2"], ["Sphere2"], "mobilPiston2")
createAimConstraint(["mobilPiston2"], ["Sphere2"], "fixPiston2")&lt;BR /&gt;&lt;BR /&gt;//and so &lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="piston.gif" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/558922i1E8A87C4EB9A3033/image-size/medium?v=v2&amp;amp;px=400" role="button" title="piston.gif" alt="piston.gif" /&gt;&lt;/span&gt;on&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 09:58:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342735#M6751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T09:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342778#M6752</link>
      <description>&lt;P&gt;ops...&lt;/P&gt;&lt;P&gt;maybe i loose something...&lt;/P&gt;&lt;P&gt;i have the piston, made of two parts...&lt;/P&gt;&lt;P&gt;i have to set the pivot of the twoo pars tin the joint, correct?&lt;/P&gt;&lt;P&gt;i have to put each part inside the mobile object?&lt;/P&gt;&lt;P&gt;the sphere, mast be in the origin of the scene?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 10:27:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342778#M6752</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2018-10-18T10:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342842#M6753</link>
      <description>&lt;P&gt;Unfortunately I'm not able to upload my file on the forum ! Don't know why !&lt;/P&gt;&lt;P&gt;But basically the steps are :&lt;/P&gt;&lt;P&gt;- Place both part of your piston at the zero of the scene and facing down. It can be two groups with all parts in each other.&lt;/P&gt;&lt;P&gt;-freeze all the transform on it.&lt;/P&gt;&lt;P&gt;-If it's the same piston each time, duplicate it as many time as needed.&lt;/P&gt;&lt;P&gt;-Then create the script depending on the names of your parts.&lt;/P&gt;&lt;P&gt;-Apply the script.&lt;/P&gt;&lt;P&gt;-Move the pistons parts in position and in the scene graph to parents them with the object they will move with.&lt;/P&gt;&lt;P&gt;-Now you just need to animate your objects and pistons will follow the movement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well it's not that easy to explain it by text, Sorry.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 10:56:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8342842#M6753</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T10:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8343047#M6754</link>
      <description>Everything ok!!&lt;BR /&gt;Only 1 thing...&lt;BR /&gt;after moved the cylinder pieces under the correct parent i had to re run the script.&lt;BR /&gt;but then everything works as expected!&lt;BR /&gt;&lt;BR /&gt;Thank you very much!&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Oct 2018 12:15:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8343047#M6754</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2018-10-18T12:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8343173#M6755</link>
      <description>&lt;P&gt;You're welcome !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be more clean and if in the future you want to use your file in VR, you can move your script in a Variant Sets, then you will be able to relaunch it with a hotkey.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 12:52:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8343173#M6755</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-18T12:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8345013#M6756</link>
      <description>thank you another time!&lt;BR /&gt;Constraints in VRED allow me new possibilities for animation!&lt;BR /&gt;if i can i will post the results of my work.&lt;BR /&gt;&lt;BR /&gt;bye&lt;BR /&gt;Chris</description>
      <pubDate>Fri, 19 Oct 2018 07:15:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8345013#M6756</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2018-10-19T07:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8418432#M6757</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="pistonscreengrab.PNG" style="width: 335px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/572499i646E779E3346211E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pistonscreengrab.PNG" alt="pistonscreengrab.PNG" /&gt;&lt;/span&gt;Hi, I am attempting to recreate the same setup, as it would greatly reduce the effort with animating this kind of thing. However my scripting skills or lacking, and as you can guess, it is not going well. I was wondering if you could explain in a little more detail how to create the setup, especially in regards to the position of pivot points, what to use for the upSource. Here is a screengrab of my example part I am&amp;nbsp; working with if that helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 10:13:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8418432#M6757</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-22T10:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8420082#M6758</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;About the pivot point, as it's greatly recommand to link new groups for this effect, you don't really care. But to get something really realistic with weird rotations, it's better to put both part of your piston at zero and facing -Z.&lt;/P&gt;
&lt;P&gt;The Up Source is the second object of the code:&lt;/P&gt;
&lt;PRE&gt;createAimConstraint(["fixPiston"], ["UpSource"], "mobilPiston")

createAimConstraint(["mobilPiston"], ["UpSource"], "fixPiston")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;If you want to test is on a basic case study, create two cones (name them Cone1 and Cone2) and a sphere, both cones have to face -Z, then freeze the transform and apply and run this code in the script editor.&lt;/P&gt;
&lt;PRE&gt;createAimConstraint(["Cone1"], ["Sphere"], "Cone2")

createAimConstraint(["Cone2"], ["Sphere"], "Cone1")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Then move the cone and the sphere to see the effect.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 08:31:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8420082#M6758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-23T08:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8426637#M6759</link>
      <description>&lt;P&gt;Many thanks for the reply!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have got the cylinders working now, and managed to do so without including an upsource.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;createAimConstraint(["tpin1"],[],"bshaft1")

createAimConstraint(["bpin1"],[],"tshaft1")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have no idea if this will cause unintended problems further down the road, but it seems to do the trick &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;Thanks again.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 08:59:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8426637#M6759</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-27T08:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8426735#M6760</link>
      <description>&lt;P&gt;You're welcome !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Up Source is useful if you don't want your piston to turn on Up axis when the base points are crossing themself on X or Y axis.&lt;/P&gt;
&lt;P&gt;The best way is to create a small sphere as Up source and group it with one of your part, then it will move as the linked part and constraint both parts to prevent any wrong rotation. You just have to make the sphere invisible to keep something visually good.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 09:42:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8426735#M6760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-27T09:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8568888#M6761</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;do you think i can manage also this situation? not cylinder but an elevator that lift an arm.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Annotazione 2019-02-02 183253.jpg" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/598534iB6F24B03E7DC7439/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Annotazione 2019-02-02 183253.jpg" alt="Annotazione 2019-02-02 183253.jpg" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The yellow part runs on the red guide, up and down. to lift the violet arm.&lt;/P&gt;
&lt;P&gt;I have to animate this mechanism.&lt;/P&gt;
&lt;P&gt;ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Sat, 02 Feb 2019 17:42:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8568888#M6761</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2019-02-02T17:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8570840#M6762</link>
      <description>&lt;P&gt;Well with this constraint I don't think it's possible, but if you create a rotation to rotation constraint, it can probably works great.&lt;/P&gt;
&lt;P&gt;For example, the rotation of the red part is equal to the invert of the rotation of the purple one, and then you can like the translation of the yellow to the blue one mathematically ... or something like that.&lt;/P&gt;
&lt;P&gt;Honestly my Python skills are not good enough for that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it can help&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 10:53:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8570840#M6762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-04T10:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cylinder animation</title>
      <link>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8570865#M6763</link>
      <description>Me too i think is not possible...&lt;BR /&gt;I'll try to simulate the movement synchronizing the parts with the curves.&lt;BR /&gt;The only thing i have done is to keep the blue part facing the pin on the red arm, using CreateAimConstraint.&lt;BR /&gt;Then i move the lifter up and down and rotate the red arm to visually maintain the joint.&lt;BR /&gt;It is enough. it is a mechanism prototype. i only need to explain it.&lt;BR /&gt;Thank you&lt;BR /&gt;Chris</description>
      <pubDate>Mon, 04 Feb 2019 11:14:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/cylinder-animation/m-p/8570865#M6763</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2019-02-04T11:14:50Z</dc:date>
    </item>
  </channel>
</rss>

