[Closed] Simple Mod memory issue
You are da man
Of course, the only other thing I forgot to mention was a radiobutton set for the primary axis. Should just be a simple case of swapping the sin/cos x,y,z around, but I understand if you have more pressing things to think about!
Feel free to nab the functions in the curve control ms I published before.
Thanks again, you really have rescued me from the depths of disappointment!
Cheers,
Dave
Hi.
I’ve done some of the modifications you’ve mentioned.
Now there’s no limit in the Y axis (which now defines the angle), the X axis ranges from 0 to 100 and I’ve added the radio buttons to choose the rotation axis.
So the next thing should be set the curve X axis range to [0, length_of_the_spline]. The problem then is that the modifier happens to be too specific. A button to attach a spline would be needed so any time the length of the spline changes, the X range would be updated automatically. Another option would be adding custom controls in the curve editor like “take length from spline” or the tangent controls you mentioned.
But I have to take a look at that because creating a custom curve editor in C++ is different from MAXScript.
Anyway hope that helps!.
PS: obviously scenes with the previous version won’t work properly so you’ll have to reassign the modifier.
Hi Jonathon,
What can I say? Thank you very much!! The difference that this will make on this project is absolutely massive. I thought I had wasted 2 days on a lame duck, but it appears that with your help it looks like I will be able to snatch victory from the jaws of defeat!
I do hope that you found it a good learning experience as you hoped. I certainly enjoyed what has now turned out to be “prototyping” it!
I’ll check it out in the scenes I’m modeling and get back to you. It’s so nice to have it working quickly! It really makes it really easy to assess what works, both from a plugin point of view, and from a scene point of view.
From a quick look I would agree with you that changing the spline length interpretation may be a tricky one. The tangent tools would certainly be worthwhile; I found them so even with the prototype that it was a intuitive way to edit the curve quickly.
At some point I have to make the leap to C++. Hopefully my friend will give me some tuition on making the leap. And there’s also the wealth of talent here in the forum to support my endeavours.
My best regards for now!
Dave
Hi.
I’ve implemented all the features you’ve got in the script.
I wasn’t able to create custom controls inside the actual window of the curve editor so I’ve created an additional dialog box and I’ve attached to the editor window:
So every time you move or resize the curve editor window, the dialog box will be moved/resized in consequence.
There’s one thing though. I’ve not implemented scrolling yet so if you resize down the curve editor window past the dialog box width, you won’t be able to see the cut parts of the dialog box. The only way is to resize the curve editor window again so the entire dialog box can be seen.
The first thing I’ll try to fix this, is create a rollout page so you can use the standard scrolling method in MAX. But I don’t know if it’s possible to scroll horizontally. The other obvious way is creating standard scrolling bars.
Here’s the TODO list:
[ul]
[li]Implement scrolling for the curve tools dialog box.
[/li][li]Fix a problem with auto-zoom when the curve editor window is maximized.
[/li][li]Fix a problem with auto-zoom when the curve editor window is restored.
[/li][li]I’ve set the minimun length for the tangents to 1.0 because otherwise occurred unexpected results, maybe due to a division by zero (I have to check this with more time).
[/li][li]Right now seems like you can’t specify the lengths for the in/out tangent (for bezier-corner points) at the same time when the “Lock” checkbox is checked. I have to fix it!
[/li][/ul]
I think the plugin is totally functional now but obviously it’s not tested enough so could exists more bugs!.
Greets.
Hi Jonathon,
Wow! Amazing stuff. Brilliant. Fantastic. I’m loving it!
I’ll take a look and get back to you with some thoughts and feedback.
In the meantime, take care!
Dave
Hi Jonathon,
OK – generally, the modifier is flawless. It works great on high-face count models (I haven’t tested on pollies) apart from the odd crash when clicking “Edit Profile”, but my max crashes so much anyway that it’s indistinguishable.
Regarding the UI, a couple of things are different to the prototype:
1 – Align First / Last.
These should align the selection to the first or last point in the selection, rather than the whole curve. This makes it useful to line up flat bits of the profile accurately
2 – Flatten
This appears to convert the end points to corners, rather than flattened bezier corners.
One thing I have been thinking is how to get a better feel for where the twist is happening on the geometry. As you know, I’m ultimately deforming the geometry along a path, and it can be quite difficult to assess exactly where twists shoud start and end. I’ve been using an animated helper to show me exactly where the twist point I’m editing will be:
For example, I decide to twist my mesh at a certain point along the spline; its at the apex of a rollercoaster loop. I set my helper’s position along the path to co-incide with this, and it happens to be 42% along the path. Thus, I know that point on the Edit Profile graph should be at 43 on the X axis, and I can intuitively edit the curve!
A wish-list item might be that if you picked a point in the Edit Profile curve, some kind of viewport feedback (a marker / some text, for instance) would highligh the point visually. As you dragged the point, the viewport marker might update.
I originally played with manipulators to get the twist’s deforms, but dropped them in favour of the curve. An interesting idea though!
Thank you so much for your help on this.
The project (a TV promo for Jetix) is looking really good so far. I have yet to track some 2D characters to the coaster cars, but I couldn’t have come this far without the power of C++ and your generosity!
Immage attached; much obliged,
Dave
Hmmm I don’t know if we are talking about the same thing but I’ve just discovered that if you press the “Edit profile” button when the window is already opened, MAX crash. I’ve solved that with this new release.
Yeah, I missed that. I think it works now.
Yes, that would be great. But I think for this we need to specify a spline to calculate the position of the point we are working on. It’s is something similar to the problem we were talking earlier about using real world units for the X axis.
I say that because we can calculate the position in the local space of the modifier but what we want is the final position in world space (imagine we have a bend modifier after the twist), and for this we need to evaluate the stack of modifiers for this point. The problem is that I don’t know if that’s possible.
I’ll take a look at that, though.
Nice!. I am glad this is working for you.