[Sidefx-houdini-list] converting point/particle rotations to Euler rotations

Lucio Flores dogboy_l at yahoo.com
Wed Mar 8 22:34:35 EST 2006

--- Andrew D Lyons <tstexture at gmail.com> wrote:

> Hi,
> I'm guessing others have come across this problem so I thought I'd
> bounce it here for ideas.
> In Houdini we tend to rotate vectors such as "N" and "up" a lot to
> create point/particle rotations.
> Say for instance you have some external software that requires all
> point/particle rotations to be described as Euler rotations.

Ha ha!!!! WHY?!?!?!?!  I know, I know, antiquated pipeline.... The '80's style
Euler tumbling' option in the 3D viewport preferences dialog still makes me

> What's the best, sure-fire, works-every-time solution to this
> conversion? (Something that can look at a point that has been aligned
> by noise fields, follow pops, rotation pops and transform sops and
> give a clean Euler representation?)

Don't know if you have an HDK person there, but they have a solution for this
in UT_Matrix4 called UT_Matrix4::instance(). It's takes a position and velocity
vector, and takes an optional upVector, optional rot quaternion, and another
optional orient quaternion. You would specify each optional particle attribute
if they exist, and it returns a translation matrix. Then you could use
UT_Matrix4::explode() to extract euler rotations in any rotation order. 

> NB: For motion blur reasons it needs to calculate continuous
> rotations. ie - 359 + 2 = 361 -not- 359 + 2 = 1

For this, you can write a script to detect any -180 to 180 flip, and add 360 to
the solution to keep this from happening. 

> Cheers
> P.S. Have seen Particle CHOP. Ideally we want to pull in points from
> SOPS - not just POPs. Also perhaps specify rotation order like Object

If you do go the hdk route, then make a vex operator out of it, then you can
call it an any context. 


Manson: My philosophy is:  Don't think.  I don't believe in the mind that you think with and scheme with.  I don't believe in words.

Reporter: If you don't believe in words, why do you use so many of them?

Manson: Words are symbols.  All I'm doing is jumbling the symbols in your brain.  Everything is symbolic.  Symbols are just connections in your brain.  Even your body is a symbol.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the Sidefx-houdini-list mailing list