JacquesLucke / animation_nodes

Node based visual scripting system designed for motion graphics in Blender.
Other
2.29k stars 342 forks source link

proposal: integrate Smooth Bezier Spline into Spline from points & Splines from edges. #1356

Closed Gerstmann-Bradley closed 4 years ago

Gerstmann-Bradley commented 4 years ago

Nearly 100% of time I need these nodes connecting in series. It will save some time to speed up the workflow if Smooth Bezier Spline can be integrated into these nodes (Note, I want to keep the Smooth Bezier Spline node in case it needs to be used for costume spline) Another thing is that even if people don't wish to smooth Bezier Spline, it's simple just to put smooth value down to 0. Currently I have made a preset to achieve what I want, but it may be better if this idea can be shared to all AN-users? What do you think? preset

OmarEmaraDev commented 4 years ago

I don't think this is something we will consider. The Smooth Spline node alters the handles of the spline, so adding it to the Spline From Points node would mean the input handles will be overwritten, so effectively impossible to set. For instance, if we set the smoothness to zero by default, like you propose, the handles will be equal to the points, which is undesirable.

Does that make sense?

Gerstmann-Bradley commented 4 years ago

I don't think this is something we will consider. The Smooth Spline node alters the handles of the spline, so adding it to the Spline From Points node would mean the input handles will be overwritten, so effectively impossible to set. For instance, if we set the smoothness to zero by default, like you propose, the handles will be equal to the points, which is undesirable.

Does that make sense?

I see, I didn't realize the issue of setting the smoothness to 0 before. (BTW I actually wish to keep smoothness to 0.33, because it's so frequently used imo that I wish to save a node each time to form a spline) In response to that issue, I can come up with a "switch" node to bypass this issue in the subprogram. If the smoothness is 0, then not to use smooth Beizier spline node; Or if the smoothness is not 0, then use that node. I think this is a legitimate way? If this is something can be done with the subprogram, then it should be possible with coding as well? (I am not a technician so I have no idea.) The entire proposal is based on the fact that personally speaking, spline formation is generally accompanied with the smoothness. Otherwise the spline will look very jaggy unless adding points in between. Even saving one node from the gigantic tree will improve the maintenance and speed up the workflow.

If you still disagree then I will close this issue.

OmarEmaraDev commented 4 years ago

If the smoothness is 0, then not to use smooth Beizier spline node; Or if the smoothness is not 0, then use that node.

This does not seem legitimate, because a smoothness of zero actually does smoothing, that is, setting the handles lengths to zero. So we can't use this logic unfortunately. What we can do is use the Is Used property of the socket to enable or disable smoothness. But I still wouldn't support this proposal.

Gerstmann-Bradley commented 4 years ago

If the smoothness is 0, then not to use smooth Beizier spline node; Or if the smoothness is not 0, then use that node.

This does not seem legitimate, because a smoothness of zero actually does smoothing, that is, setting the handles lengths to zero. So we can't use this logic unfortunately. What we can do is use the Is Used property of the socket to enable or disable smoothness. But I still wouldn't support this proposal.

Oh, my idea was talking about following. smooth value is a boolean input. if value is not 0 it will output true, then it will use "smooth Bezier spline node" in the subprogram, otherwise it will be bypassed completely. In that case it won't be smoothed right? smooth

OmarEmaraDev commented 4 years ago

Zero smoothness is not the same as no smoothness. Zero smoothness actually do something, as I mentioned before.