Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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
    • Recent
    • Tags
    • Users
    • Login

    python bullet solver

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 521 Views
    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 Offline
      Helper
      last edited by

      On 13/04/2013 at 11:23, xxxxxxxx wrote:

      hi,

      is it somehow possible to get hold of the bullet solver data in python ? i need collision normals
      and velocity vectors and would prefer not to carry arround some clunky xpresso node solution.
      i looked into the MoGraphDynamics SceneHook, but it does only contain the world settings. i 
      also looked into the cpp documentation, but i could not find any information there.

      i guess this is mission impossible ?

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

        On 16/04/2013 at 13:24, xxxxxxxx wrote:

        any information would be cool, even that it is impossible atm.

        and i have got another question : is there known any downside on hosting a pointtag within
        a pointtag ? or generally a basetag within a basetag ? something like that :

        + myTagGeListNodeA
         | ---myTagGeListNodeB
         | ---myTagGeListNodeC

        it would be a perfect caching solution for a current problem for me, however i am not sure
        if i will loose data with such gelistnode structures under certain conditions, as c4d does not
        expect tags to have children ?

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

          On 17/04/2013 at 02:43, xxxxxxxx wrote:

          Hi Ferdinand,

          Have you tried to get the MoGraph data (c4d.modules.mograph.MoData) with c4d.modules.mograph.GeGetMoData()?

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

            On 17/04/2013 at 03:51, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            Hi Ferdinand,
            Have you tried to get the MoGraph data (c4d.modules.mograph.MoData) with c4d.modules.mograph.GeGetMoData()?

            hi,

            thanks for your reply, but i do not really understand your suggestion. first of all
            GeGetMoData()returns only for MoGraph cloner objects a MoData instance. but
            even if i do host the bullet simulation within a cloner, modata does only contain
            matrix data regarding the mograph particle state for that cloner. i guess i could
            calculate the velocity out of the current and previous state of the matrix data,
            but the previous state  field is not working properly for me (seems broken like 
            the size maxtrix). i could do that also just with the baseobject matrix, but that 
            will leave me with the missing contact points / collision normals.

            am i overlooking something important here ? it would be nice if someone could 
            point me into the right direction, if the bullet data is burried somewhere in the 
            modata.

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

              On 18/04/2013 at 03:57, xxxxxxxx wrote:

              Hi Ferdinand,

              I got more information on this from the developers.
              There are no velocity vectors or collision normals stored in the MoData; MoGraph particles have no velocity, anything that happens to them is inherited.
              It's possible though that it could be calculated from the matrices and storing the previous frames data.

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

                On 18/04/2013 at 06:13, xxxxxxxx wrote:

                hi,

                thanks again for your reply. it would be cool if you would consider exposing some of
                the bullet solver data on a code level in future sdk releases. if i am not mistaken, this 
                is not just a problem in python, but also a cpp problem (at least i could not find a bullet 
                solver interface class in the cpp sdk).

                while you can relatively easily calculate the velocity vectors on your own, you cannot do 
                that for collision normals, force vectors and so on. i am not asking for exposing/wrapping 
                the whole bullet class system, just for exposing the bullet data in the current scene. as 
                there are the xpresso nodes doing exactly that it cannot be too hard 😉

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