Learn how to resample splines for consistent level of detail in 3ds Max.
- [Instructor] Last week we saw the optimized spline modifier and this week we'll look at a related modifier called normalized spline. It serves the function of giving an even spacing to the knots or an even length to each segment between the knots. That will make it a lot easier for us to edit this if we need to later. Currently, I've got it displayed in a see through mode in the object properties. And I've also got the knots enabled.
Let's select it, go to the modify panel and I've got an optimized spline modifier from last week, and I've got show knots turned on. With this optimized spline modifier in effect, we can see that the spacing between the knots is highly variable and that's a good demonstration for the normalized spline modifier. Let's add that, go into the modifier list and scroll down to normalize spline.
We see that it's kind of mangled our spline to start with, but let's play around with these parameters. Enable show knots so we can see those knots. The modifier has three modes here in the normalize by section. The default is segment length. We also have knot count, and insert. We'll take a look at them all, starting from the bottom. Let's go into insert mode. Insert is primarily for up sampling or increasing the level of detail of your spline.
The insert spinner has an integer value. As we increase that value, we will see more knots added to the spline and we can see the results here in the statistics. If I bring insert up to a value of five, we go from about 1500 knots on the optimized spline up to almost 9000 knots on this new normalized version. The max knots parameter here doesn't really have a direct relationship to the number of knots you'll get.
But basically, what it's going to do is call out the knots in straight areas. We won't see an effect unless we reduce that value. Let's bring the max knots down to 100, and now we can see that, in straight areas, the knots are not being created. That is normalize insert mode. Let's move on now to the knot count mode. Go in there and once again, we get too few knots to resolve our object.
We can increase the knots value here. Let's bring it up to 90 and if for each spline is enabled, then we will get 90 knots on each spline. If it's disabled, we'll get 90 knots total. Also, a little gotcha here, this max knots parameter sets a limit on the knot count. The knot count cannot be higher than max knots. If I bring max knots down to 50, that automatically brings the knot count down to 50.
And oddly, this is in effect even if the max knots checkbox is disabled. If I go back into the knot count and try to increase that to its maximum of 100, I will not be able to do so. I'll have to go back into max knots and set that to 100 and then I'll be able to bring knot count up to 100. That is knot count mode. My preference is actually segment length. I get best results from that. I'll go to segment length and with a high segment length default of 20, once again we're getting a low definition spline.
In segment length mode, the max knots behaves differently once again. It sets a global limit on the total number of knots you can have in the current object. If I bring this up to a value of 1500, and then reduce the segment length, we will start to see more knots appear. I'll bring segment length down to 10 and now I've got 250-something knots. I'll bring segment length down to five and now I've got 500 and something knots.
Keep bringing this down, let's bring it down to four. Three. Two. One. And if I bring it down below one to .5, I don't see any change. There's no need for me to have a segment length of less than one, if I have a max knots of 1500 because that's setting a limit. I'll set the segment length back up to one. There's a cool feature that you can use in either knot count or segment length mode, and that is retain knots within.
It preserves the position of knots within a certain distance threshold. If we enable that, we'll see the curve try to conform better to the original. The value here allows us to set the threshold and at its minimum of one, no knots will be preserved. They will all be moved around. Let's set the retain knots to within a value of 30 and now we see a pretty faithful reproduction of our optimized spline.
There's also a switch down here labeled retain tangents. It preserves the existing tangent angles. If you want to further smooth out kinks in the curve, then we can force 3ds Max to recalculate the tangent angles by disabling retain tangents. The effect of that is generally to soften up the curve or relax it. All right, let's see how this affected the final polygon object, because of course again, this is a renderable spline.
I'll click in the view port to get it focused and enable edged faces with the F4 keyboard shortcut. Select that spline object once again and we can see the results as we enable or disable the normalized spline modifier, especially in areas that are highly optimized here. When we enable normalized spline, we see the new segments and knots are added. And the normalized spline with more control points is going to be easier for us to edit when we need to go down to the sub-object level and manipulate these points directly, a normalized spline is going to be a lot easier to work with, much more predictable.
Let's disable see through mode for the selected spline object, right click in the quad menu, go to object properties, and disable see through, click OK. And once again, compare the normalized spline with the version before normalization. And the normalized spline has a consistent level of detail with polygons that are pretty much the same size everywhere. And because the spacing of the knots is much more even, it'll be easier for us to edit those.
Now I'm ready to make the changes that I need to at the sub-object level to clean up this spline. Before converting it to editable, I want to back up the object that I have. I'll make a duplicate of this one, go to edit, clone, and the new copy will not be a freehand spline, it'll be an editable spline. And I'll name it vines, the object type is copy, click OK. This new vines object is selected automatically.
The other one is still in the scenes, so we might want to hide that. We can go into the layer explorer and just hide freehand LO1. Vines is selected, just right click, and convert to, convert to editable spline. Now finally, we can go into vertex component or sub-object mode and start moving things around. Maybe go into wire frame F3 and select a knot or control vertex.
Grab the move tool with the W key and start making our adjustments. Okay, that's how to use a normalized spline modifier to even out the blanks of segments and the distances between knots, and make it easier to edit in sub-object mode.