mattao Posted January 8 Share Posted January 8 Hi guys Easy to move a specific object in 3D through marionette. You provide a vec3 input to a Move Nove and there it goes. But how to move the object according to a specific Working plane? Or the current working plane? Could you please help? Thanks Quote Link to comment

mattao Posted January 9 Author Share Posted January 9 (edited) I suspect the matrix nodes could help in this domain but does someone know... http://motion.cs.illinois.edu/RoboticSystems/CoordinateTransformations.html Edited January 9 by mattao Quote Link to comment

mattao Posted January 9 Author Share Posted January 9 (edited) Magnifique cours qui explique ce que je cherche à faire Edited January 9 by mattao Quote Link to comment

Pat Stanford Posted January 9 Share Posted January 9 GetPlanarReference will get you a RefID to identify the plane an object is on. SetPlanarReference will allow you to use a RefID to put an object onto a specified plane, but it's coordinates will be transformed so it does not move in 3D space. Transform2 or Move should allow you to specify a Vector to move the object along the plane it is on. HTH Quote Link to comment

mattao Posted January 10 Author Share Posted January 10 Thank you pat. I uploaded you a video of the routines I am trying to replicate with marionette. It seems transform2 nodes could be something useful for me. I think maybe it will help me produce a 2D vector in the plane normal to my selected face and move my object along this plane. I will try it later. The move node is efficient but I am not able at now to understand how to convert the move vector in the plane B (move along z axe in the plane planar to the pyramide face ) to the precise move in the 3D Coordinates of the origin ( with appear to me to be the move3D coordinate system ) I thought I will find an option in the move3D node to move in the Layer coordinates or in the working plane like in the move3D palette but it's not the case. Thanks for your help. Enregistrement de l’écran _lgt.mov Quote Link to comment

mattao Posted January 11 Author Share Posted January 11 Struggling with the math inside the marionette custom node.... I think I am lost in my cos and sin transformations... #script #valeur ci dessous pour essais entrée sortie à enlever à la fin x = v*((math.cos (math.radians (rotAng[2])))*(math.cos (math.radians (rotAng[1])))*(math.cos (math.radians (rotAng[0])))) y = v*((math.cos ((math.sin (math.radians (rotAng[1])))*(math.cos (math.radians (rotAng[0])))) z = v*((math.cos (math.radians (rotAng[2])))*(math.sin (math.radians (rotAng[1])))*(math.cos (math.radians (rotAng[0])))) Quote Link to comment

mattao Posted January 11 Author Share Posted January 11 Still struggling. I think I am not so far. Here is a linked file of where I am. BougeTry4.vwx Quote Link to comment

DomC Posted January 24 Share Posted January 24 Hi Did not looked into your code details because i keep that theme for a time from my brane. I think the general we can take an objects entity matrix and set that entity matrix to another object. With Set- and get Entity Matrix. This is not really hard. What was always the point is, that having some points in 3D which defines a plane transferring to an entity matrix wen need for the SetEntityMatrix Script command. What i have so far in that direction: 1. A way to have 3 points and gets an VW entity matrix of 3 points. Somehow my code os spreaded over a bigger code so i do now know if exactly that works in your example. code and functions i needed there code snippeds. I would say the code here took me several hours of figuring out that easy looking code. But i think at the end it maybe needs just a few lines if it was optimated. Also the vs.Vec2Ang() solves a lot. It would be hard to find out in which quadrant the plane is oriented and the direction of the points etc.. Like i told, not looked yet into your code. This snipped worked here for getting rotation matrix from 3 points. Not sure, if it works in all directions and for vertical planes in every situation. I always thought there must be a general solution for that. And there is but on the other side we must fit it to the vw SetEntity matrix also the plane matrix are different from the rotation matrix. 2. Getting a centroid and a plane. With that we can project points on that plane (not a vw plane, a plane defined by the normal matrix of the custom getPlane Node in that example). Here: At one point everything is turning into hard work. But we still have fun 🙂 Quote Link to comment

SimA Posted January 25 Share Posted January 25 The vectors can be determined with three points. The rotation angles around the two axes X&Y can then be calculated from the vectors. In the case of a pyramid, these can be two corner points and the top. Quote Link to comment

## Recommended Posts

## Join the conversation

You can post now and register later. 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.