Stylized ToolKit: Create
Lines, Color, Bake and Simplify, and Normal Map
Addon tools for Blender
Overview

Info

The following tools are included: STK Lines, STK Color, STK Bake and Simplify, and STK Normal Map. This is a workflow and style toolset for comic, cartoon, hand painted and other artistic, retro and non-photoreal styles.

STK Lines provides tools for creating 3D geometry line work suitable for comic or cartoon line work that must appear to be 2D from the camera's point of view.

The addon adjusts the width of the lines relative to the depth of the object in relation to a camera, relative to the distance of the closest point on the object to the camera, and also to the camera's focal length. The algos used are the work of custom data collection, data analysis and algo creation used to discern what it takes to get the most consistent line width possible at any distance from the camera up to around 7 - 8 kilometers or Blender units.

STK Lines has a binding system that allows curves made with this add-on to be bound to a mesh. Once the mesh is moved or deformed, the curves can be re-contorted to the mesh with one click. There is a snapshot feature that captures perspective and deformation states. They can be recalled, updated and converted into shapekeys.

The binding workflow and 3D as 2D effects are "per click" operations, so this workflow is appropriate for static environments and objects. The snapshots feature was used to create the animations played on this documentation site.

STK Color is a cell shader baking and texture layer system. The diffuse, emission and transparency channels are handled. Layers can be masked and colorized. Layers can either be for displaying images and painting on them, or they can function as adjustment layers.

The STK Bake panel is for creating diffuse, ambient occlusion, depth, edge and texture bakes. STK Simplify converts surface materials made with this addon into simplified materials with nothing but the emission, diffuse and opacity textures plugged into a Principled BSDF shader. The result is applied to a duplicate object.

STK Simplify has features for unpacking textures. It also has features for converting multiple objects to shapekeys inside of a basis object, and for converting snapshots into shapekeys. It has a feature for applying modifiers and converting curves to mesh while preserving shapekeys. With Bake and Simplify, materials and linework made with this plugin are made ready for export and use in other software, or for use with other features in Blender easily. Export is handled entirely by Blender.

This is a separate addon that bakes and applies a normal map to the active mesh object while handling the bake settings in Cycles. The Target material slot selected must have a material with a Principled BSDF. The active object (which is the lower poly target for the bake) must have an unwrapped UV. It is recommended to set the Extrusion to somewhere above 0.0. Once baked, the normal map image is applied by the addon to the selected material. The STK Normal Map addon works independently of the STK Create addon, and the STK Create addon does not detect and handle normal maps made by the STK Normal Map addon.

Limitations

Inverse hull outlines and curve lines can have a small bit of variation simply due to the diagonal of a square always being larger than its sides, so as we view the lines as they twist around, or as we look across the corners of the outlines of cube-oid meshes that are facing the camera diagonally we will notice a small bit of variation in line width. This is just the nature of using 3D geometry for line work.

The Blender baking engine causes a small amount of speckles and bleed to appear on bakes. These can be mitigated, and this addon does mitigate them. But it is impossible to set things up such that the speckles or bleed never appear (overlapping areas of meshes in particular). So there is usually some cleanup work needed on bakes. If your style involves hand painting textures over bakes, these minor imperfections can easily be ignored as you paint anyway.

Snapshots are not keyframable, they must be converted to shapekeys for animation.

Objects must have their scale applied [select the object(s) -> ctrl + A -> Scale] for the 3D as 2D effect to work properly.

Install

Note: if updating either of the STK addons from any addon versions released prior to 27 March 2024, they must be uninstalled from Blender and Blender must be restarted prior to updating.

In Blender, go to the Edit -> Preferences window. In the upper right corner, click "Install...". Navigate to and select the zip file of one of the addons and click the "Install Add-on" button. Installation may take more than a few seconds. Next, if the Addon shows immediately with the title "Workflow: STK Create" or "Material: STK Normal Map" and the check box to its left is checked, you are good to go. Otherwise, you may have to uncheck the "Enabled Add-ons Only" button and type "stk" in the search bar, and then ensure that the addon is enabled by checking the "Enable Add-on" check box to the left of the addon's name.

