Search the Community
Showing results for tags 'matrix'.
-
Hi, we are turning some animated geometry (alembic, non-deforming animation) into clouds, but because we want the noise of the clouds to be in local space (not be affected by the animation), I am trying to work out how to apply the animation after the creating the clouds referencing the intrinsic transform of the alembic. Using an AttributeVOP, I've managed to copy the intrinsic:packedfulltransform of the animated alembic, on to the intrinsic:transform of the static alembic model. I am still trying to get my head around the difference between matrix3 and matrix4 for these transform. Is there a general rule to which matrix type is used in each case? intrinsic:packedfulltransform is matrix4, intrinsic:transform in packed primitives is matrix3, but intrinsic:transform in VDB is matrix4. So what I put together and works for packed geometry or simple volumes, doesn't work with VDBs unless if I pack them before hand. Also my understanding is that intrinsic:packedfulltransform and intrinsic:packedlocaltransform are not writable and I can only change intrinsic:transform . Is that right? thank you
-
I need help to extract the scale from a Matrix...
Masoud posted a topic in General Houdini Questions
Hello guys, From a transform matrix attribute (which includes "Transform", "Scale" and "Rotation" values), how can I extract only the "SCALE" component, and then apply it, to the geometry? I mean I don't want the Translate and Rotation of that matrix. I tried the cracktransform() VEX function. If it's a right way, I don't know how to apply that extracted scale, to the geometry: v@t; v@r; v@s; cracktransform(XFORM_SRT, XFORM_XYZ, {0,0,0}, 4@localtransform, @t, @r, @s); Thanks for helping. -
Hey Guys! Basically, I have those grids that come into a for each loop and each of them have rotations in the 3D space. Is it possible to get each of them back on to an unrotated state with matrices? Thank you all for your help.
-
3@transform = set( {-0.146396,-0.0727609,0.0550026},{0.0605058,0.000363445,0.161525},{0.0682531,-0.156387,-0.0252152} ) ; -- Instance with @transform p@orient = quaternion(3@transform); DELETE @transform attribute -- Instance with p@orient Different Results of orientation! If I instance the point with p@Orient converted from 3@transform using quaternion() , the orientation is flipped . It seems that I get the same p@Orient value with ident() and ident() * -1 . Is it the problem? How can I obtain the correct p@orient ? Thank you for reading my question
-
Hi guys, I'm Aureole. I've been trying to wrap my head around Matrix and transformation stuffs lately, but there's still something intriguing to me that I can't figure out, especially pivot and vector cracktransform(int trs, int xyz, int c, vector pivot, matrix xform) function! For example: 1. Where is the "pivot" information stored in a 4*4 matrix ? 2. Apparently typing different "pivot" in the cracktransform function yields different results. Then is there a "correct" pivot to use in the cracktransfrom() function to get a meaningful result? 3. I know that the @pivot intrinsic attribute will be created when a packed prim is created, and this attribute might be the "correct" pivot information to use in the cracktransform function. However, for regular non-packed geometry, is {0,0,0} always the "correct" pivot information to use even if the geometry is not centered at origin? I don't know if I've expressed myself clearly, pls let me know if you don't get me Many thanks!
-
Hi everyone, I need to switch low res pieces for high res ones. Unfortunately, only for this one object, the transform matrix is empty when coming out of the dop network. The other object coming out has a perfectly working matrix What could be causing this?
-
In short, how can I calculate the transformation matrix, or just rotation similar to how a geometry constraint/rivet works, where you define a few points as reference to glue a geo to an animated one? Long one: I want to procedurally animate the preroll of some packed RBDs, by comparing frame 1 and 2 of the simulation and project the objects backwards in time using that offset. It's a pre-broken sphere, so for translation, I find the average position of all points for both frames to calculate the offset per frame, which works great. [@P -= offset * backwardFrame;] The rotation part isn't as accurate though. I believe multiplying a rotation matrix with a scalar [@P*= rotMatrix*time] doesn't produce the desired results, so I am trying to calculate an axis and a rotation value that describes the difference between these two frames. I am currently picking the positions of 1 random but similar point in both geometries relative to their center, which I cross to find the axis. Then I use an acos(dot()) to get the angle between these two vectors. It almost works, but not 100% and picking a different point changes the result a bit. I guess that's happening because I need to take in consideration more than 1 points into the two geometry. thank you
-
I try to copy the intrinsic data (matrix3) from a DOP animated to an static object. Unfortunately the rotation vector is somehow funky. Have a look at the hip please: Credits: Tutorial by Alessandro Nardini on you tube: https://www.youtube.com/watch?v=s9DjkDt-6Js Smart_activation_4.hip
-
I'm trying to replicate the text effect shown at the beginning of the attached video. Where the characters are randomized and then are replaced with ordered text. I hacked together something that is nearly a solution however it still have issues. I'm packing the characters in the font sop by centroid in a loop and using the resulting points to copy the random characters. But the alignment is messed up. Maybe someone can suggest a way to align the randomized letters. Or maybe someone can sagest a better way to create this effect in Houdini. thanks! matrix_decrypting_text_v1.hiplc
- 4 replies
-
- matrix
- decrypting
-
(and 1 more)
Tagged with:
-
Hi. I was trying to use some "maketransform vex code" I've seen in a tutorial in order to scale objects along custom axis. But kind of lost and don't know how to apply the code properly. Any help? The file is included. I was thinking maybt it's better to apply some matrix that will bring every object to the world origin, then apply scale and then invert "back to origin" translation matrix so that the objects come to their local spaces... but don't know how do it in vex. maketransform.hipnc
-
Hey ppl! I'm trying to extract transform, scale and rotation from one geometry and apply it to another with VEX. In my case I'm extracting from a grid (2nd input) and applying to heightfield (1st input) which only takes Y rotation. Help me figure it out? Thanks! transform.hipnc
-
Transform a transform sop UI Handle by Matrix
Djangotron posted a topic in General Houdini Questions
Hello, I'm trying to stick a transform sop's UI handle to a point or prim without loosing control of the pivot functionality of the transform node. I've bundled this into an HDA and promoted the handle and used a point expression to get a position from the point I've got the rotation via another point expression and some VEX to unpack the matrix I use both of these expressions on the transform handles pivot translate and pivot rotate parameters This gives me the expected behavior with exception to the pivot being overwritten. Is there a way that I could 'parent' this handle or use the pre-translate/rotate for this problem? The only option I see for this right now is a custom python handle but I'm just wondering if there is anyone more creative than I who could suggest an alternative way around this problem. -
A while ago I used some very simple Matrix multiplications to bring geometry, that is positioned anywhere in space, back to the origin and from there, back to its original position. Maybe anybody here can help me remember? I think I created a world space transformation Matrix, called it myMatrix, and then multiplied it by its reverse to transform geo to the origin. In order to translate the geo back, I just multiplied by myMatrix...is that possible or am I getting something wrong? (Not in fromt of a Houdini right now) Anyway, how do I get the world space transformation matrix for an object positioned anywhere in world space, for example for some geo that came into my scene as an ABC from Maya? Lookattransform in VOPSOPs? Thanks for your hints and patience.
-
Transformation Matrix, Inversion & Rotation
Whatsinaname posted a topic in General Houdini Questions
I extracted the transformation matrix from an animated Alembic object A. This object is rotating around Y (amongst other things). Then multiplied P by the inverted transformation matrix, to lock it to the origin, which is working as expected. Another objects, B, is supposed to be interacting with it. Therefore I applied the inverted transformation matrix to B as well. This is working fine, but unfortunately, B is now rotating around my original object A due to this matrix multiplication. There must be something very obvious that I'm missing....but...how do I now force B to not rotate around A? Thanks for any suggestions! -
Hi! This is like a mixture of rigging and effects. I'm trying to add some cool dynamic parenting behavior to a working system that I have (the inputs from the locked null) but I hit a wall and I can't figure out how to solve my problem with all the attribs that I have (I created custom attribs for the Transforms). The problem is that I cant get the parenting to work with my current logic, I failed I used a dirty trick that gives me what I want but its just for that geometry with that size and distribution, so yeah its not really useful but at least it gave me a clue, but I'm still lost. Maybe some magician can help me out with this! Thanks! I'll share the file. PolyTransforms_Problem.hip
- 10 replies
-
After packing geometry, if I use this VEX snippet to edit the pivots I get predictable results: vector pivotOffset = chv("manual_pivot_offset"); vector pivotCentroid = primintrinsic(0, "pivot", @ptnum); vector newPivot = pivotCentroid + pivotOffset; setprimintrinsic(0, "pivot", @ptnum, newPivot); @P += pivotOffset; If I check "transform using point orientations" in the copy to points SOP and pack the copied geometry, the pivot will move according to the custom offset, but the object moves in a different direction. How can I solve this?
- 5 replies
-
- pivot
- packed geometry
-
(and 2 more)
Tagged with:
-
After setting up the rotations for packed objects in point vops (after scattering), I just couldn't do the same for scaling and translating. I want to find a solution for cases where the scattering has already been done (or there are many instances of the same object). Can some one help me out? Bellow is the hip file. packed_objects_debug.hip
-
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 ?
-
Hi everyone! I've made an illustration video-tutorial about the Heat Method application to point clouds by Keenan Crane et al, Yang Liu et al and others.
-
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.
-
Dear all, A simple looking question about how to pick up an @ttribute's value inside a MATRIX : 2@boo = set(1,2,3,4); printf("boo[0] : %g\n",@boo[0]); it doesn't work while it is working with vector or obviously with array. Saddly, i feel stucked, if needed to pick up one of these values, separatly. Humbly, all/any feedbacks are welcome even if i've dumbly mistaken myself (it could happen to anybody ), thank you all. cheers. alr77
-
Hi everyone ! As says the title, I want to export scalar values attached to voxels (VDB) into a 3D matrix because I want to access to voxel data into another software (matlab) does someone know how to do that ? thanks ! Alex
-
Hello, I'm working on a project and I'm a bit stuck on matrix transformation. I don't have a strong background in matrix manipulation. Here is what I am trying to do: I have a packed alembic that has been created from an external program. The alembic has a fullpackedtransform intrinsic that contains my translate, rotate, scale and shear data. I want to shatter this alembic geometry, pack the shatter pieces and use the original alembic transform to animate the pieces which will then be input into a rigid body simulation. I'm having trouble extracting the relevant data from the 4x4 matrix on the alembic. I can get my points to translate, but I don't yet understand how to make them rotate. I hope my diagram makes sense.