Input transform functions FTW!!111
In the last devlog update I mentioned two new operations: one which contours the boundary between light/dark areas of a black/white image (or any grayscale image, for that matter, but it's meant to be used for anti-aliased black/white binary images), and one which can 'automagically' generate interesting depth for a binary input image. Now, it dawned on me that manipulating the depth values of an image doesn't necessarily equate to a new toolpath, it just means having a different image with which to perform the existing operations on. So the automagic operation I mentioned before actually is something else...
I've decided to implement a system that allows the user to specify a transform function that is applied to the values of each individual pixel. This would allow a whole variety of interesting things. The use will be able to access specific properties of the pixel and feed them into an arithmetic expression comprising functions and operations. So you could pass in the X coordinate of the pixel to a sine function and multiply that result with the value of the pixel in the input image, and get some funky wavy result out the other side that's fed as the input image into the rest of PixelCNC. This result would also be what users would see where the input image mesh is drawn.
The ideas I have so far for pixel properties that will be able to be referenced by transform functions are:
- Image Value
- X coordinate
- Y coordinate
- Euclidean Distance (from nearest black/white boundary)
- Manhattan Distance (ditto)
The transform functions that can be applied to these values:
- sine wave
- square wave
- triangle wave
- sawtooth wave
- arbitrary 2D curve: a user-specified spline as a plot of points on a graph, where X = input value, Y = output value
Operations combining these functions and pixel properties:
- add
- subtract
- multiply
- divide
- maximum: the greater of two values
- minimum: the lesser of two values
- exponent: bring one value to the power of another
This all sounds like a great starting point that will allow users to do all kinds of really neat things. If their input image is lacking in some fashion they will be able to mix it up a bit to produce really neat effects. I'm excited to implement this sort of thing, and it is the reason PixelCNC is still in alpha. I think it will also prove useful for me to dream up a variety of prefabricated transforms for users to select from. I'll also provide the ability for users to define their own which they can save to their configuration to re-use later in different projects.
BOOM!
PixelCNC Has Moved: deftware.org
CAM software developed by artists for artists to create unique and original works on a 3-axis CNC router or mill.
More posts
- v1.53a - Hotfix: Trace To Paths Crash ErrorAug 19, 2021
- v1.52a - Canvas/Simulation Color Curves, Optimized Stroke Paths + Shapes From Pa...Aug 18, 2021
- v1.51a - Hotfixes: Offset Limiting Max Depth, Adding Path Sweep Profiles, etc.Aug 03, 2021
- Fixed Auto-Update Crash on Startup - 20% Off Sale!Jul 29, 2021
- v1.50a - Smooth/Smudge Brushes, Model-Layer Scaling, Remove Layer Bottom, Metric...Jul 29, 2021
- v1.49a - Duplicate Layer fixMay 11, 2021
- v1.48a - Miscellaneous fixesMay 10, 2021
- v1.46a - Faster more precise contouring, dithered stipple improvements, text-lay...May 04, 2021
- v1.45a - Misc bugfixes and improvementsFeb 16, 2021
- v1.44a - Paths Carving, Tessellated Carving, Raster Tiling, Raster Tilt Angles...Jan 15, 2021
Leave a comment
Log in with itch.io to leave a comment.