Blender Stitch Generator Addon
Installing Addon
To Install this addon, follow these steps.
- Download the addon zip file
- Open Blender 3.6 or newer
- Go to Edit>Preferences
- On the left, select Add-ons
- Click Install…
- Select the downloaded zip file
- Click the empty check box next to the newly installed addon
Adding Stitches to Your Mesh
To add Stitches to a mesh.
- On the right side of the 3D View, open the side panel (Hotkey: “N” while mouse is in 3D View)
- Select the panel labeled “WJorkman3D”(“Stitch Tools” if using versions prior to 2.1) and open the “Stitch Tools” panel if it is closed.
- Adjust the “Scale All” setting to ensure it matches your scene, This will adjust the scaling of all assets to fit larger or smaller scenes. For example, if set to 1, stitch length will be in mm, while 100 will be Meters. Default is set to 10 to be close to default scene size. If this number is too low it can cause scene crashes when trying to add stitches, too high and stitches may not be small enough to fit the curve.
- (Optional): Adjust any default settings as desired in advance by opening each subpanel.
- Click “Add Stitches to Mesh”. This will create an empty curve, add the needed assets to the curve, link the selected mesh to the assets, and set the curve into edit mode. No stitches will be visible yet.
- While still in edit mode, add vertices using the Curve Pen tool, or draw a curve on the surface using the Draw tool. Both tools are on the left side of the 3D View, if not visible open the tool panel(Hotkey: “T” while mouse is in 3D View). Draw tool should be set to “Surface” mode for best results.
- Exit edit mode(Hotkey: “Tab” while mouse is in 3D View) when finished making/adjusting curve. Re-enter edit mode on a curve to adjust the curve as needed later.
Selected vs Default Settings
When a stitch curve is the active object, settings in the panel will directly affect that curve, and the panel will say “ACTIVE” under Stitch Properties. When the active object is not a stitch curve, or there is no active object the panel will control the Default setting and will say “DEFAULTS” under Stitch Properties(note, active object is not the same as selected objects. Deselecting a curve will still keep it active until you make another object active).
When adding stitches to a selected mesh, the settings of the new stitch curve will be the same as the current default settings. Additionally, with an active stitch curve, use the “Set as Defaults” button to store the currently active stitch curve settings as the new default settings. This will allow you to make more stitches with the same or similar properties easily.
Stitch Controls
This is a list of controls, separated by sub-panel. If a control only appears under certain conditions, conditions will be listed in parentheses.
- Scale All: Affects scaling of all elements to better match the scene. Too small may cause crashes, too large may cause stitches to not be visible.
-
Thread Details
- Thread Color: Adjusts the color of the threads.
- Thread Rough(V2.1+): Adjusts roughness of threads.
- Thread Metal(V2.1+): Adjusts Metallicness of threads.
- Thread Length(not ZigZag Stitches): Adjusts length of each stitch.
- Length Random(not ZigZag Stitches): Adds randomness to the length of each stitch. 0 = no random, 1 = completely random(from no length to 2x length).
- Thread Width: Adjusts width of each thread.
- Thread Resolution: Adds or lowers polygon count of threads. Lower = better performance, higher = better visuals.
- Strands per Thread: Adds or lowers the number of physical strands for each stitch.
- Thread Twist: Adjusts how twisted the strands are. 0 = no twist, has no impact if Strands per Thread is set to 1.
-
Stitch Style
- Stitch Type: Selects type of stitch. 0 = Single, 1 = Double, 2 = Cross, 3 = ZigZag(V2.1+ only).
- Double Offset(Double Stitch): Adjusts distance between parallel sets of stitches.
- Cross Factor(Cross Stitch): Adjusts shape of Cross stitches. .5 = perpendicular to each other, 0/1 = closer to parallel.
- ZigZag Width(V2.1+, ZigZag Stitches): Adjusts width of ZigZag stitches.
- Loose Strands: Tightens or relaxes each strand of the thread. 0 = tight, 1 = loose. Has no impact if Strands per Thread is set to 1.
- Stitch Rotation(not ZigZag Stitches): Rotates all stitches.
- Rotation Random(not ZigZag Stitches): Randomizes rotation of each stitch. 0 = no random, 1 = completely random.
- Stitch Bump: Adjusts how far the middle of the thread pulls from the mesh. 0 = Flat to surface, 1 = Thread pulls out far from surface.
- Distance Between Stitches: Adjusts distance between center of each stitch. (For ZigZag Stitches(V2.1+): Adjusts length of zigzag, peak to peak).
-
Shadow Details
- Shadow Color(V2.1+): Adjusts color of shading effects(Holes/Seam). Default = Black(0, 0, 0). Select color similar to mesh to reduce shadows while maintaining bump effects.
- Shadow Rough(V2.1+): Adjust roughness of shading effects(Holes/Seam). Select a value similar to mesh roughness for a more realistic effect.
- Shadow Metal(V2.1+): Adjust Metallicness of shading effects(Holes/Seam). Select a value similar to mesh metallicness for a more realistic effect.
- Hole Intensity: Intensity of Hole Shading effects. 0 = No shading effect(Geometry removed to improve scene performance).
- Hole Scale: Adjusts scale of Hole effects. Has no impact if Hole Intensity is set to 0.
- Seam Intensity: Intensity of Seam Shading effects. 0 = No shading effect(Geometry removed to improve scene performance).
- Seam Scale: Adjusts scale of Seam effects. Has no impact if Hole Intensity is set to 0.
- Seam/Hole Offset: Offsets shading effects(Holes/Seam) from the mesh surface. Increase number if shading effects are clipping with mesh surface(alternately, can increase resolution of mesh to reduce clipping).
Linked Assets(V2.1+)
Starting with version 2.1 and later, tool assets are imported using a link method instead of an append method. This will allow future add-on updates to apply to previous scenes made in 2.1 or newer. For future updates, updating the addon will cause all scenes made in 2.1+ to use the updated add-on toolset after restarting Blender. While this will make updating the tools easier, it does come with a drawback. Opening a scene with linked assets without the addon installed will not have stitches, and saving the scene in that state could permanently delete the stitches.
As a failsafe for this issue, I have added a “Make All Linked Assets Local” button. This will remove the links of all scene assets to outside files, making them permanently part of the current blender file. Note: This will also affect all linked assets, not just those from this addon, take caution if you use other linked assets in your scene. If needed, look up how to manually unlink assets, all assets linked are node groups.
Once assets are no longer linked, the file can still use the addon to add and adjust stitches as before, but will not update to newer versions of the tools. This will also allow the stitches to be visible when opened without the addon installed, though the panel cannot be used to add and adjust stitches without the addon installed. I recommend saving the file as a copy after unlinking, so both the linked version and unlinked version are available.
Any scene that had 2.0 or older stitch assets will not update to 2.1 or later automatically. These scenes will require manually deleting all imported assets and re-importing the 2.1+ assets.
Updating the Addon
Below is a guide to updating the addon, with separate sections for pre and post 2.1. Currently, 2.1 is the latest version and cannot be updated further.
-
Updating the addon.
- Under Edit>Preferences>Add-ons. Search for Stitch Generator.
- Open the addon box, and click the “Remove” Button. This will remove the addon from your computer.
- Download the updated zip file.
- In the same menu, choose install, select the new zip file, and click the checkbox to enable the addon.
- Close and reopen Blender
-
Manually updating a scene from 2.0 to 2.1+(Warning: Very involved and will result in some loss. If done incorrectly, can accidentally delete other scene assets). Note: opening a 2.0 scene with 2.1 installed is ok, and will work similarly to it did under 2.0. New controls and stitch types will not be available, but other functions remain.
- Open a scene made in 2.0.
- Optional: Select an existing stitch and set its properties as the default.
- In the Outliner, change from “View Layer” to “Blender File”.
- In “Node Groups”, delete the 14 node group objects. If you have more than 14 node groups, you have other node groups in your scene, and I do not recommend trying to update from 2.0 to 2.1+ assets(Scene will still work like it did in 2.0, but will not have the new stitch type and controls)
- Switch back to “View Layer”
- Select the mesh, and click “Add Stitches to Mesh”.
- Exit edit mode without drawing the new curve(Hotkey: Tab while mouse is in 3D View).
- Select a previous stitch curve, and the new stitch curve, in that order.(In the outliner, the old curve will be dark orange, while the curve you just created will be light orange)
- Join the curves(Hotkey: CTRL+J while in the 3D View). If you previously set the defaults in 2.2, the new stitch will have those properties set.(Note: Only one stitch can be “backed up” in this way.