Results 1 to 9 of 9

Thread: Rotation matrix?

  1. #1
    Senior Constrictor Netvudu's Avatar
    Join Date
    Sep 2003
    Location
    Barcelona, Spain
    Posts
    928

    Rotation matrix?

    Hi.
    i was trying to adapt a displacement technique from some other software and found a problem, because we donīt have a rotation Matrix node.
    Namely I want to input an angle, use a vector (letīs say 0,0,1) for the direction and get a matrix that I can multiply by something else.

    Any math wizzs that suggest a viable alternative?
    3d animation? Hah! Did you take a look through your window?thereīs plenty of it...and pre-rendered!!

  2. #2
    Super Member omichon's Avatar
    Join Date
    Jul 2003
    Location
    Bordeaux, FR
    Posts
    727
    As far as I remember, Poly2Poly has a rotate Matrix node in his Math nodes.
    www.oliviermichon.fr | 3D Animation, Motion Graphics and Broadcast Design.

  3. #3
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,900
    we donīt have a rotation Matrix node
    We don't have?

    Math > Vector > Multiply Matrix 3x3
    Math > Vector > Transform2
    Math > Vector > HBPMatrix

  4. #4
    Nope we don't. We need a node which transforms rotation into translation. Sure for a simple angle of 45 degrees it's just 1,1 then normalise, but arbitrary angles will be hard to calculate.

  5. #5
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    7,900
    Matrix 3x3 is triplet right, up, forward vectors.

  6. #6
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,771
    use HPB matrix and matrixHPB to go the other way.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  7. #7
    Registered User Mr. Wilde's Avatar
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    195
    A scripting node would be a neat feature for stuff like that. Add as much inputs as you want, add as much outputs as you want, and then you write a Python script to handle inputs and outputs.
    Last edited by Mr. Wilde; 05-01-2014 at 08:13 AM.

  8. #8
    Well things aren't very clear in LW. The other day I was trying to make Part Move normals to "Look At" to another object and while my linear algebra is bad that's something that took 2 min to figure out in Softimage ICE. Given though that ICE has some nodes and data structure that in LW seems to be... all blue inputs. Are these all vectors only? Dunno. In ICE you have 4x4 matrix in blue teal (No such things in LW seems), 3x3 matrix darker blue teal (which is Right, Up, Forwad Matrix in LW) and the there's also beyond Euler there's also Rotation bright blue (Axis + Angle). To help to that there's also a Rotate Vector node. Where you input your vector to be rotated, the vector to serve as axis and the angle. I could not replicate this in LW so far. Also there's no "Angle Between" even though Dot + ArcCos does the same. It's all these things that make a differences if you kind of get the logic to get somewhere but you don't actually know the math to get there.

    As for "look at" in ICE was fairly simple. Cross Product (PolygonNormalVector x Vector(Normalize(Nulll.pos - Polygon.pos)) which defines the axis of rotation. Dot Product of the same 2 vectors * ArcCos defines the angle between them. Plug both into Rotate Vector and you have the normals rotating to align to the object, which can be animated if you interpolate from 0 to the Angle Between them. Do I know everything thing going under the hood? No. But it was fairly easy to foresee what I needed and get there.

    Can it be done in LW. Why not? I just don't have a clue why, nor feel the nodes in place or the way the data structure is presented that it helps. Plus things like Displacement are always done as Delta. And sometimes you just want the absolute thing. Sure one can subtract... it's just gaahh... :P

    Cheers
    Last edited by probiner; 05-03-2014 at 03:33 PM.

  9. #9
    Finally got something with Part Move due to Poly2Poly's "Rotate Vector". There's still some spinning around the normal that I should fix.

    http://screencast.com/t/lsaVYunPv4P9

    Cheers
    Last edited by probiner; 05-04-2014 at 06:33 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •