Reconciling Different Prop Rotation Axes In Poser And DAZ Studio

3dcheapskate3dcheapskate Posts: 2,689

(Note: I'm trying to do this for DS3-4+ and Poser6-10+)

I've got a manual procedure (with a couple of scripts to assist) for positioning a hand-held prop in a proxy-hand at the world origin. The procedure is basically this:

1) Unparent the prop
2) Zero its translations
3) Zero its rotations
4) Zero its origin*
5) Zero its offsets*
6) Manually translate the prop to the origin
7) Zero its origin
8) Zero its offsets
9) Manually rotate the prop to the correct orientation
10) Record the translations and rotations

(*Note: the zero origin/offsets at (4) and (5) is mainly as a visual reference. (7) and (8) are for ensuring that rotations are about the world centre)

The result of this procedure is a set of six parameters (X, Y, Z rotations and X, Y, Z translations) that can be used along with another script to do the whole procress (1) to (9) automatically in the future.

For many props the six values I get doing this in Poser are the same as I get doing it in DAZ Studio (after converting translations between DAZ units and Poser units of course).

However, for some props I get very different values from Poser and DAZ Studio. I've just realized that the problem occurs when if the prop's local rotation axes aren't aligned with the world axes, since in DAZ Studio step (9) sets world axis rotations, whereas in Poser step (9) sets local axis rotations. At least that's how it looks to me - the attached screenshot should help visualize what I'm on about.

I'm trying to find a way of getting a set of three rotation values out of step (10) that will work in both Poser and DAZ Studio. Any thoughts and suggestions on the subject would be appreciated. I realize that the solution may be on either on the DAZ Studio side or on the Poser side, so I'm posting this on the a couple of forums.

KatanaProblem.jpg
743 x 760 - 118K

