Hello all, I have created a draft proposal for curve improvements and would like feedback and additional ideas that I could look into implementing over the summer. This is my first experience with any kind of professional software development so I’m going to apologize in advance for any glaring errors.
Curve Improvements Proposal
Blender ID/Dev: cmitchell
The goal of this project is to add features to curves and to refactor the code to ease future development.
This project would provide an improved experience for both users and developers. For the users, there would be the addition of familiar polygon-based features(beveling, for example). There would also be added information that can help to influence design decisions, such as curve length. For developers, the current code would be refactored to improve readability and encourage future development.
- Curve length calculation
- Adaptive resolution
- Control point insert/splitting (similar to Alt+D behavior when modeling)
- Curve beveling
- Additional user documentation for new features
- Curve length calculation: The calculation at least will be done in an iterative manner. An analytic approach to arc length will be taken when possible. The method used may vary with each kind of curve. The information will be displayed in the properties panel with the location, rotation, scale, etc information. If an iterative method is used, then the option to increase or decrease the precision could be exposed.
- Adaptive Resolution: When converting to a mesh, an adaptive resolution option will be added to the pop-up menu. The purpose of this option is to preserve detail in locations with high curvature. The meaning of “high curvature” will be user-adjustable. Currently, the planned implementation is to determine the difference between the tangent of the previous point and the current location on the curve. A vertex will be placed once the difference reaches a variable threshold. In cases of curves containing both high amounts and low amounts of curvature, the decision of whether or not to place a vertex on a curve at a location can also be dependent on the length of curve traversed since the last vertex.
- Control point insert/splitting: When modeling using a mesh, Alt + D adds a vertex at the location of the currently selected vertex. This functionality will be extended to curve control points. The new control point will have the same tangent as the selected point. In the case of a control point being added from a control point with two adjacent control points, the new point will have the selected control point and one of the two adjacent ones as its adjacent points. Pressing the shift key prior to placing the new point will place it with the selected point and the other adjacent point as its adjacent points. This functionality is contrasted with extruding a control point with two adjacent points where two new control points are placed with one being locked to the cursor and the other, new point being added on top of the selected point.
- Curve beveling: The functionality of curve beveling is similar to the behavior of adding a new control point using Alt + D except the selected point’s tangent will be changed so there is a constant angle step from one adjacent point to another across the two interior points. The behavior would be similar to the bevel modifier used on meshes. The control points would not be affected. This feature will not be implemented as a modifier to avoid confusion with mesh beveling behavior. Instead it will be as a right-click menu option with adjustable parameters provided in a collapsible panel in the lower left corner of the viewport.
As currently planned, beveling would change the shape of the curve. If this is determined as undesirable, it would be implemented to allow for the shape of the curve pre-bevel to be preserved.
- Documentation and Extras: Throughout development, the accompanying documentation will be written alongside the code. I, likely naively, do not anticipate the features and changes to take the entirety of the allotted time so at the start of the summer I will put out a call for extra features/changes and upon completion of curve beveling I will begin to implement the requests, if possible. One possible idea I have seen online is enabling the shrinkwrap modifier for curves(https://blender.community/c/rightclickselect/fmhbbc/). Since this feature would require me to also become familiar with the modifier code, I am not sure if I would have time to implement it. This also seems to require mostly work with the modifier code so it is arguably outside of the scope of this project.
- Refactoring: As I get more comfortable with the codebase and get more experience with implementing features, I will start to refactor the current code. As of right now, I don’t have any concrete plans as to the changes I will make.
For June only, I will not be able to devote full time to this project, but in July/August I will be full time on this project. I will be able to work on the weekends and from late afternoon to evening during the week in June.
May 22-31: Become familiar with the current code
June 1- 14: Add curve length calculations
June 15-30: Implement adaptive resolution
July 1-22: Add curve beveling tool
July 23-August 16: Document changes and implement more user-requested features
I am an undergraduate Computer Science student at Louisiana Tech University. I also have minors in Math, Physics, and Electrical Engineering. I am experienced in C++, C, and Python. I have varying degrees of experience with Java, ML, Assembly, and Prolog.
Between school and work, I have not been able to commit much time to using or developing Blender. With that said, I have completed a few tutorials, including the infamous donut tutorial, and have watched many so I have observed different workflows. I have also periodically spent time reading Blender’s source code to learn how it starts, how it creates meshes, how the node system works, etc.
I enjoy learning about physics-based simulations and hardware acceleration. On my Github I have two projects that I work on when I have free time: a gravity simulator and a hardware-accelerated ray tracer implemented on an FPGA. Unfortunately, between school and work, I am not able to commit as much time as I would like to these projects. I am planning on reducing the amount of time spent working at the end of April to devote more time to learning the Blender codebase and working on my projects. I have been looking to get more experience in professional software development and believe completing this project is within my abilities.