Giter VIP home page Giter VIP logo

edgeflow's Introduction

EdgeFlow

This addon adds two operators to blender which both work on edgeloop selections.

Feel free to create issues, file requests etc. but be aware of that I might not find time to work on this as much as I'd probably need to.

Anyhow lets start with a brief overview:

Set edge flow:

Set_Flow_Demo

My stab at implementing a set flow operator for blender, which is a popular tool in 3ds max and maya. This adjusts the edgeloop via a spline interpolation such that it respects the flow of the surrounding geometry.

Set edge linear:

Set_Linear_Demo

This tool has two modes, the first makes each selected edge loop linear, the later works on edge rings and straightens them and adjusts each edge length.

A more indepth description of these tools can be found bellow.

Where are these located in blender?

Both can be accessed via the 'Mesh>Edges' menu, the viewport edge context menu (right-click in edge mode) or the edge menu Shortcut (Ctrl-E). The two commands should be there at the bottom. As mentioned both operate on edge selections - mostly edgeloops.

Installation

Master is now the 2.8 version! if you need the 2.7 version go to the blender_27 branch.

  • Get the latest EdgeFlow.zip release in: https://github.com/BenjaminSauder/EdgeFlow/releases
  • start Blender and open the user preferences
  • switch to the Add-ons tab and click the Install Add-on from file... button at the bottom
  • locate the downloaded EdgeFlow.zip file and double-click it
  • search for the addon "EdgeFlow"
  • activate the addon by ticking the checkbox (hit the Save User Settings button at the bottom if your blender is setup that way)

Set edge flow

This operator has three options to play with:

Tension:

Controls the strengh of offset

Iterations:

How often the operation will be repeated

Min Angle:

Cut off angle of the smoothing. Falls back to a linearely extrapolated position if the angle is beyond threshold.

In this example the control points for the spline smoothing are around the corner - which creates a nasty bulge. With the min angle one can force the alghorithm to find a better solution. MIn_Angle_Demo

How it works

Back when I first got to see this in action I did quite not understand how it all worked - so I thought i might be well worth adding a quick description to better understand how the underlaying mechanics work.

Shema

The tool goes over each edge from an edgeloop, and then goes over each vert for this edge. For every vert it searches the points C1-C4 which are used as 'control points' for the spline interpolation - quite similar to how every vector drawing programm works. So its all depending on the surrounding geometry - which also means if we have multiple neighbouring edgeloops they all influence each other once we start applying this smoothing. Doing the same operation a few times helps to balance it all out and converges quickly into something stable after a few iterations - so hence the need for such an option.

Set edge linear

As already mentioned this is basically two tools in one. The first case is if you just select regular edge loops. After running the operator each loop should be linear from start to end point. The spacing of all the other points can either be spaced evenly, or projected from the original distances.

Set_Linear_Demo2

The second case is if the selection consits only of single edges - most common in edge rings. Once applied it straightens the edges to the next connected vert and makes sure the distance is even everywhere. This is handy for tweaking control loops for SubD Modelling. Mostly inspired by an older 3ds maxscript from Christoph Kubisch: http://luxinia.de/index.php/ArtTools/3dsmax

Set_Linear_Demo3

Developer Notes

I had to reimplement the edge loop selection from blender because I needed to go from a spaghetti edge selection to sorted edgeloops. While I like that I was able to reproduce blenders selection behaviour I still think I might have overlooked something on how to do it with the regular api - any hints?

I tried different spline interpolation implementations but settled with a hermite interpolation from http://paulbourke.net/miscellaneous/interpolation/ as it has this nice tension variable.

edgeflow's People

Contributors

benjaminsauder avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.