Jump to content

Search the Community

Showing results for tags 'quaternion'.

  • 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 + Solaris!
    • 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

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Name


Location


Interests

Found 12 results

  1. 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
  2. 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
  3. Trying to find some info on applying quaternion rotations without using the copytopoints @orient point attribute. I build my quaternion, and then I'm stuck on doing two things: -Applying the rotation to an unpacked object and a packed object I've tried the rotate by quaternion VOP with unpacked geo and the makeinstancexform for packed geo and nothing seems to work this way... I've done some research but didn't find anything usefull (outside of copytopoints @orient). Can some one point me in the right direction?
  4. 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.
  5. As I'm just starting to understand quaternions and orientation in Houdini, I'm not sure how complicated this is to achieve. I could be completely over thinking it. Ultimately I would like to create a force in dops to rotate the packed object to its current direction of motion, or it's velocity. Modifying @w seems to be the best way to do that. For a first step, I'm trying to make a setup that takes a rbd packed object and rotate it back to it's original orientation. While it technically does that, it doesn't do it logically. It flips around its axis in bizarre ways. As I understand, it's behaving erratically because it's trying to rotate around all of its axes at the same time. This is the code I'm using in a pop wrangle node: vector qToE(vector4 q_value){ float q_0 = q_value.w ; float q_1 = q_value.x ; float q_2 = q_value.y ; float q_3 = q_value.z ; vector out = {0,0,0} ; out.x = atan2(2*(q_0*q_1+q_2*q_3), (1-2*(q_1*q_1+q_2*q_2))) ; out.y = asin(2*(q_0*q_2-q_3*q_1)) ; out.z = atan2(2*(q_0*q_3+q_1*q_2), (1-2*(q_2*q_2+q_3*q_3))) ; return out ; } v@euler = qToE(@orient); @w = -v@euler*1*{1,1,1}; This is where I got the quaternion to euler function: I've attached my houdini file to this post. If anyone has any tips, I'd be very happy to hear them! Thanks! orient_rotate_v01.hip
  6. I'm working on a simulation that has some crowd agents following a terrain using its normals as the up vector (for simplicity we can assume the terrain is a sphere). I've got my base simulation setup working fine, but in one case the sphere is moving really fast through the scene in world space. On certain frames where the terrain is moving extremely fast the crowd agents basically can't calculate the next frame so there positions end up being 'Nan' or undefined and they disappear. I tried running the simulation with up to 50 substeps, and that improves how many agents survive to the end of the simulation a bit, but still about half of them are still lost by the end of the sim. in order to combat this i managed to create a point vop that creates a transformation matrix from a tracked maya rivet/locator on the sphere. Then I applied the inverse matrix transformation to freeze the sphere at the origin to run the simulation. After the simulation is done, I'm able to re-apply the transformation matrix to the sphere to get it back to the correct spot. However, when I try to apply the matrix to the crowd agents, their final positions look correct, but their orientations are wrong. I believe the orientation attribute is the quaternion for all the agents rotations? Any ideas on how I would go about getting the agents to re-align correctly again after the simulation has been run? baking down the agents geometry and then applying the transformations seems to work, but this approach is really slow because of the amount of geometry it has to process, makes it quite difficult to iterate.
  7. Hey all, I'm trying to rotate Object B to match Object A's local rotation with Python. I've been using objectB.parmTuple('r').set(objectA.parmTuple('r').eval()), but this seems to be very wrong ^^ There seems to be some euler shinanigans, for starters, so I was going to use a rotation matrix but I can't find some setLocalTransform equivalent, and setParmTransform is equally unhappy. Thanks in advance for helping me understand how Houdini prefers this to be done!
  8. Hello guys ! I need a little help. I have a curve and I am trying to get secondary curves around it. And finally to convert it to geometry with polywire. I don't want my curves to interpenetrate or to twist. I scatter points into a circle. I give an individual attribute to each point. I copy them to the points of the curve. I tried polyframe and vex code to keep the orientation of the points along the curve. I manage to get it but now I see that my secondary curves twist at some points. I think that I should use quaternion as orient before the copy but I don't know how to use it. For the moment, I've got this in my wrangle before the copy : v@N = v@N ; vector tangentu = v@tangentu; vector up = set(0,1,0); vector side = cross(tangentu, up) ; v@up = side; v@side = side ; v@N = tangentu ; // p@orient = set(@tangentu.x, @tangentu.y , @tangentu.z, radians(90) ); At the end, I will use a polywire (and I don't want them to twist around my main curve). Do you have some ideas of how I can do this ? I join the scene to explain. epe_copyWithRotationAlongCurve.hipnc
  9. Hi, I am trying to give little banking in my flying object.......so i have created a 3 by 3 matrix,gave an angle and an axis in the direction of velocity....and then used it in vex as a rotate matrix.... vector axis = normalize(@v); vector matx = cross(axis, {0,-1,0}); vector maty = cross(axis, matx); matrix3 m = set(normalize(matx),axis,normalize(maty)); float angle = fit(sin(@Time * 0.5 + fit(random(@ptnum),0,1,0,360)),-1,1,-45,45); @angle = radians(@angle); rotate (m, @angle, axis); @orient = quaternion(m); i want to know is there any way to print the value of rotate matrix?? i did the same thing in vop sop and its working but here i face some issue. what's wrong i didn't understand.
  10. Hello Everyone, http://www.hossamfx.org/math-in-houdini-vol2/ Hello Everyone, Description: In volume two of Math in Houdini training. We will continue exploring the big role of math in creating visual effects and controlling the simulation behavior and this time we will move to more advanced concepts and provide cool projects. I will explain one of most important physical parameter: the gradient. And show you how to use it in rigging and collision and give you wide idea about using gradient in different operations in Houdini also We will go indepth with matrices and learn cool techniques using the matrix: it is the “Frame of Reference” you must know this magic secret about matrix. If you have many questions about Quaternion parameter, So we will dive into this concept and answer all questions with cool projects and we will see how to create quaternion field to effectparticles motion and if you don’t know what is the Vector 4, we will have cool project about using vector 4 inside the wire solver dynamics. And I will show you how it to build your own cloth simulation from scratch, this part will give wide idea about how the dynamic solvers work and what is the constraint , gravity , and how the collision is calculated ….. and many other math topics. Thank you. Lesson plan WHAT IS THE GRADIENT, AND FOR WHAT !!! all dynamic solvers use Gradient and normal and velocity and collision calculations, all this Physical Parameters use Gradient, you absolutely Know what is the Gradient !!! ? 1. Gradient & Slope Relationship– Are there any relationship between it? 2. It can create Normal – slope can create normal, how? 3. Speed and Velocity calculates –it is awesome how slope can calculates speed for everything. 4. Slope & Dot product in Rigging – No more tutorials about how to Rig the wheel. 5. Gradient of surface – Slope can create Gradient 2D field. MATRIX IN DEPTH !!! we will start by talking about for what we need matrix and next it will be more clear how it is easy to use matrix, and Frame of Reference is strong concept that you must have idea on how to use. 6. Why we created the Matrices – to understand matrices I must know for what it was created. 7. Recreating the Matrix – Now we will see how it is more easy with Matrices. 8. Frame of Reference – it is cool Concept you must know how to use with matrices. QUATERNION, NO MORE QUESTIONS ??? you don't know any thing about quaternion! you will know every thing about it, for what, when to use, how to control and how to build field of quaternion to advect particles. 9. What is the Quaternion – You will Have depth understand of this Scary parameter. 10. Quaternion Field part 1 – Quaternion inside Dynamics can create awesome animation in Particles. 11. Quaternion Field part 2 –How to Keep Particles inside defiened Volume using quaternion attribut VECTOR 4 IS A QUATERNION, ... !!! the orient attribute in the Wire solver is very important and you must know how it work, in this project we will manipulate this Attribute to create procedural dynamic animation. 12. Quaternion & Wire Solver – Big role of Quaternion in wire object. 13. Feelers & Quaternion part 1 –Feelers of insects moving around all the time, we will simulate this motion with quaternion. 14. Feelers & Quaternion part 2 –How to control the physical parameters of feelers to get nice real motion. SIMULATION CODE & COLLISION it is very important to get depth understand of how the Dynamic solvers work, we will see how we can build cloth simulation and add collision to this simulation using the Point VOP and Sop Solver. 15. Apply Gravity –Without any dynamics solvers, we will create our solver and start by adding gravity force to objects using the point vop and sop solver. 16. Create Cloth Force – Define the force spring between cloth object points and create pin constraint for new solver. 17. Gradient & Collision –Gradient of Volume is the way to create collision between objects. ِAll Content With Project Files . Full information Here
  11. hello,How do I connect using vop? thanks,please help me.
  12. Hello everyone, I am trying to recreate the per primitive rotation example i found here with VEX for learning purposes. The example file uses VOP to calculate a quaternion to rotate the points but when i do it in vex something weird happens and points doesn't behave as expected. I have also used qrotate() but no luck. Can you please take a look at file? Am i calculating the quaternion wrong? Thanks in advance Per_prim_rot_vex.hipnc
×
×
  • Create New...