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

    GetVirtualObjects v GetContour for Spline Gen

    PYTHON Development
    0
    28
    17.3k
    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

      On 16/12/2016 at 09:53, xxxxxxxx wrote:

      Hi Riccardo,

      Thanks for the updates! Is there any chance you could post Github Gists in the future so that it's easier to track which changes you've made?

      4. Dense Spline
      Add a Flower spline
      Make it editable
      Note that there are about 16 points.
      Make it a child of an OffsetY spline, make it editable.
      Note that there are dozens of points.

      It's somewhat debatable whether this is a bug as it allows for deformed objects as input, but the problem is that for spline-modeling operations you want to preserve the user-created points as much as possible without adding the auto-interpolated points.
      http://imgur.com/a/E2bBz

      5. Objects go missing
      http://imgur.com/a/4sCRO
      http://imgur.com/a/gnhPJ
      Example file: https://dl.dropboxusercontent.com/u/38130065/Bugs/DisappearingChildObjects.c4d

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

        On 19/12/2016 at 06:44, xxxxxxxx wrote:

        Hi Donovan, thanks for providing these additional info.

        With reference to the first encountered limitation, when you try to make editable any generator using spline as input element - whatever it is mine or the spline mask or even in the extrude but in this last you should switch the display to Lines -  the number of points is increased because making the curve editable seems to not retain the curve parameters set and converts the curve topology current type (Bezier, B-Spline, Akima etc etc) to linear resulting in an increased number of points to keep the resulting curve in tolerance. Under this scenario further investigation could be took in consideration later on.
        (Limitation01)

        For the second limitation (object missing) it's by design because only the first child is considered as valid input object for my generator. If you promote the child listed in the second place in your second image to first child you will see the generator operating as expected.

        Best, Riccardo.

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

          On 20/12/2016 at 15:46, xxxxxxxx wrote:

          Hi Riccardo,

          I'll concede the first limitation.

          For the second, compare this to the behavior of the Symmetry object. The generator only acts on the first child, but it doesn't hide/delete subsequent children. This way you can child objects to the generator without having to worry about complex null structures.

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

            On 21/12/2016 at 00:57, xxxxxxxx wrote:

            Donovan, thanks for further comment and I'd say it would be not that hard to fix.

            That said, as already stated, although the provided solution is still perfectible I'd call it done (considering that 95% of the initial issues have been addressed) and leave to the community the next steps.

            Best, Riccardo

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

              On 21/12/2016 at 13:49, xxxxxxxx wrote:

              Thanks Riccardo, working on it now!

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

                On 22/12/2016 at 14:47, xxxxxxxx wrote:

                Alright, I've made a GitHub repo for Py-OffsetYSpline. I'll be working on the last few edge cases. If you have any suggestions for improvements please fork and make changes or add an Issue to the issues list.

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

                  On 29/12/2016 at 23:33, xxxxxxxx wrote:

                  Okay, I'm a bit further down the path and I'm running into some thorny issues with objects constantly rebuilding. It seems like the system for checking whether the generator or children are dirty returns dirty every other time. This means that the object is regenerated every other redraw

                  It's not so slow when testing the object on its own, but once you start nesting them and then extruding the results - you're taking a scene down from 120fps down to 5 or 6.

                  It seems like the touch() is partially responsible as touching the object updates its dirty checksum. GetAndCheckHierarchyClone() returns a useful dirty result for children, but I suspect it's quite slow as I think it forces all children to regenerate when their GetContour() methods are called via GetRealSpline().

                  Anyone have any examples of: Spline Generators that use Input Objects that update in real-time, but only when changes are made - not constantly?

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

                    On 30/12/2016 at 08:50, xxxxxxxx wrote:

                    Hi Donovan, I've quickly looked into the issue mentioned and it seems that the GetAndCheckHierarchyClone () returns a "positive" dirty value even when nothing has changed on the input object. Because of this unexpected behavior, since the child dirty status is checked by the RecursiveCheckDirty function, commenting the below line just after the GetAndCheckHierarchyClone call
                    should fix the issue.

                    dirty |= cloneDirty
                    

                    Looking forward hearing from you, give best.
                     Riccardo

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