Comments

  • 3dcheapskate3dcheapskate Posts: 2,689
    edited April 2015

    From the DAZ Script2: DzNode Class Reference there are a few methods for getting rotations/orientations. Maybe one of these is what I need? Maybe I should just print them out in step (10) and see if anything matches the Poser version?

    DzFloatProperty getXRotControl () / getYRotControl () / getZRotControl () - The float property that controls local rotation of the node around the x axis.

    DzFloatProperty getOrientXControl () / getOrientYControl () / getOrientZControl () - The float property that controls the rotation of the node's orientation.

    DzQuat getLocalRot ()
    - The local-space rotation of the node.

    DzQuat getWSRot () - The world-space rotation of the node.

    (I never learnt about quaternions - I have the vague impression that they define rotations by specifying a vector/axis and a rotation about that axis ?)

    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,689
    edited April 2015

    Trying to track this one down I've come across something I've never seen before...

    A prop (PP2) that loads in a completely different position in Poser and in DAZ Studio.

    I positioned the 'In Hand' M4 Journeyer Scout katana at the origin in Poser 6 using my procedure and scripts and saved it as a Poser prop.

    I restarted Poser 6, loaded M4 (just as a positional reference), loaded my new prop, and took a screenshot (also tried Poser 9 - okay too)
    Did the same in DS3. And then again in DS4.6 - both wrong.

    wazzup.jpg
    990 x 351 - 100K
    Post edited by 3dcheapskate on
  • 3dcheapskate3dcheapskate Posts: 2,689
    edited December 1969

    ...and here are the relevant bits of the PP2 I created from Poser 6

    prop JSKzeroP6:1
     {
     name    JSKzeroP6
     ...
     parent UNIVERSE
     ...
     channels
      {
      ...
      xOffsetA OriginX
       {
       name originX
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.004
       keys
        {
        static  1
        k  0  0
        }
       interpStyleLocked 0
       staticValue 0
       }
      yOffsetA OriginY
       {
       name originY
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.004
       keys
        {
        static  1
        k  0  0
        }
       interpStyleLocked 0
       staticValue 0
       }
      zOffsetA OriginZ
       {
       name originZ
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.004
       keys
        {
        static  1
        k  0  0
        }
       interpStyleLocked 0
       staticValue 0
       }
       ...
         rotateY yRotate
       {
       name yrot
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 1
       keys
        {
        static  0
        k  0  75.9741
        }
       interpStyleLocked 0
       }
      rotateX xRotate
       {
       name xrot
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 1
       keys
        {
        static  0
        k  0  22.9775
        }
       interpStyleLocked 0
       }
      rotateZ zRotate
       {
       name zrot
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 1
       keys
        {
        static  0
        k  0  -10
        }
       interpStyleLocked 0
       }
      translateX xTran
       {
       name xtran
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.001
       keys
        {
        static  0
        k  0  0.571
        }
       interpStyleLocked 0
       trackingScaleMult 1
       }
      translateY yTran
       {
       name ytran
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.001
       keys
        {
        static  0
        k  0  0.089
        }
       interpStyleLocked 0
       trackingScaleMult 1.000000
       }
      translateZ zTran
       {
       name ztran
       initValue 0
       hidden 0
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.001
       keys
        {
        static  0
        k  0  -0.38
        }
       interpStyleLocked 0
       trackingScaleMult 1.000000
       }
      xOffsetB xOffB
       {
       name xOffB
       initValue 0
       hidden 1
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.004
       keys
        {
        static  1
        k  0  0
        }
       interpStyleLocked 0
       staticValue 0
       }
      yOffsetB yOffB
       {
       name yOffB
       initValue 0
       hidden 1
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.004
       keys
        {
        static  1
        k  0  0
        }
       interpStyleLocked 0
       staticValue 0
       }
      zOffsetB zOffB
       {
       name zOffB
       initValue 0
       hidden 1
       forceLimits 0
       min -100000
       max 100000
       trackingScale 0.004
       keys
        {
        static  1
        k  0  0
        }
       interpStyleLocked 0
       staticValue 0
       }
      }
     endPoint -0.359223 0.668103 0.207721
     origin 0 0 0
     orientation 63.9512 -8.86485 14.1564
     ...
     }
  • 3dcheapskate3dcheapskate Posts: 2,689
    edited December 1969

    That PP2 basically has the following settings (all listed in X, Y, Z order here):

    OffsetA = (0,0,0)
    OffsetB = (0,0,0)
    Origin = (0,0,0)
    Orientation = (63.95,-8.86,14.14)
    Rotations = (22.9, 75.9, -10)
    Translations = (0.57, 0.089, -0.38)

    Maybe I should try editing the PP2 and setting Orientation to (0,0,0) to see if that puts the prop in the same position in Poser and DAZ Studio ?

    (I love trial and error!)

  • 3dcheapskate3dcheapskate Posts: 2,689
    edited April 2015

    That was a good idea - now I think I'm getting somewhere !

    Left - Poser 6, Right - DAZ Studio 3

    (and yes indeed, if I save the correctly positioned 'InSheath' katana (which worked correctly in both Poser and DAZ Studio) as a prop Orientation is already set to (0,0,0) in the PP2)

    So (hopefully) in conclusion I need to add an extra step to the procedure in my original post, something like

    "3a) Zero its orientation"

    sameprop.jpg
    816 x 293 - 51K
    Post edited by 3dcheapskate on
  • smb675smb675 Posts: 12

    As a newb I need to solve the same issue but directing me what to do doesnt help if I dont know where to make these zero adjustments...

  • 3dcheapskate3dcheapskate Posts: 2,689
    edited July 2022

    This problem was something I ran into while working on the helper scripts for my SmartPlus Props freebie project. Apparently I did Release three Version ones of the helper scripts for both Poser and DAZ Studio in March 2016:  DAZ Studio SmartPlus Prop Helper Scripts Rel3 Ver1 ;  Poser SmartPlus Prop Helper Scripts Rel3 Ver1 

    However, it appears that I lost interest in this stuff around April 2016...

    Post edited by 3dcheapskate on
Sign In or Register to comment.