Limit at 512 ??
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/10/2012 at 21:16, xxxxxxxx wrote:
I tested the scene on R12, where I don't see any dots. Grid on 7,7,11 creates a crash.
In R13 I can see the dots, but with 7,7,11 I also get the crash. R14 didn't make it to my hd yet. But something is going on with 512 here
With R12, I do get a display of a kind of subdivided Spline in the editor. In R13 I get a crash, as soon as I create the Spline.
I am running on Windows and an NVIDIA GTX 580 ...
Cheers,
André -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/10/2012 at 02:36, xxxxxxxx wrote:
Thank you for looking into it, André.
I don't get crashes, just weird display.
Well, I do, if I save a scene containing the Test object and then trying to open it.
There is something really weird about all this. And I was sure I was doing plain ordinary stuff.
Could someone else take a look at this too?Rui Batista
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/10/2012 at 08:27, xxxxxxxx wrote:
I looked at it briefly too.
It crashes a lot for me on R13 as well.To make it easier to troubleshoot. I removed all of the box code stuff so only the spline code existed.
There is definitely a hard coded size limit situation happening with the line: spline_help.GetOffsetFromReal(i*stp).
Anything over 512 crashes C4D.Another weird thing is the drawn splines only show up if the mouse is over the scene view. Then disappear when the mouse is anywhere else. That seems wrong to me.
I noticed that you're drawing with a tool plugin. But you don't have any mechanism in it to tell it to stop drawing. So the system is in a sort of infinite loop when that plugin is used.
If I run the reload python scripts command. It crashes C4D, because your plugin is still running and trying to draw things in the background.My Conclusions:
-The number 512 does seem to be a hard coded limit being used here.
But I also asked myself..Why would I ever want to go that high with subdivisions anyway?-I don't think the draw method is supposed to be used like this where it's constantly running(drawing).
It might need to be tied to something like a mouse button or keypress to turn off the draw state.
Otherwise the plugin makes C4D very unstable.* Edit - I almost never make tool plugins so know very little about them. So I opened up some of my examples to see why your plugin might be crashing so badly. And I noticed that in my other tool plugin example. None of them use GetActiveBaseDraw() in them.
That might be something to check on as well.*Edit2 - I also just noticed that in my other example that uses GetVirtualObjects()
The draw code is placed inside the draw() method. Not inside the GetVirtualObjects() method.
Not sure if that means anything important or not.-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/10/2012 at 09:24, xxxxxxxx wrote:
Thank you for checking it out, Scott.
I usually do all my drawing inside the Draw method. This was just for testing. But I see that it will not work if it is not done inside the Draw method. I changed my code to perform all the drawing inside the Draw method and it works now.
There is still that limitation of 512 subdivisions (and, although being a very large value, sometimes, for really big splines, it may be needed).
But I guess I can leave without it being able to calculate more than 512 subdivisionsRui Batista
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/10/2012 at 04:27, xxxxxxxx wrote:
Originally posted by xxxxxxxx
There is still that limitation of 512 subdivisions (and, although being a very large value, sometimes, for really big splines, it may be needed).
But I guess I can leave without it being able to calculate more than 512 subdivisionsI've checked this and can't confirm.
How did you found that SplineHelp.GetOffsetFromReal() has a limit of 512 subdivisions?With the spline case, if we print the offset calculated with 600 subdivisions we get valid values for 1/600, 2/600 etc.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/10/2012 at 04:38, xxxxxxxx wrote:
Well, the code posted above was not working for subdivisions over 512.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/10/2012 at 04:39, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Well, the code posted above was not working for subdivisions over 512.
It does work, this is why I'm wondering why you said that over 512 subdivisons it didn't worked.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/10/2012 at 04:47, xxxxxxxx wrote:
It didn't, here.
But I believe now that it was due to the fact that I was not doing the plotting inside the Draw method.
What is strange is that it occurred with the 512 limit. And since 512 is a power-of-two number, I considered that it could be in fact a preset limit. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/10/2012 at 04:51, xxxxxxxx wrote:
Originally posted by xxxxxxxx
It didn't, here.
But I believe now that it was due to the fact that I was not doing the plotting inside the Draw method.
What is strange is that it occurred with the 512 limit. And since 512 is a power-of-two number, I considered that it could be in fact a preset limit.Ok, I understand now. The issue wasn't because of the spline but was related to the drawing done inside of GetVirtualObjects() instead of Draw().
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/10/2012 at 05:00, xxxxxxxx wrote:
Exactly.
But it is a pain to have to do all the drawing inside the Draw method. Sometime it is necessary to test out something elsewhere and, when the best way to check out the results is to draw something on the screen, this requires that the code has to be adjusted to perform the checking inside the Draw method