Jump to content

Search the Community

Showing results for tags '@orient'.

  • 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 1 result

  1. 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
×
×
  • Create New...