All Projects → cwant → Wire_skin

cwant / Wire_skin

Licence: apache-2.0
Python software to construct a simple skin around a wire frame mesh in Blender

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Wire skin

Screencast Keys
Blender Add-on: Screencast Keys
Stars: ✭ 328 (+1212%)
Mutual labels:  blender
Machin3tools
MACHIN3tools is a free, continuously evolving collection of blender tools and pie menus in a single customizable package.
Stars: ✭ 447 (+1688%)
Mutual labels:  blender
Blender Osm
One click download and import of OpenStreetMap and terrain for Blender! Global coverage! Source code is in the branch 'release'.
Stars: ✭ 588 (+2252%)
Mutual labels:  blender
Mesh mesh align plus
Precisely align, move, and measure+match objects and mesh parts in your 3D scenes.
Stars: ✭ 350 (+1300%)
Mutual labels:  blender
Fake Bpy Module
Fake Blender Python API module collection for the code completion.
Stars: ✭ 426 (+1604%)
Mutual labels:  blender
Sort
Simple Open-source Ray Tracer
Stars: ✭ 485 (+1840%)
Mutual labels:  blender
Blender Addon Photogrammetry Importer
Addon to import different photogrammetry formats into Blender
Stars: ✭ 292 (+1068%)
Mutual labels:  blender
Building tools
Building generation addon for blender
Stars: ✭ 692 (+2668%)
Mutual labels:  blender
Bpy
blender python scripts
Stars: ✭ 441 (+1664%)
Mutual labels:  blender
Blender Power Sequencer
Add-on for video editing in Blender 3D: edit videos faster! Included in Blender 2.81+
Stars: ✭ 577 (+2208%)
Mutual labels:  blender
Blender Scripting
Introduction to blender scripting
Stars: ✭ 362 (+1348%)
Mutual labels:  blender
Magic Uv
Blender Add-on: Magic UV
Stars: ✭ 374 (+1396%)
Mutual labels:  blender
Fspy Blender
Official fSpy importer for Blender
Stars: ✭ 538 (+2052%)
Mutual labels:  blender
Malt
Render framework for NPR
Stars: ✭ 331 (+1224%)
Mutual labels:  blender
Blender
Mirror of the official Blender Git repository. Updated every hour.
Stars: ✭ 609 (+2336%)
Mutual labels:  blender
Export Paper Model From Blender
Python addon for creating paper models in Blender (development version)
Stars: ✭ 311 (+1144%)
Mutual labels:  blender
Tree Gen
Procedural generation of tree models in blender
Stars: ✭ 465 (+1760%)
Mutual labels:  blender
Mixer
Add-on for real-time collaboration in Blender (mirror only, please post your issues and merge requests at https://gitlab.com/ubisoft-animation-studio/mixer)
Stars: ✭ 718 (+2772%)
Mutual labels:  blender
Awesome Blender
🪐 A curated list of awesome Blender addons, tools, tutorials; and 3D resources for everyone.
Stars: ✭ 608 (+2332%)
Mutual labels:  blender
Upbge
UPBGE, the best integrated game engine in Blender
Stars: ✭ 567 (+2168%)
Mutual labels:  blender

wire_skin

A python script to construct a simple skin around a wire frame mesh in Blender.

+-----+     #=====#   (My ASCII art sucks,
|     |  => ||   ||    but you get the picture)
+-----+     #=====#

Non-ASCII version:

Screenshot

Installation

This software works with Blender 2.8 and earlier versions too.

Check out the repository and look in the demo directory.

This software may also be installed via pip:

python3 -m pip install wire_skin

or

pip3 install wire_skin

Motivation

Blender has a skin modifier that does great things for a lot of meshes. It doesn't seem to do the right thing for some of the sorts of meshes I want 3D printed (usually the caps where the vertices are have an asymmetry that is displeasing to me). The meshes I am trying to create are typically geometric cages for presenting other 3D objects.

This script is meant to address this for me. It certainly isn't a general purpose skinning script, and doesn't pretend to be -- it will likely fail if your input mesh doesn't match a use case similar to mine. I hope the script is useful to you, but really the Blender skin modifier should be more than adequate for most purposes.

Play around with the demo blend file before adapting the script (imported as a module) into your project.

That's great Chris, but how does it work?

We break the problem down into two parts: calculating "VertCaps" for each vertex in the input mesh, and joining the VertCaps using profile connectors.

Screenshot

Each VertCap can be decomposed further. The vertices that are needed to make a VertCap are comprised of a couple of "poles" that stradle either side of the concavity of the vertex, and some profile shapes (at this stage of development, rectangles) that go around each edge connected to the vertex.

Screenshot

Next, faces connect these vertices. These are broken into two groups: the faces (triangles) that connect the profiles to a pole, and strips of faces that run between the profiles that connect the pole (a triangle, a quad, and another triangle).

Screenshot

At this point, the VertCap is complete.

Quads connect the VertCaps together along edges, and this is pretty straight forward.

Okay, but how do I control this thing?

Well, take a look at the demo file. The WireSkin object generates a mesh when it's create_mesh() method is called. The object is initialized with a mesh as input, and a number of keyword arguments:

  • dist: distance between each vertex in the input mesh and the profile vertices described above.
  • width: the width of the rectangular profiles.
  • height: the height of the rectangular profiles.
  • outside_radius: the distance between a vertex in the base mesh and a outside pole vertex in a VertCap
  • inside_radius: the distance between a vertex in the base mesh and a inside pole vertex in a VertCap.

A couple of cryptic illustrations should make this clear:

Screenshot Screenshot

But wait, there's more! ...

  • crease: this sets the subsurf edge creases for edges that surround the holes in the output mesh. Set this to a float between 0.0 and 1.0 or None.

Screenshot Screenshot

  • displace: this float value moves each vert cap in the direction of the outside pole.

Screenshot w

  • proportional_scale: This is a boolean option. When this option is selected, the various length settings become proportions of the edge lengths near the vert cap:
    • pole measurements inside_radius and outside_radius are proportial to the average length of the incoming edges to a vertex;
    • profile measurements dist, width, and height are proportial to the edge that the profile is on.

Now how much would you pay? But wait:

  • edges_without_poles: This is a boolean option. When this option is selected, the vertices that are connected to two edges (basically a bisected edge) do not have a full VertCap on them -- just a profile is produced at the vertex, not poles. This allows the user some control of the curvature on edges without. Take a look at the demo file.

The demo file

The demo file (wire_skin_demo.blend) had five examples on layers 1 - 5. The script in the text window generates all of the examples (alt-P to run when your mouse is in the text window).

Layer 1

Just a cube-ish shape with some sharp corners:

Screenshot

Layer 2

An example using creasing:

Screenshot

Layer 3

A spikey thingy:

Screenshot

Layer 4

Using the same wire frame to generate a few intersecting objects with different parameters:

Screenshot

Layer 5

Generating multiple creased objects from the same wireframe, but using a boolean difference with the displace option to make some interesting shapes:

Screenshot

Layer 6

A honeycomb torus thingy:

Screenshot

Layer 7

A honeycomb torus thingy, but using the proportional scale option:

Screenshot

Layer 8

Demo of the "Edges without poles" feature:

Screenshot

3D Printing on Shapeways

I primarily use wire_skin to create objects for 3D printing (on Shapeways). I tag my models with the keyword wire_skin. If you also use Shapeways to print models made with wire_skin, feel free to use this tag -- I'd be very interested to see what you make!

https://www.shapeways.com/marketplace?q=wire_skin

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].