Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

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. · By Deftware

Canvas PPI and toolpaths

A topic by DJL54 created Sep 26, 2023 Views: 158 Replies: 4
Viewing posts 1 to 3
(+1)

Hi Charlie,

Working on getting lowest possible resolution and maintaining the detail required.   I start with a canvas at 200 ppi, import an image, create all  my tool paths.  Save as a new file then I change the ppi in the canvas to 100 ppi and regenerate all the tool paths.  Even though the image was imported to a canvas at 200 ppi in the original file, will the tool paths be generated as if the image was imported at 100 ppi as that is what the canvas ppi is at in the second file.  Or should I be importing the image into the second file with the canvas set a 100 ppi - creating a new file from scratch at 100 ppi?

Doug

Developer

Hi Doug,

The canvas resolution doesn't affect the loading of raster (pixel-based) images as raster-layers. They will retain their original pixel data when composited with the canvas. The canvas resolution only affects when an SVG vector image is loaded as a raster-layer, as it determines the number of pixels in the resulting raster-layer.

Basically, when you load an image as a raster-layer, it doesn't matter what the canvas resolution is. The canvas resolution only affects the resolution of the canvas as a whole but not the contents of layers that are being composited onto the canvas.

If you load a large high-resolution image it *might* get downscaled a bit just to keep things quick, but not usually in any noticeable way. It's just to avoid unnecessarily expensive compute. 

Toolpaths are generated from the canvas composition as a whole, where all of the layers (except paths-layers) are combined per their blending modes, origins, and dimensions, at the canvas' resolution. The contents of a raster-layer are not themselves affected by the canvas resolution. You can think about the canvas as a "camera" that's just capturing the state of the layers within it, and whatever that camera captures is what toolpaths are calculated from - but raster-layers themselves are independent of this camera with their own resolutions.

Text-layers and model-layers are rendered at the canvas resolution, so whenever it changes so do they. The only "permanent" effect that the canvas resolution has is when generating raster-layers from a paths-layer. That occurs at whatever the canvas resolution is at that time and increasing it after the fact will not re-calculate the raster-layers produced using functions like Shapes From Paths, Sweep Paths, Raster/Text Along Paths, Stroke Paths, etc... They are generated at the canvas resolution and don't change with the canvas resolution being changed after the fact.

I feel like I could probably explain it more clearly but hopefully you got the answers to your questions in there somewhere :)

 - Charlie

Developer

I think I could word things a bit better: toolpaths are generated at the canvas' resolution, because that's the resolution that layers are composited at (i.e. the 'camera snapshot' analogy). A high resolution raster-layer is going to appear low resolution when the canvas resolution is low, and generate coarse toolpaths. Increasing the canvas resolution will allow more of the detail in a raster-layer's contents to come through, and be captured and represented when toolpathing. The raster-layer's contents and resolution are not changed by the canvas resolution though - they just might not be captured/represented if the canvas resolution is too low.

Another analogy: an old low-resolution webcam taking a photo of a painting doesn't change the contents of the painting, it just doesn't capture the details of the painting. Raster-layers are just paintings being placed around the canvas, and to generate a toolpath (and render it in the 3D view) the canvas is composited into a 'snapshot', at the canvas resolution.

The contents of a raster-layers does not change with canvas resolution changes, only the resolution that they're composited with the canvas at, which only affects rendering the canvas in the 3D view, and toolpaths generated from the canvas.

Ok, I hope my explanation wasn't annoying - I just felt like it was easy to interpret my previous reply the wrong way, almost diametrically opposite of what I was hoping it would convey :P

Let me know if you got what you needed :)

 - Charlie

(+1)

Hi Charlie,

Yes you have explained it very well.  I now understand more about canvas resolution and the raster layer resolution and what effect each has.  Very detailed explanation as always.   

Thank you

Doug

Developer

Glad to help Doug! :)