Changelog

V1.0.8, 27-03-2024

1) Updated both addons so that as long as the Blender Python API does not change significantly prior to Blender 5.0, the addons will still work. Note: if updating either of the STK addons from any addon versions released prior to 27 March 2024, they must be uninstalled from Blender and Blender must be restarted prior to updating.

2) Added "Space" and "Line" brush setting convenience buttons that appear under the "Texture settings" section while in paint mode.

3) Fixed situation where "Merge shape keys" would crash the operator when attempting to merge multiple versions of a curve as morph targets into a new mesh.

V1.0.7, 09-03-2024

1) Fixed error when attempting to recall a non-existent binding of a curve and gave it an info message explaining what to do in that case.

V1.0.6, 05-03-2024

1) Added new adjustment layer feature. Texture layers can now be converted into adjustment layers, where everything below an adjustment layer is effected by it. The available adjustments are Brightness / Contrast, Curves, Ramp, HSV and Gamma.

2) Set the "Create simplified duplicate" feature to differentiate between objects with one material and objects with multiple materials. It will now create simplified duplicate bakes with few to zero Blender bake speckles for objects with one material, and objects with multiple materials have had the Blender bake speckles mitigated to a reasonable degree.

21-02-2024

1) Added new STK Normal Map addon. This is a separate addon which handles normal map bake settings, normal map generation and application.

V1.0.5, 17-02-2024

1) Set Picker, Brush and Eraser buttons to be highlighted blue when active.

2) Fixed situation where default values were being used instead of given values when baking alpha from an HSV node instead of an image node.

3) Future-proofed for Principled BSDF node API changes.

V1.0.4, 08-02-2024

1) Fixed crash when cleaning baked images list of non-existent images prior to delete of baked image.

V1.0.3, 07-02-2024

1) Added options for the 3D as 2D update features. The 3D as 2D overall line width (Width factor) and obj depth perspective shift (Perspective factor) can now be applied to models independently of each other, or they can be applied together by default. Applying the 3D as 2D effect with only the Width factor enabled (using the new "Width only" option) results in inner line curves and inverse hull outlines that will have uniform 3D as 2D width on a per-model basis, but, they will still get wider the farther they are from the camera. This comes in handy when baking inner line curves to surface materials via AO bakes. It also means that shapekeys can be created by hand, where the two factors can be kept separate for more dynamic usage in other apps or with other features in Blender. Note, the obj depth perspective shift (Perspective factor, as isolated with the new "Persp only" option) is more pronounced the closer an object is to the camera, and the more depth the object has in relation to the camera's point of view. Also, the focal length effects both factors.

2) Set the 3D as 2D "Update" button to ignore the camera, if the camera is the only object selected when clicking the button. The update will then occur on all hull and curve lines.

V1.0.2, 05-02-2024

1) Added an info label that indicates when an object needs a surface material added in order to access bake features.

2) Fixed situation where options of copied layers were on but not applied to the layer.

3) Fixed crash that occurred when saving all images, or using any feature that saves all images while "area" attribute was none.

V1.0.1, 31-01-2024

1) "Alpha to Base Color alpha" transfer feature added. Transfers an alpha source to the alpha channel of the texture image plugged into the Base Color diffuse channel of a Principled BSDF shader. Alpha source can be from the Alpha slider of the Principled BSDF, or from the RGB values (Color output) of a grayscale image plugged into the Alpha input of the Principled BSDF. If the Principled BSDF has either of these alpha sources and does not have an image plugged into its Base Color input, a new image and node will be made using the color value of the Base Color. This makes exportables compatible with other 3d apps that do not have shaders with separate alpha channels. New images are automatically saved internally as .png.

2) Set "Non-Color" to be set automatically for some of the bake images.

3) Fixed crash that effected the addon in Blender 3.4 - 3.6 which prevented the "Create simplified duplicate" feature from baking alpha images when the "layer bypass cell and solid color" is checked.