Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Converting Animation to PLA issue

    SDK Help
    0
    7
    662
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 01/02/2007 at 01:01, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R8.2-R10 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      I'm converting animation on a bone hierarchy to PLA on the root Polygon object. This works.

      But if there is a Polygon object parented to a bone somewhere in the hierarchy, it doesn't get proper PLA conversion so that it stays with the root Polygon object - it just sits in its default location (from the initial frame).

      AnimateObject() is being called for each Polygon object, then SendModelingCommand(MDATA_CURRENTSTATETOOBJECT,...). The resulting object is then used to set the points of the PLA key at each frame of the animation.

      Unsure how this can be rectified.

      Thanks,

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 01/02/2007 at 22:46, xxxxxxxx wrote:

        Anything? 😉

        Seems that even passing the hierarchy up to but not including the root polygon object doesn't retain the animation. Seems that if the animation on the parented polygon object is solely a side-effect of the bone hierarchy animating it (top-down as compared to the root being deformed), this doesn't work for PLA conversion.

        Here's an example for clarification:

        Figure Polygon Object
        .Body bone
        ..Hip bone
        ...Abdomen bone
        ....Chest bone
        .....Neck bone
        ......Head bone
        .......Hair Polygon Object

        See, the bones are all animated so that the Hair is moving around in space according to the transformations on the bones. The hair is responding to parent transforms. But Current State to Object is not working in this respect. Works for 'stills' at any keyframe but not PLA on the Hair. No idea why this is the case.

        Thanks,

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 02/02/2007 at 01:35, xxxxxxxx wrote:

          Thanks for posting the hierachy, I will take a lok at it.

          Just keep in mind that there are probably still some things to iron out regarding PLA and the new SDK.

          So basically you want to bake all your polygon objects to PLA?

          cheers,
          Matthias

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 02/02/2007 at 01:50, xxxxxxxx wrote:

            This is general to the involved SDKs (8.2-9.5 so far). Haven't looked at the similar R10 code yet.

            Yes, all of the polygon objects need their animation baked to PLA (if the user settings are for that result).

            For 'root' Polygon objects - those that aren't parented to anything else with animation - my current method works perfectly to retain the animation as PLA (mainly bones and morphs). And baking all of the polygon objects to a still at any frame works totally.

            You'd think that extending the still-at-any-frame methodology would work the same by stepping through the animation (doc->SetTime(), doc->AnimateDocument(), EventAdd() before SendModelingCommand()). Seems that if the Timeline is set to a particular frame by the user and a baked still created, no problems. But stepping through the animation doesn't return the same results for these indirectly animated polygon objects. After some hours of experimenting, I am still at a loss.

            Thank you very much!

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 05/02/2007 at 03:38, xxxxxxxx wrote:

              Couldn't you simply use the points of the hair polygons multiplied with the matrix for the PLA? As far as I understand it they don't animate, they just follow the head bone?

              cheers,
              Matthias

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 05/02/2007 at 11:00, xxxxxxxx wrote:

                That's the thing. How do I construct the matrix from the regular animated data (on the head bone)? I know that I can get the global matrix with GetMg(), but this is a static matrix representation, correct? Or would it be updated during the animation?

                Thanks,

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 05/02/2007 at 12:21, xxxxxxxx wrote:

                  Ah, need to apply the global matrix - from after each AnimateDocument() per frame - of the source object to the points of the CurrentStateToObject object at each frame. The destination object (receiving the PLA animation) needs its global matrix set to a unit matrix afterwards to counteract the PLA animation.

                  That works perfectly!

                  Thank you very much,

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post