Shape Tracer

Shape tracer allow you to extrude shape along a path. You simply have to create your Shape on the Shape Editor, setup your path and choose the Shape you want to extrude !

 

Tool Overview

 

 

Shape Tracer Path component

Shape Tracer Path Component Image Shape Tracer Path Scene

The Shape Tracer Path take a Shape Asset as input and extrude it on a bezier curve. If the input Shape Asset is empty, you can create a new one with the Create button. Also you can edit the current shape with the button Edit

You can create a new Shape Tracer Path from GameObject/3D Objects/Shape Tracer Path

You can edit the curve with transformation tools:

  • Move Tool : Move selected point or selected tangent, hold Alt to disable tangent mirror editing
  • Rotate Tool : Pitch the selected point
  • Scale Tool : Set X and Y scale of the point
  • Press Escape to deselect point.

     

    Shape Tracer Path Settings:

  • Shape : The current shape asset used by the path
  • Scale : The global scale of each point
  • Subdivisions : The subdivisions number per points
  • UV resolution : The UV tiling on V
  • Loop Curve : Select true to make loop the curve
  •  

     

    Shape Asset

    Shapes are the cross sections extruded by the Shape Tracer Path. Can be edited from the Shape Editor Window.

    Shape Editor

    You can create a Shape Asset from Create/Shape Tracer/Shape or from a Shape Tracer Path with a empty shape. On the asset, select Open Shape Editor to open the Shape Editor Window and edit the shape. Also you can select Edit on a Shape Tracer Path.

    Toggle Close Shape to make loop your shape.

    By default, you have two tools:

  • Move : Move the select point, hold Ctrl to snap to the grid.
  • Draw : Draw points depending order : hold Ctrl to snap to the grid. The generated mesh normal depends on the point order !.
  • Press F to center view and Escape to deselect current tool (reset on Move tool by default).

     

    Custom Shape Editor Window Tools

    You also can create your own shape tools inheriting Shape Tool class. Must be in the Editor assembly of the plugin ! Use Shape Tool Attribute to modify the tool icon (Name, Icon Path, Tooltip, Order).

    using UnityEditor;
    using UnityEngine;
    
    namespace SorangonToolset.ShapeTracer.Shapes.Tools {
        [ShapeTool("Custom", "A custom tool", 50)]
        public class CustomTool : ShapeEditorTool {
            public override void Process() {
                Handles.BeginGUI();
                Handles.color = Color.yellow;
                for(int i = 0; i < Editor.Asset.shape.PointCount; i++) {
                    
                    //Get the shape point position
                    Vector2 pointPos = Editor.Asset.shape.GetVerticePosition(i);
                    
                    //Point local space to window space
                    pointPos = Editor.PointSpaceToWindowSpace(pointPos);
    
                    Handles.DotHandleCap(0, pointPos, Quaternion.identity, 10f, EventType.Repaint);
                }
                Handles.EndGUI();
            }
        }
    }
    

    Custom Shape Editor Tool