Search the Community
Showing results for tags 'matrices'.
-
Hello, I'm trying to automate cogs rotation using vex and a formula I've found online. The basic scenario is the following : one cog 'parent' and one cog 'child'. The cog 'parent' is animated (simple animation on Y axis) and will drive the cog 'child' by the following formula : (cog 'parent') * (-cog 'parent' teeth / cog 'child' teeth) this is quite easy. In the example I provided I 'hardcoded' the teeth count but it is calculated procedurally in a larger setup. All my cogs are packed primitive so I used matrices to modify their rotation. The main problem is when I extract the rotation of the cog 'parent' to modify it, converting the matrix4 into a matrix3 then into a quaternion then into Euler then into degree, it looks like the angle in degree can't go beyond 360°. The rotation in degrees takes weird values. At the frame 87 the extracted rotation Y of the cog 'parent' is 89.5836 degrees but at the frame 88 it's -269.375 which is the same value of angle (90° = 270°) but since the cog 'child' is not symmetrical I can see 'jumping' and If I calculate velocity on top of that the vector between these two frames will be wrong. The value at the frame 88 should be 90.625 not -269.375. I feel like the conversion doesn't allow for value bigger than 360°. I feel like I'm missing on a small thing that can be easily fixed. Is there a solution ? I've tried putting a modulo 360 somewhere but that didn't change anything I've tried dealing only with matrices without converting them but that's out of my knowledge (multiplying the rotation matrices by the ratio driven/driving so (cog 'child' teeth / cog 'parent' teeth) . Thank you for your time, Stay safe. cogs_automation_problem.hiplc
-
Hey folks, would there be a way to identify and extract, procedurally, animated rigid pieces from soft point deforming pieces? Say, you have a character alembic cache and several meshes on that character are rigid (i.e. their points don't change positions relative to each other). For example: the weapon of a warrior, or the plate armour, the shield... etc. I want to find those meshes procedurally and extract their transformations (and of course replace their point deformations with object-level transformations, duh...) Would you have a clue how to approach that? There wouldn't be a node for it already, would it? I'm thinking what heuristic to employ to differentiate between pieces which points do change positions relative to each other vs such that don't. Maybe just maybe... extract transformation matrices for every piece for some arbitrary prim, be it rigid or not multiply by the inverse to set each piece to the origin and... compute velocity in the result? all inversely tranformed points of rigid pieces have 0 velocity, some points (other than the points on the arbitrary prim from #1) of soft deforming pieces have v>0. tag them.
- 2 replies
-
- point-deform
- alembic
-
(and 2 more)
Tagged with:
-
For the full course, visit : https://www.cgforge.com/course?courseid=quaternions-matrices In this quick tip, we take a look at a practical example which takes advantage of both quaternion and matrix (and/or Euler) based rotation.
-
I'm importing a vector4 as a point matrix within a VOP SOP; but it's position as in the transformation matrix, does not align correctly with the object prior to the transformation matrix ? The problem is in this VOP network, as the problem is only experienced in this VOP Network ?
-
Hello everyone, I have created few videos to introduce vectors and matrices in a fun way, with lots of real-world examples. Please go through them and I would love to get a feedback. Intro to Vectors | An Idiot's Guide to Vectors and Matrices, Part 1 Intro to Matrices | An Idiot's Guide to Vectors and Matrices, Part 2 Advance Operations | An Idiot's Guide to Vectors and Matrices, Part 3 Depending on the feedback, I am planning to create few Houdini specific videos as well.
-
Hi, I have a case where I have, lets say an object which comes from bulelt sim, with v and w. Based on that object, I want to drive another bullet sim, updating v and w, so the rest would be calculated by bulllet sim. In the scene I attached it works pretty much, except it flips at some point. I understand that there should be some catches on quaternions. I suppose, there should be some sort of angle check and etc, but can't make it work... update_angularv.hip
-
- bullet
- linearalgebra
-
(and 2 more)
Tagged with:
-
Hello, Does anyone know a way to get the pivot point of each prim from an L-System? I'd like to use this for animating bends and rotations but I'm not sure how I would go about it. Logically I need to find the nearest point on the previous gen to the 0 point of each primitive but it must also take into account the transforms of the previous gens too. I looked in to matt estela's rotation matrices but this doesn't account for the previous gen's transforms. Any help greatly appreciated. http://www.tokeru.com/cgwiki/index.php?title=HoudiniVex#Rotate_prims_around_an_edge.2C_alternate_version