Jump to content

Search the Community

Showing results for tags 'matrix'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Found 44 results

  1. copying Matrix

    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
  2. 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
  3. 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
  4. Extract/Apply transforms and rotations

    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
  5. 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.
  6. vex function

    Hello, How can I write the following functions in VEX? There are two box objects in different positions. How do I get a matrix that can move the first object to the second object?
  7. 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!
  8. 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?
  9. 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
  10. 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 ?
  11. Quaternions & Matrices

    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.
  12. Matrices - CG Forge - Quicktip

    For more tutorials, check out cgforge.com In this quick tip, I talk about matrices. If you've ever wondered about what a matrix is, and how they can be useful, then you'll love this introduction to the topic. Thanks for watching!
  13. Geodesics in Heat

    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.
  14. 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.
  15. Matrix Transformations

    Hello every one, I've been studying some linear algebra to better understand this amazing piece of software called Houdini. I came across some problems and after some RnD I've put together an example scene that I hope can be usefull for every one struggling with matrices and other related concepts. I feel the need to share this, because most of the tutorials I've seen on this subject end up using quaternions for the transformations, and I've put up a Matrix only approach. Do remember that the "correct" approach in this cases is the quaternion one. If any one is kind enough to convert this scene into a .hipnc and re-share it, I'd be grateful. At the moment I don't have time to do it myself. Cheers! Matrix_Transform.hip
  16. 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
  17. 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
  18. 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.
  19. Lately I have been trying to wrap my head around transforming point positions with the use of matrices in VOPs. To do that, I tried the following: Lets assume I have 3 points with their position vectors A, B and C which come from an alembic and are constantly changing values. I use a time shift and set it to $F + 1, and extract the same points position vectors, which are now called D, E, F. Then I set A,B and C into a 3x3 matrix, transposing it (to get the vectors in columns instead of rows) and do the same with D, E, F. After all this, I multiplied the inverse of the matrix containing ABC with the one containing DEF (this was not inverted). The resulting matrix was multiplied with new Position inputs, but the resulting transformations didn't match the original ones... What am I doing wrong? Thank you.
  20. Hello to all! I am currently writing a wrangle-thing in which I'm hoping to generate a random "hair" on every point and make it face the normal of said point. The way I planned it is as follows: 1. create the hair w/ random params on 0,0,0 2. rotate the hair to Normal of the point that it's "generated on" w/ rotate(matrix,angle,vertex) function 3. Move the hair to @P I'm not a hero with vector math, otherwise I'd generate the whole hair thing along a normal. I wonder if I somehow can construct a identity matrix, like one would do with the ident() function, and use that to transform the prim. Is there a way to simply rotate a primitive using something simpler than extreme vector math? sgamhar.hip
  21. 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
  22. Good morning dear community As well as we can get a bbox boundaries and centroid using as well $CEX, $CEY, $CEZ or centroid expression, exist the possibility to get "pivot rotation" related to world space? Tried conversion of acos to degrees using dot from Normal Vector but without successfully results. Take in mind it came from point deformed animation with constant shape (Menas bbox remain constant during the whole length animation) Thank you very much
  23. Dear all, Sorry if my question looks naive, as you're all surely usual with this : matrix reading /printing. But i'd like to "printf" it element by element. Usually, generally a matrix looks like : matrix M[r][c] -> then your iter through. eg : print(M[1][1]+"\n"); But here in Hou it is : matrix M Yes printf() prints the thing but the whole thing. Then, how to read elements one by one separatly, please? i humbly dunno. Am usual with this practice in other languages because Matrices could be used as a fantastic "Chest" to store values, compiling vectors pack, and on and on... So any advices to this practical question are welcome. Thank you a lot. Bests,
  24. Hi everyone, I would like to better understand matrices and how to use them to do what I want. I've prepared a hip file with screen shots of things I get and don't get. While writing this I'm almost making discoveries so please bare with me if it seems like a long thread First off, applying a matrix3 to rotate my points seems fine as long as my vector is normalized. Else, it affects scale as well. Why is that? 1. rotate around y matrix3 m = ident(); float angle = ch("angle") ; vector axis = {0, 1, 0} ; rotate(m, angle, axis); @P *= m; 2. rotate around {0,1,1}. Not good. matrix3 m = ident(); float angle = ch("angle") ; vector axis = {0, 1, 1} ; rotate(m, angle, axis); @P *= m; 3. rotate around normalize({0,1,1}) matrix3 m = ident(); float angle = ch("angle") ; vector axis = normalize({0, 1, 1}) ; rotate(m, angle, axis); @P *= m; Hence, we need to normalize the rotational axis vector to prevent scaling the geometry. Secondly, I'm having issues setting the pivot for my rotations. In the examples above this all works well if our pivot is set at the origin. So how do we set the pivot to be at the center if our geometry? Please take a look at rotate_not_at_origin object. To begin this little science experience, I've copy stamped boxes on a single box and used the normals from the orignal box as the rotation axis vector. So far so good. This all goes to shit if we move our original box from the origin. How do we solve this? The only way I've seen, and don't understand, is using @orient as follows before the copy stamp. Also, this no longer copies the geometry based on the normal direction of my points. matrix3 m = ident() ; float angle = ch("angle") ; vector axis = normalize(v@rot_axis); rotate(m, angle, axis); @orient = quaternion(m); So how do we solve this? I really need to wrap my head around this once and for all gahhhhh!! Thanks everyone! Maxime matrices.hipnc
  25. How to read matrix values?

    4@m = ch4('transform'); @test = @m[2][3]; The first line assigns a 4x4 matrix channel to 4@m. I tried different things, but unfortunately the second line does not read the corresponding value from the matrix. How would I do that?
×