Page MenuHome

Curve: increase max of order u/v
ClosedPublic

Authored by RedMser (RedMser) on Jan 25 2022, 4:21 PM.

Details

Summary

Curve: increase max of order u/v

Uses soft and hard max of the resolution properties.


Range for order u/v was 2-6, but after testing higher max values with NURB splines and surfaces with many control points, no problems were found.
Now uses soft and hard max values of the resolution properties.

Diff Detail

Repository
rB Blender
Branch
curve-order-max (branched from master)
Build Status
Buildable 20164
Build 20164: arc lint + arc unit

Event Timeline

RedMser (RedMser) requested review of this revision.Jan 25 2022, 4:21 PM
RedMser (RedMser) created this revision.

Did you test the performance? I see that being a big problem with large values for this property. Especially for CurveEval which makes a cache of weights for each of all evaluated point's source points.

Also, could you describe the benefits of removing this limit?

Did you test the performance? I see that being a big problem with large values for this property. Especially for CurveEval which makes a cache of weights for each of all evaluated point's source points.

I did some rudimentary testing. Moving a point in a single NURBS spline with 300 points (in Edit Mode) runs at 60 fps between order 2 and 16, after that fps drops pretty rapidly (see the graph below).
As expected, fps stays at constant 60 when not moving anything around.


Would be totally fine to change the property ranges so the previous 2-6 range is now just a soft limit, and something like 2-64 is the hard limit. Though IMO there's worse offenders in terms of tanking performance (like voxel remesh quality, which can use up all available RAM, and doesn't even soft-limit this).

Also, could you describe the benefits of removing this limit?

I discovered the limit during my work on D13919 and was not sure why it existed - removing it does not seem to break anything.
As an artist, I enjoy being able to mess with sliders and see their visual result, so it feels weird to limit the user's freedom here.

2-64 as hard limits with 2-6 as soft limits makes sense to me, given this information.

I would suggest tweaking the description a bit to reflect this:
"NURBS order in the U direction. Higher values make each point influence a greater area, but have worse performance"
The (for splines and surfaces) part is useless in the current tooltip.

Actually, I remember @Laurynas Duburas (laurynas) was working in this area recently with D13891. Laurynas, could you provide some input here?

@Piotr Makal (pmakal), you might also be interested, and your input is appreciated :)

2-64 as hard limits with 2-6 as soft limits makes sense to me, given this information.

Agree, accepting, no need for additional review for adjusting the range.

This revision is now accepted and ready to land.Feb 4 2022, 12:28 AM

Update hard limit to 2-6 and soft limit to 2-64

RedMser (RedMser) updated this revision to Diff 47957.EditedFeb 4 2022, 1:58 PM

Forgot the tooltip changes, here they are

Should be clear that order_v is for surfaces only, since the UI only shows it where relevant anyway...