Straight Skeleton: Insets, Isoline Slices and Roof Models form Polygons

Thanks for all the feedback. I fixed some cases (quad with an additional vertex) but many are still unsolved (especially the + / x shape). Anyway, I have some new test polygons now and can fix them when I find the time to do so.


This is one of those algorithms that is reasonably straightforward as long as all the vertices are in “general position”, and gets very special-case-y and hard when they are not. As I discovered implementing my similar addons.

Yes that is true. It is a very discrete algorithm and thus unforgiving when it comes to imprecise calculations. These effects are amplified by “too perfect” inputs like parallel lines or perfectly symmetrical shapes.

Is there anway to have inset goodway as it go inside. And is there any option like loop to have the count how many loops to added. Same here how many inset i should go inside. Mean time i have to select face all the time search (f3) straight skeleton and adjust the offset. Any other way. Thanks for the addon
inset.blend (712.0 KB)

1 Like

Not sure if I understand correctly, but after you apply the “Inset Polygon” operator you get an options panel with two parameters. The second parameter is the count of loops.

Also, while the operator is still active, you can use the mouse wheel to add more loops like in the loop cut tool.

Does that answer your question?

What is the latest version of Blender that this addon currently works with? This information was not stated. I tried in 2.90 and couldn’t adjust any parameters. The generation stopped right after executing command.
EDIT: Same weird result in Blender 2.83. How do you change parameters? Shall Blender pop an extra floating window, like the “adjust operation” kinda ones?

Are there plans to support more polygons at a time?
Also, I have an idea for something like straight skeleton offset! Currently, we can only inset faces, while offset would be very helpful for modelling things like river banks :smiley:

It should work with Blender 2.80 to 2.83

Which operator did you try? Some require mouse input and a left click for confirmation (similar to the loop cut tool) the floating operation window comes after.

Multi polygon, holes and separate lines are not supported and I have no plans to implement them soon. But the algorithm is in theory able to do so, someone could implement these.

I used:
Mesh: Straight Skeleton. I meant to inset a polygon, not create isolines.
I tested it with a relatively simple n-gon face in Blender 2.83. It made me the “full” coverage available, without possibility to adjust parameters. No floating window appeared.
I noticed that it creates the skeleton as a new object and jumps to object mode. Is this the expected behaviour?
Here you can see the screenshot of how it looks right after command execution. No extra clicks were made.

Btw. do you plan to make a version for Blender 2.9 too?
Btw. 2. I could make some cool dunes with this :smiley:

Yes it is expected behavior, the “Straight Skeleton” operator has no options.
You probably want to use the “Inset Polygon” operator instead.

About 2.90: Yes I will port it sometime, the API should not have changed that much, it just needs a menu because the option of having operators only accessible by search is gone.

Man, I am so dumb.
Thank you for your help.

I think there’s a bug.
Blender 2.83.9 has crashed when I tried to inset a certain polygon.
When I do straight skeleton it produces weird results. Also random, because it’s different every time.
Perhaps my face is ill-formed, but I don’t think so.

inset polygon.blend (701.9 KB)

Sadly, this is a know issue. Simply numerical instability in the arithmetic.
I am not exactly sure what the best way to fix it is.

Edit: I could expose some of the tolerance values as tunable parameters / options.

Hey, I am trying to understand how to use the add-on:

1: To create the roof:
Select a single face and go to menu->add->Straight Skeleton.

2: Slice Mesh [generate isoline]:
What to click ? What mode to be in ?

I don’t know what it means but if it’s a potential way of fixing this bug, it will be awesome!

1 Like

Thanks for the addon, I tested on couple letters and it fails sometimes.