GSoC 2016 - Improvements to Bezier Curves

Hi everyone. I will be participating this year in GSoC, working on the project “Improvements to Bezier curves”.

I decided to create this thread in order to keep you posted about my progress, and also to answer your questions and hear your suggestions, in case you have any :slight_smile:

If you would like to know more about my project, you may read the proposal here:

https://wiki.blender.org/index.php/User:Genio84/gsoc2016/proposal

Congratulations; hope everything goes according to plan. Cheers.

Congratulations on getting into GSoC! I just looked at your proposal, and it sounds like you plan to add some useful improvements and features that Blender currently lacks. I’m really looking forward to hearing about your progress and in particular am really hoping that you can get the uniform uv calculation in!

Here are a few things I would like to see with regard to the bezier curves in Blender in no specific order of preference:

  1. The option to specify twist and taper as an amount and blend type (e.g. square, inverse square, linear, smooth) instead of only being able to use a control curve.
  2. Even subdivision option that makes sure that the curve has evenly spaced mesh subdivisions - maybe close to the uniform uv calculation work you plan to do?
  3. Subdivisions based on curvature option that subdivides tight curves more and long, gentle curves less.
  4. Edit mode function to extrude selected mesh feature (polygons, edges or vertices) along a curve for quick edits.
  5. A saveable option in the user preferences to hide the curve direction lines - the default makes curves look like centipedes! Otherwise a different way of rendering the direction (more obvious handle at the start for example).

I would like to see a better way to draw curve similar to illustrator pen tool point+click drag not place a curve like an object this is not correct.

Congratulations. Hopefully this will get into master. Working with curves in blender is so hard that whenever I can I use mesh instead. Will this GSOC handle curve twisting as well? I’d love to see something like in the image below addressed (a curve with bevel object just twists randomly)

.

Attachments


I’d just like to be able to select some verts/faces and select a curve tool “handle” - the potential curve tool having a range of curve options, from gradual to tight arcing curves, in like manner with the proportional editor. And by dragging the mouse, just like with proportional editor the affected verts deform to follow the curve.
What I don’t like- the hairy centipede “bezier thing” that sets of to the side and has a couple of handles.

Possibly better would be stroking out the curve with grease pencil

Already present in trunk, go into edit mode on the curve, hold shift and left click

I know your scope is already somewhat defined, but if you get time… a simplify curve function would be awesome, as well as an option for shrinkwrap to take the tilt amount from the face normal.

But… that being said good luck and look forward to what you bring to blender!

Drawing a bezier from zero, like in inkscape, with corners when you do not drag and some kind of constraints to x/y/z.

Thanks for all your messages guys! Although I am sure all your suggestions would all be great improvements, I am already constrained by my proposal, the time available, and my technical capabilities :slight_smile: When I asked for suggestions, I had intended to mean suggestions on my GSoC work, which currently is pretty much none, except for this patch. I invite you to have a look at it, if you’re interested.

I will post more things in this thread when I have them.

For me most important things are filleting and chamfering.

Best of luck for the project, this is obviously one that I am very interested in and will following closely.

For all the people asking for “curve drawing” or freehand stroking, Campbell Barton has been working on it recently from the Open Toonz project, see it in action in this video. It should be available in current daily builds

Simplify curves as been available in Blender as an addon at least since the 2.5-ish days. Just activate it in preferences

In fact, patch does not correspond to a crucial need.
Users have a simple workaround that consist to use an edited curve as Bevel Object.
It is not as precise and intuitive as a clean extrusion setting. So, patch is useful.
I just explain why users will be probably more excited by other parts of proposal.

I don’t really have much to say about the patch than what Campbell said.
It is not necessary to have so much settings.
With solidify modifier, blender users are used to negative value to reverse direction.
I don’t recommmend that. I just say that toggle is not necessary.

IMHO, extrude symmetricaly toggle does not make sense, too.
Initial request was to mimic fill mode that is working for bevel settings.
I don’t really see use case where a different fill mode is needed for bevel and extrusion.
I mean setting fill mode to Back or Front should be sufficient to indicate that user don’t want a symmetrical extrusion and what direction is desired.
For 2D Curve, an option to fill side in plane of curve would probably be welcomed.

For an extrusion using Half or Full mode, an offset in direction of extrusion would cover the rest of needs.

Your proposal is about a lot of curve tools. Will they be all submitted as patches or could we test a git branch ?

Hello,
please can you watch this session:

EDIT: the algorithm is discussed in the video at 13:20 and onward

The coder on that praject ALLREADY implemented a great new auto handles for beziers in blender. Those would be usefull not only for beziers in 3d view, but before all would be great for animation.

Currently, bezier handles when set to automatic, simply point towards neighbours(actually when there are 2 neighbours somewhere in the middle… which never works as wanted, so automatic handles are often useless if you are going for nice results, whether it be animation speed or trajectory…

see the linked image, left is current state, right what a user would probably expect from automatic handles…

Curves would also be more useful for some rigging things if they have a length parameter. Some useful calculations for drivers can be made with that info, and it’s currently a property that’s not inherent to a curve by default.

Other than that, would be nice to have separate scaling axes for control points on a bezier, the current implementation doesn’t allow for fixing bevel angles as scaling a control point makes it bulge out in thickness too. I think this should be optional though. And with two parameters, there could probably be some command or toggle to optimize bevels in a curve. (Basically something that evens out the width of a curve extrusion by adjusting scaling at the control points.)

it would be nice if there was a way to displace curves procedurally …
is it possible to somehow make the displace modifier available for curves?

or is there already a way to displace curves (make them wiggle based on noise etc.)?

Sounds great. The editing tools would certainly save a lot of trial and error.

If the improved extrude made it into trunk then I could use it in shared models without the end user needing the same add-on. Or maybe that already works. I’m not sure how to turn the DIFF file into an add-on in order to try it out. Currently I use curves with a solidify modifier to achieve the same thing, but it isn’t entirely reliable so the extrude function should be both simpler and more robust.

If I understand the texture proposal properly, then it should avoid this (see image below) without having to convert to mesh. Am I right? If so, great! Converting to meshes then going back to the original curve to make changes and then converting again is a right pain.

Attachments


Are you talking about the “Improved Bezier curve extrusion” patch? The DIFF is short for difference, it is a comparison between Blender original code and the new proposed code. It is not an addon nor do you use it directly, it meant to be applied to blender codebase and compiled before it can be used. If it ever makes it to trunk you won’t need any addons.

The extrusion patch should only affect geometry generation, not texturing workflow. The above problem is caused by using 2D mapped textures on 3D objects. You can already easily fix it by either using cube mapped textures, or if you are in Cycles you can additionally use a custom node setup to simulate cube mapped textures.

many times when you join curve objects you want to keep materials assigned, right now it just keeps active object materials and remove others… I know this can be tricky with compound paths -won’t work if curves have different materials- but current solution is not very clever either
maybe you can solve this, doesn’t seem that complex… good luck with your project!