• Stars
    star
    100
  • Rank 340,703 (Top 7 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Blender addon - Triangulate your textured mesh while discarding alpha zones

Tesselate texture plane

Blender addon - Tesselate texture plane

Download latest

Demo Youtube

/!\ IMPORTANT NOTES:

  • Running blender as admin might be needed at first activation to enable auto-installation of needed third party modules (tested on windows)
  • save before use ! Triangulating can crash with some images and/or settings (stable in "contour only" mode).

If it crash on your image, retry with different settings.

This addon need opencv and triangle modules At first activation, it will try to make an automatic download/installation of modules and their dependancies, if modules folder associated to your installation.
If this doesn't work, go below to manual install.

Want to support my work ? check those links


Description

Automatically tesselate a opaque zone of a texture plane mesh.
You can also just create the contour without tesselation.
The main purpose of the tesselation is to have a some vertices density in the mesh to be able to do "puppet" deformations with some rigging (similar to the puppet tool of After Effects).

Example:
With import image as plane addon, I imported this Ryu drawing image (found randomly on the web for test purpose). "contour only" option generate a mesh with stripped alpha,
otherwise it generate the same contour but fill it with internal triangles.

demo

And after some rig/skinning/animation...

paper ryu rig

...I got Paper ryu!

paper ryu idle

"Papeeer tatsumaki!"

paper ryu idle

Here is the anim pose with wire

paper ryu rig idle anim

Ryu drawing by steamboy (deviant art page), he made a superb animation with pretty much the same technique in after effect (combining multiple layers), see details here


Options detail

Contour only : No tesselation, just mesh the contour of the shape and fill with one Ngon face per separated "island" (stable, use only open-cv module).
Note : does not handle holes.

contour only

Simplify contour : 0=disabled, Approximation treshold of the contour polygon.
Higher value decimate the mesh contour shape.
Note: More simplification need also more pixel margin to avoid cutting though image.

simplify

Aeration : Limit maximum tri area, low value means more density (more triangles).

aeration

Pixel margin : 0=disabled, Dilate contour around shapes.

pix margin

Pixel cleaning : Delete surface with pixel dimensions smaller than given pixel size. (Do not use if your source is pixel art).
Usefull for cleaning unwanted rogues pixels, pushing too much can also erode surface angles.
In the example black part have alpha at 0 (smart test image isn't it ?)

pix clean

Minimum angle : 0=disabled, "quality mesh generation" value, augment the mimimum angle limitation.
The value is not given as an angle but as min/max available. Basically means more triangle with better repartition.
Note : This have a big influence on aeration ! Add more density variation (kind of like Dyntopo for sculpting).
It sizes triangles as needed (usually smaller on the mesh boundary) resulting in a better quality result.

min angle

External contour only : Discard holes or internal shapes, detect only external contour of shapes.

holes

Gift wrap : Close the convex hull of the shape

gift wrapping

UV mask : Generate geometry only on parts enclosed in the UV quad. If False the whole texture is meshed in 3D space.

uv limits

True Delaunay algo : Use another algorithm for delaunay triangulation, conforming delaunay instead of constrained delaunay Triangle module settings. Results isn't so different, but this algorithm make sure voronoï cells are at center of each triangles (can force generation of super tiny tris by complying to this rule).

Additional notes

  • If there is any uv_project modifier in stack, those will be applied automatically before running
  • Any subdivision modifiers will be deleted before applying.

Where ?

Panel in sidebar : 3D view > sidebar 'N' > Tool > Tex plane tesselation

Credits

The addon is heavily inspired by the original Tesselate addon within the rigging scripts released by "les fée spéciales" studio.

Here are the main differences:

  • Compatible with Blender 2.8+/3.0+
  • use Opencv module instead of Scikit+Skyimage (still use Triangle for tesselation)
  • better handling of holes when there are nested shapes (might still not be perfect though).
  • expose a lot of options for tweaking (This also makes it a lot less stable...).
  • Support (slightly) deformed UVs

Manual installation of needed module

This addons use two python modules to work. You have to install triangulate and opencv.
Be sure to download a version compatible with Blender 2.80's python 3.7. This means you ought to have the same python version installed and use pip install through this version. If you don't know how to do that look at "how to install module for specific python version".

If you install through pip with pip install opencv-python and pip install triangle.
You should see the folders of the modules in the python installation directory.
In <python_version>/lib/sites-packages.
Now copy opencv and triangle to the Blender module folder. If you don't know we're your Blender modules folders are, look at "Were are the scripts folder in Blender". (Or video "addons and script installation in Blender", version quick or long).

Opencv should have install some library dependency that you can see listed in console at pip install (make sure to copy them as well)

About module installation :
If triangle doesn't install properly with pip, follow this tutorial on module installation by Damien Picard.


Todo:

  • stability : Sometimes crash blender:
    • exception happen inside Triangle module when PSLG polygon is passed with certains settings or images, dont know how to fix it...

Changelog

2.0.2

  • added: print debug step documentation when enabling the addon with problem with modules.

2.0.1

  • ui: Always show panel, display help text when no object is selected

2.0.0

  • fix: compatible with blender 2.93 / 3.0.0 +
  • fix: improved module auto-install

1.1.0

  • modules auto-install using pip (tested only on windows)
  • UI: redo panel is now the same as sidebar UI
  • Exposed disply wireframe in the UI
  • Added tracker URL infos

1.0.2

  • Main version ready:
    • cv2 contour stable
    • some images/settings can still crash blender in tesselation (using triangle module)

More Repositories

1

viewport_timeline_scrub

Blender addon - Scrub timeline from viewport with a shortcut
Python
45
star
2

SB_auto-blueprint

Blender Addon - Create a blueprint of the selected object in one click
Python
42
star
3

GP_brush_fill

Blender addon - Grease pencil brush that act like a 2D pixel brush/eraser for fill material
Python
32
star
4

snippetsLibrary

Blender addon - personnal snippets library in text editor
Python
31
star
5

curveRig

Blender addon - Rig active curve to a new armature (or armature in selection) with bones envelopes on curve points and handlers
Python
29
star
6

Box_deform

Blender addon - Deforming box for grease pencil drawing
Python
27
star
7

greasepencil-addon

Blender addon - Pack of extended tool for Grease pencil
Python
25
star
8

autoMaterial

Blender addon - automate stuff to handle materials
Python
23
star
9

devTools

Blender addon - add developpement tools to blender text editor
Python
21
star
10

SB_1234Select

Blender Addon - Quick switch for selection mode
Python
17
star
11

rotate_canvas

Blender addon - Canvas rotation shortcut for free view and camera view
Python
17
star
12

GP_lock_frame

Blender addon - lock frame and view rotation
Python
14
star
13

SB_images_to_video

Blender Addon - Create a video from images sequence in one click
Python
13
star
14

GP_refine_strokes

Blender addon - Grease pencil options to refine strokes
Python
13
star
15

GP_magnet_strokes

Blender addon - Magnet Grease pencil fill strokes to lines on other layers
Python
13
star
16

TapTapSwap

Blender addon - Keymap shortcuts to swap some areas of blender
Python
13
star
17

reference_to_image_plane

Blender addon - convert empty image reference to image plane
Python
13
star
18

real_scale_references

Blender addon - Link references models at real world scale
Python
12
star
19

GP_clipboard

Blender Addon - Grease pencil clipboard to copy/cut/paste strokes in place across layers and blends (world space copy/paste)
Python
12
star
20

How_to_install_Blender_addons

How to install Blender addons - the complete guide
11
star
21

sound_waveform_display

blender addon - Display audio waveform in dopesheets, graph, timeline
Python
10
star
22

storytools

Blender addon - Set of tool for storyboarding in Blender
Python
10
star
23

Apply_Shapekeyed_Modifiers

Blender addon - allow to apply modifiers even if there is shapekey on the mesh
Python
8
star
24

MyKeyMouse

Blender keymapper addon - Map shortcuts on mouse button 4 and 5
Python
8
star
25

SB_path_actions

Blender Addon - open output path or blend file location in OS explorer
Python
7
star
26

SB_ground_objects

Blender addon - Ground objects to grid floor
Python
6
star
27

SB_ActiveSwap

Blender addon - add shortcut to swap active object in selection
Python
6
star
28

renderLayerFolders

Blender addon - generate composite nodes to export render layers separately
Python
5
star
29

quick_rename_menu

Blender addon - alt+N bring a popup to quickly rename active object
Python
5
star
30

BoneUtils

Blender Addon - Various tool to rigging purpose
Python
4
star
31

template_multifile_addon

Blender template for splitted multifile addon
Python
4
star
32

SB_addon_manager

blender addon to dowload other ones from SB (aka pullusb)
Python
4
star
33

edit_manager

Blender addon - Some helper when using a sequencer as Edit with multiple scenes
Python
4
star
34

breakdowner

Blender addon - Breakdown in object mode
Python
4
star
35

samutility

Blender addon - Complementary tools and operators
Python
3
star
36

selectByCamFrame

Blender addon - Select objects according to camera frame
Python
3
star
37

scene_settings

Blender addon - Save, load and compare scene parameters
Python
3
star
38

GP_onion_peel

Blender addon - Custom onion skinning for blender grease pencil
Python
3
star
39

reloadUI

Blender Addon - Reload file with your own UI
Python
3
star
40

Auto-cursor

Blender Addon (2.79) - Make 3D cursor follow parented object/bone of active Grease Pencil layer
Python
2
star
41

Quick_render

Blender addon - render and write file without setup
Python
2
star
42

SkinParent

Blender addon - Skin parent (fully weighted vertex group) the selected objects to a bone
Python
2
star
43

images_repo

Stock of images other repo's readme
2
star
44

AHKscript---universal-media-hotkeys-script

Use AutoHotKey to bind hotkeys for media control play-next-prev etc
AutoHotkey
1
star
45

MatNameFromColor

Blender addon - Rename marterial by its closest english name color
Python
1
star
46

quick_selection_set

Blender addon - Quick selection set shortcut for armature pose bones
Python
1
star
47

bgrender

blender background rendering script
Python
1
star