v1.36a - Canvas Layer System, Tool Library, Tapered Ballnose, and more!
After nearly 4 months since the last update it's FINALLY HERE.... and yet there's still plenty of work to do because we're just getting started. More features for the canvas layer system, new operations/toolpaths, built-in tutorial modes, and of course bugfixes - these are all coming down the pipe over the next few months.
As of v1.34a's release the price has seen a major bump reflecting primarily the addition of the canvas layer system. As the canvas system becomes more fleshed out over the next few updates the price will see further nudges but likely nothing near as large as what accompanied this update. Hopefully we'll be transitioning into the beta phase of development in the next 6-9 months, and gears will shift from feature and functionality implementation to testing, bugfixing, and above all else: promoting the dang thing!
v1.34a was up for all of 24 hours before I caught a few bugs while recording some demo footage so now we're on v1.36a, just like that! Here's the changes.txt for both v1.36a and v1.34a (it's a doozy!):
- fixed crash when project is saved more than once caused by improper path string handling code
- fixed crash caused when flip X/Y are enabled on a raster-layer
- fixed rotating paths layer via corner handles causing stuck 'ghost' paths
- added completely new and advanced canvas layer system for compositing images, models, vectors, paths, and freehand edits into a project 'canvas' off which toolpaths are then generated.
- added a tool library to allow users to save and re-use tool definitions
- added alternative older-hardware-friendly rendering method for project canvas and the simulation system which can be faster to update but slower to render depending on the capabilities of the system
- fixed problem causing program to stall on dual-core systems
- added path-editing and path-to-shape generator functions for creating raster/image depth layers from vector paths
- added nanosvg acknowledgement to About dialog under the help menu
- added view refresh after user loads default settings config
- fixed min.segment length not clamping to lower bound in metric mode
- added project/canvas pixels-per-inch setting
- fixed possibility for user to create gaps in operation index numbers via operation moveup/movedown buttons
- removed rendered mouse cursor mode
- added reactive mouse cursor icons to visually convey program/interface state
- loaded images are contrast auto-scaled to fix inconsistent behavior between images depicted via color channels or alpha channel
- fixed multiple crashes caused by user performing certain actions when automatic project backup is writing out the current project to disk
- changed medial-carve contouring depth method from normalized fraction to a machine-space depth value
- added medial-carve plane depth offset, allowing medial-axis carves to be relative to an arbitrary plane below the top-surface of a project
- fixed unintuitive medial-carve behavior when max-depth is greater than the max length of the operation's cutting tool
- reorganized menu and button-bar UI elements
- added notification when no toolpath motions are output when exporting g-code
- removed TinyFileDialogs lib, directly invokes win32 dialog APIs now
- changed project version to 12
- added 2D/3D view mode, where 2D locks view angles at top-down perspective
- creating a new project now defaults angles to oblique (in 3D view mode)
- fixed inaccuracy with tapered cutters' effect in CNC simulation
- fixed slow toolpath/simulation generation and GPU crash with larger ratios between the cutting-tool-diameter and project size
- changed toolpath render z-offset to scale with path line thickness setting to prevent z-fighting with simulation
- fixed removing of an operation by setting type to 'none' causing the UI to become confused about which operation is currently selected
- re-worked some GPU utilization to reduce stalling in main thread when performing intensive computations in the background
- added UI rectangles drawn on the left/right side of UI for cleaner appearance and can be disabled via "extend view area" UI setting
- changed some icon glyphs to improve UI intuitiveness
- added canvas render quality setting to enable users to sacrifice visual fidelity to reduce calculation time without affecting the actual canvas off which toolpaths are generated (canvas pixels/inch resolution does)
- changed machine-origin axes to scale with camera zoom
- added support for anisotropic texture filtering to improve render quality
- fixed simulation playback getting stuck at 99% progress in some situations
- added multi-threading optimization to image processing algorithms to enable them to utilize all available CPU cores
- fixed stray cuts being generated through material between cut paths with the pocketing operation when cut sorting is enabled
- fixed bug in simulation where pressing 'done' while an operation is playing re-starts the simulation while continuing to play
- added saving of user configuration after certain user actions to prevent total loss of user's changes if a program crash occurs as configs were previously only saved out upon a proper shutdown when the user exits
- changed simulation resolution setting from absolute size to pixels/inch
- added multithreaded project saving to keep the interface responsive while generating and writing a project out to storage
- fixed bug in serialization code storing floating point values to a bitstream
Canvas Layer System
The new canvas layer system frees up users from having to do all of their project design work in an external program. Now users can load multiple images, models, and vectors and craft their project within PixelCNC's interface. This system is still a work-in-progress but the groundwork is all in place and will enable the addition of a lot of really powerful features for designing projects from scratch entirely in PixelCNC!
Currently the canvas layer system allows for 3 different layer types: raster-layers, paths-layers, and model-layers. Layers can be positioned, scaled, rotated, inverted, flipped on the X/Y axes, and blended with the canvas in multiple ways.
Raster-layers consists of a 2D array of pixel depth-values and can be loaded from a conventional image file or imported from an SVG that is rasterized internally - which is something that PixelCNC was able to do previously. All of the image formats supported by previous versions of PixelCNC can be imported as raster-layers. Currently in the works: manual-editing of raster-layers using parametrically defined brushes. This is going to need a bit more optimization as to how the canvas is updated.
Path-layers are your everyday collection of cubic polycurves, their nodes, and their nodes' control points. Users can edit paths they've loaded from vector images (currently SVG with more vector file-formats coming soon) and move their nodes and control points around as well as create and delete paths too. Each time path-editing mode is enabled on a path-layer the layer's bounds are re-calculated depending on the shape of the paths that it contains.
Paths are meant to serve as a means for crafting shapes in 2D that can then be used to generate a raster-layer 3D shape. Shapes included are 'flat' - which is your everyday simple 2D shape extrusion up to the top of the paths-layer, 'angled' generates 45-degree planes extending inward from the paths up to the top of the paths-layer, 'fillet' produces a fixed-radius fillet with a radius equal to the height of the paths-layer and 'rounded' is a varying-radius fillet with a radius equal to the distance from each point on the path to the midpoint between itself and it's nearest opposite point.
Model-layers enable the importation of ... 3D models! Rendered in the 3D view is a ghost of the actual 3D model geometry which comprises the layer. The model's axes can be swapped from the layer's properties on the right-panel of PixelCNC's window, so that if the model is not already in the correct orientation the user can flip it around. From there the model can further be rotated while conforming to the layer's bounds by grabbing the center-edge layer-handles with the right mouse button and rotating the model along it's roll/pitch axes. (Other layer types can only be rotated about the Z axis)
To fully realize the potential of the new canvas system there are more features still currently in the works. One of these features is manual-editing of raster-layers. Users will be able to enter a raster-edit mode when a raster-layer is selected, which is analogous to the path-edit mode that can be enabled when a path-layer is active. Users will then be able to parametrically define a brush: number of sides, radius, radial and angular depth functions. A linear radial function, for example, would effectively be a cone shape, while a sine-wave angular function multiplied with it would produce an undulating cone effect:
Raster-editing will be great but what will really round out being able to design projects entirely within PixelCNC is the ability to add text to projects using TrueType/OpenType fonts that the user has installed on their system. This is another important piece of functionality that the canvas system serves as a foundation for. Combined with the path-layers feature users will be able to produce a text-layer that follows a specific path and specify whether characters' orientations aligns with the path at each character's location or maintains a fixed orientation across all characters. Text-layers, as with paths-layers, will not directly impact the canvas and act as a sort of proxy from which raster or paths layers can be generated.
There are other little useful functions planned for implementation such as being able to trace an existing raster-layer at a specified Z-depth, or normalized fraction value of the layer/canvas height to yield a paths-layer. Another useful function would be to stroke a paths-layer or selected paths within a paths-layer using the same parametric brushes that can be used for hand-editing raster-layers. Being able to crop a layer down to just one area of its content would also be a very useful feature.
At the end of the day there remains a number of features and functions planned for the next release or two which will really flesh out the canvas system.
Slice-Stack Rendering Method
The new canvas system requires being able to update the rendered depiction of the canvas within the 3D view in a quick and efficient manner. The original rendering method for loaded images and imported models entailed generating a triangle-subdivision mesh of the project's depthmap. This yielded anywhere from tens-of-thousands of triangles to hundreds-of-thousands - if not millions, which could all be uploaded to the GPU and rendered by a single draw call issued by PixelCNC. This tended to be rather quick on most systems to draw but slow to generate, anywhere from less than a second to a few seconds, depending on the system's capabilities, which was not so much an issue at the time.
The new rendering method generates and draws the canvas or simulation (depending on user's View Settings) as a few dozen vertically stacked rectangular polygons which have their opacity calculated on-the-fly by the graphics processing capabilities present in the machine. This is much faster to update as it only requires sending some updated depthmap information to the GPU while using the same previously-generated polygon stack geometry (unless the user changes any relevant settings that necessitate regenerating the stack). The trade-off, however, is that the massive overdraw incurred by rendering many polygons stacked on-top of each other is somewhat slower for most graphics processors to draw to the framebuffer - in spite of only being a tiny fraction the number of polygons of the original subdivided triangle meshes.
As you can see it can actually look clearer and sharper than the triangle mesh method in some respects. Some work still needs to be done on the lighting method used for the slice-stack method, however, as sheer vertical faces end up either white or black. This ends up producing some rather icky aliasing artifacts when zoomed out in some situations thus a means of smoothing out vertical spots is in order as well. Also, the vertex counts shown in the images above also includes vertices for drawing the UI, which adds a few thousand vertices.
The simulation system has been utilizing a separate method for updating and rendering which entails a more advanced method of rendering depthmaps known as "parallax occlusion mapping" which produces fantastic results but can be slow on older systems - and some reports have stated that the simulation is not even visible on certain older computers in spite of the fragment shader compiling and loading just fine with their graphics hardware. As a result, the new slice-stack rendering method is also able to be used in place of the preferred raymarching method used by the parallax occlusion mapping algorithm.
Users can toggle between using the original triangle-mesh render method for the canvas via the "Mesh Canvas" option on the View Settings dialog in the Config menu. Similarly, users can also toggle between the default raymarched parallax occlusion mapping render method and the new slice-stack render via the "Raymarch Sim." option that's also under View Settings. The simulation system still defaults to the raymarched parallax occlusion mapping method only because it has shown to update faster when the simulation is playing, for whatever reason, but if users have been having problems with the default method they can now disable the toggle and enable the new alternative rendering method.
Several users have requested over the last year or so a means of re-using tool definitions for more than one project. PixelCNC has always stored tools within project files themselves as well as last-used parameters for each cutter type in the user config file, but this is really not enough for someone with several cutters they like to use. The new tool library feature includes the addition of two new buttons that appears on a selected tool index/slot which appear as a disk-icon button and a folder-icon button.
Now users can define a tool for a project just as before and after hitting Apply they will be able to click the save-to-library button (the disk-icon button) to reveal the tool library dialog for selecting a definition slot to save the tool definition to. The tool library displays 4 slots on each of its 8 pages, for a total of 32 slots for users to fill with different tool definitions.
When creating a new project users can now click the tool index they wish to place a saved tool into (or define a completely new tool for) and click the load-tool folder icon button to select one of their saved tool definitions.
Tapered Ballnose Tool
Another requested feature by a few users was the inclusion of a tapered ballnose cutting tool type. This has been added, finally!
Tapered ballnose cutters are sold by taper angle and ball radius. The geometry involved here is trickier than one would assume at first glance, but basically the taper angle affects where the conical flutes coincide with the ballnose flutes tangentially. This means that the diameter of the point where this occurs grows smaller as the taper angle grows larger. A taper angle of zero is the equivalent of a conventional ballnose end mill cutter, and so the distance from the tip to the end of the hemispherical portion is equal to the radius of the cutter and the ball itself.
Project File Version Change
Normally I don't report on project file version changes but because this is a rather significant change that could potentially affect users' experiences in unintended ways it seemed like something that users should be aware of. PixelCNC has always had backwards compatibility with older project file versions which is why it was never something I felt was worth mentioning in the change list, let alone a devlog post.
The current project file version number, as of v1.34a, is v12. This was necessitated by the addition of the canvas system due to the fact that projects now are made up of multiple data types - in the form of individual layers - not just a single input image as was the case previously (whether loaded from an image file or imported from a model). For purposes of carrying on in the tradition of backwards-compatibility, PixelCNC is remains able to open project files saved from any previous version. As a result of the new canvas layer system being added pre-v12 projects will open up as a project with a single layer which occupies the entire canvas - with the canvas having the size that the original project did.
If anyone has any problems opening older project files with the latest version of PixelCNC please let us know by commenting here on the devlog or on the forum back at the main PixelCNC page (or click here: http://forum.deftware.org) Make sure to enable notifications for your post so you can receive emails about our replies!
Automatic Config Saving
PixelCNC also now saves config files intermittently, whenever the user changes anything that is worth updating the config file about. Previously, PixelCNC would only save the user's configuration on a successful exit of the program. If the program otherwise crashed, for whatever reason, then any changes the user made to their settings would be lost. Changing any settings, modifying the canvas, saving tools to the library, creating an operation, etc.. are now all triggers for saving a config file.
There are still plenty of things left to do before the vision for PixelCNC has been fully realized - or at least as close to fully realized as it can get. The next few releases over the coming weeks and months will see the canvas system fleshed out further with manual raster-layer editing, more paths-to-raster layer generators, and especially the text-layer functionality. Lots more little functions to make the canvas system into a powerful part of PixelCNC are all planned out for implementation and will most certainly give the competition a run for their money!
Meanwhile, I still have a number of new operation and toolpath types I hope to get out sooner than later as well - which were the original focus of PixelCNC at the outset of development. I'm really excited to bring all these new features and functionalities to users ...and potential future users. Oh yeah, and I still need to do some serious promoting - especially now with the new canvas system: a new promotional video is in order - probably after I add the ability to create text-layers, which are integral to a powerful sign-making/engraving/art CAM program. I probably should do something that doesn't have so many fast cuts which result from a misled notion that cuts should match the rhythm of the music track :P
Thanks for reading!
Get PixelCNC: Fast/Easy CAM for Signs, Engravings, Art, and More!
Leave a comment
Log in with itch.io to leave a comment.