Image Tracer Script
The script takes an image and creates a spline representing the contour of the black pixel areas.
The image must be black and white, if its not it will get convert it to black and white.
You have control on the image resolution and the threshold value.
Once the image is traced you can smooth and optimize the resulting spline.
Examples:
Requires: 3DMax 9+
Version: 1.01
Changes: 1.01 – it now works with more then one spline in a single shape
Note: If you are using Max 2018 or higher I recommend you use the imgVectorize plugin as its much faster and better quality.
Image Tracer
Select Bitmap: when you select an image it will automatically be shown, once it’s open you can tweak the threshold and resolution of the image. If the image its higher then 500 pixel a dialog will remind you that high resolution images take some time to process, but still much faster then doing by hand!
On/off threshold: To activate the threshold of the image, remember that the image must be converted to B&W.
On/off Image Size: to resize the image, I highly recommend using low resolution images unless you really need the detail of a higher resolution image.
Tracing
Bitmap has Holes: if you have an image with out any holes uncheck this as it will faster but if you have for example an image that has a later B then it has holes so make sure it’s checked.
Show areas being painted: this it’s just to visualize the different shapes that will get created, this is real slow on large images. Note(this might disappear in future versions).
Trace it: Perform the actual tracing. This will be disable at first until you click done on the image viewer.
Shape Tools
Apply to: here you choose to apply it to the just traced shapes or to the selected shapes.
Display Vertex Ticks: this is just as visualization, it will enable the display of vertex tick on the shapes.
Close Spline Threshold: after optimizing or smoothing a spline this threshold will control if the new spline will be closed or open based on the distance from the first to the last vertex.
Optimize Group
Optimize: perform the optimization.
Realtime: if checked each time you change the spinner a new shape will be created deleting the previous, on very large splines you might not want to check this.
Tolerance: this is the threshold for the optimization, the higher the number the more optimization. This depends on the size of the spline.
S: left click to select the original shapes or right click to select the traced shapes
D: left click to delete the original shapes or right click to delete the traced shapes
Smoothing Group
Smoot it: perform the smoothing
Realtime: if checked each time you change the spinner a new shape will be created deleting the previous, on very large splines you might not want to check this.
Num of Passes: number of times the smoothing its applied to a shape, the more passes the more smooth it gets.
S: left click to select the original shapes or right click to select the traced shapes
D: left click to delete the original shapes or right click to delete the traced shapes
Collapse all lines into one: make a single spline out of all shapes.
Leave a reply