GetVirtualObjects v GetContour for Spline Gen
-
On 15/12/2016 at 13:04, xxxxxxxx wrote:
Good morning Donovan, once again i'm terribly sorry for getting back to this topic after such a long period but the topic has revealed being trickier than expected with nifty situations tough to debug and solve in the end.
At the following link you should find a solution which should properly work in almost all the cases although it's still susceptible of further improvements (for example with spline mask there are evident limitation compared to the c++ version)Let me know how fits with your needs.
Best, Riccardo
-
On 15/12/2016 at 15:26, xxxxxxxx wrote:
Thanks you Riccardo.
For a c++ exemple does it's the same code converted in c++ or you use others functions?
-
On 15/12/2016 at 21:08, xxxxxxxx wrote:
Hi Riccardo,
Thank you so much for your work on this! I'll use this as a jumping-off point for my own work. For those reading, the following issues remain:
1. Tangents aren't properly handled when the OffsetSpline objects is moved/rotated away from world origin.
2. You get a console error if you put an empty spline mask generator as the child of the OffsetSpline object.
3. If you make the spline editable, the transformed points return to their starting position (I think this is because access to the deformed cache is lost?).
4. Making the spline editable results in a very dense spline (akin to what you would get after using Current State to Object instead of Make Editable) even though the generator is only doing simple point transformations on the input spline.
5. Disabling some of the middle OffsetYSpline generators in a heavily nested chain can give no result, but toggling them on/off again restores the object (perhaps an issue of a missing cache?)It's proving to be a pretty thorny problem. If the C++ code works significantly better, I feel like enough of the bones are there that I could hack around and get a workable result even though I'm not familiar w/ C++. Do you have a working C++ example?
Thank you!
Donovan
-
On 16/12/2016 at 03:48, xxxxxxxx wrote:
Hi Donovan, thanks for getting back and for posting your impressions.
With reference to the issue reported I confirm that:
1. Fixed in Pastebin (0.2.1)
2. Fixed in Pastebin (0.2.1)
3. Fixed in Pastebin (0.2.1)
4. Not reproducible (the topology is kept exactly as the input child)
5. Not reproducible (even with very complex nested OffsetYSpline hierarchies disabling/enabling child worked properly)Best, Riccardo
-
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/E2bBz5. Objects go missing
http://imgur.com/a/4sCRO
http://imgur.com/a/gnhPJ
Example file: https://dl.dropboxusercontent.com/u/38130065/Bugs/DisappearingChildObjects.c4d -
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.
-
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.
-
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
-
On 21/12/2016 at 13:49, xxxxxxxx wrote:
Thanks Riccardo, working on it now!
-
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.
-
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?
-
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