Jump to content

Problem importing .png file into Cura (Alpha Channels?)


Go to solution Solved by Slashee_the_Cow,

Recommended Posts

Posted (edited) · Problem importing .png file into Cura (Alpha Channels?)

Hello, I am trying to import a .png to Cura, from Adobe Illustrator, where the piece to be printed is a 2 tiered, flat, circle, oval, triangle, etc.

 

Cura (5.7.2) will give me the proper 3d shape, but is also adding in a super thin black (or maybe dark blue) layer to "fill in" the transparent part, making it a square/rectangle when it prints.

 

From what I've seen online, it looks like it may be because of Alpha Channel(s), but I don't know for sure.

 

Following advice that I've seen online, I have tried:

 

TEST: Flattening the image in Photoshop (Layer > Flatten Image) to make it a locked "background" layer

RESULT: Black layer in transparent parts when imported into Cura

 

TEST: Flattening the artwork in Illustrator (Layer > Flatten Artwork)

RESULT: Black layer in transparent parts when imported into Cura

 

TEST: Flattening in both programs

RESULT: Black layer in transparent parts when imported into Cura

 

TEST: Turning the Alpha option on when saving

RESULT: Black layer in transparent parts when imported into Cura

 

TEST: Turning the Alpha option off when saving

RESULT: Black layer in transparent parts when imported into Cura

 

TEST: Save For Web with PNG24 option

RESULT: Black layer in transparent parts when imported into Cura

 

TEST: Save For Web with PNG8 option 

RESULT: Palletizing the 256 grayscale levels down to 247 levels, and Black layer in transparent parts when imported into Cura

 

TEST: Save as .jpg

RESULT: Transparent parts are filled, and image/letters are heavily degraded

 

Quick rundown of workflow:

 

- Photoshop:

1. Creating image in Greyscale

2. Flatten image (Layer > Flatten Image)

3. Save as .psd or .png  (I have also tried exporting as .png)

 

- Illustrator

1. Create Vector Shape

2. Import image made in Photoshop

3. Send image to back (Object > Arrange > Send to Back)

4. Line everything up

5. Make clipping mask (Object > Clipping > Make)

5. Flatten artwork (Layer > Flatten Artwork)

6. Export as .png (background color: Transparent)

*** When saving the image in Illustrator, the background color is transparent, and when opening it in another image viewing/editing application, the transparency is still there.

 

- Cura:

1. Drag and drop .png into Cura

2. Convert Image window pops up

- Height (mm): 2.0

- Base (mm): 2.5

- Width (mm): 40

- Depth (mm): Auto Fill

- Lighter is Higher

- Color Model: Linear

- 1 mm Transmittance (%): 1

- Smoothing: 0

3. Hit ‘OK”

*** I have tried making the base 0.00 mm, but the black layer in transparent parts remains.

 

The attached images shows an imported .png circle with the black layer (Top left), an imported .jpg with the “filled” portion and degraded text (Top right), and .png oval with the black layer (Bottom).

 

Thank you for any and all help, I have been banging my head against the wall trying to figure out how to get rid of this.

 

Top View.png

Side View.png

Underside.png

Edited by Slashee_the_Cow
Removed custom text formatting
  • Link to post
    Share on other sites

    • Solution
    Posted · Problem importing .png file into Cura (Alpha Channels?)

    Have you tried looking at the Preview tab at the top to see what it will actually print? In Prepare view every model shows its bounding box but that doesn't actually get printed:

    image.png.366a05a41bcc871e8fdb60a9c473a755.png

    In Preview mode the bounding box is just represented as a transparent container and won't be printed:

    image.thumb.png.4f2dd66bc652204d3a12f5e85693b8bf.png

    Original picture - PNG with transparency exported from Affinity Designer 2:

    image.thumb.png.4b25d4a8c2c78778e7037411b434075b.png

     

    BUT (there's always a but): importing from a raster image like this is a really, really bad way of doing things. You'll always be limited by the resolution of the image (so export it MASSIVE and downscale it in Cura if you need to) but it's much better to create a 3D model from your SVG using a CAD program.

     

    I use OpenSCAD - intimidating to most people the first time they open it, but not that difficult once you know what you're doing. I export every layer separately - and here it really doesn't help that Windows Explorer doesn't render empty areas of SVGs as transparent:

    image.thumb.png.3f7c4e8dc19daad66ed07120aa9d9f95.png

    Then just add them together:

    image.thumb.png.9b5df0c517b6923a2bec85c100df3805.png

    And now I can export an STL file with much better control over things like height than I ever could by importing the PNG:

    image.thumb.png.c120b0198020d7ca93886e866503191c.png

    Okay, if I changed the colours in the drawing when exporting it as a PNG to try and match the right heights it would look closer but still nowhere near the control of inputting exact height values. And even then it'd be damn near impossible to figure out the colour values to achieve art prints like this:

    image.thumb.jpeg.9af4d60560eb7e832a087bd40df33a45.jpeg

    That has white at 4 different heights and black at 3 different heights IIRC.

     

    You can also use FreeCAD but it's also not exactly intuitive to new users. It can use multiple layers from the same SVG at different heights but (told you there's always one) if you haven't saved your SVG through Inkscape it'll often have trouble reading it (even one layer at a time, it can't load SVGs I export out of Affinity Designer).

     

    If you'd still rather do it your way, then just remember: export your PNGs at MASSIVE resolution. At least as much as the traditional "print" resolution (300 dpi).

    • Heart 1
    Link to post
    Share on other sites

    Posted · Problem importing .png file into Cura (Alpha Channels?)

    As slashee says, that black layer goes away once you slice and look at it in preview mode.   Preview mode is trying to show you lots of information about your model.  The black layer is just information.  Not something that will be printed.

     

  • Link to post
    Share on other sites

    Posted · Problem importing .png file into Cura (Alpha Channels?)

    Al images are rectangles and so there will be a background that is a rectangle, and it will print.

    • Slice the model and note how many layers the bottom consists of.
    • Drop the model into the build plate by the thickness of the background rectangle.

    The PNG on the right has been dropped to a Z = - 0.4 and so the background is excluded.

    image.thumb.png.14f47db34ae95d175374e773ab9b73d6.png

  • Link to post
    Share on other sites

    Posted · Problem importing .png file into Cura (Alpha Channels?)
    1 hour ago, GregValiant said:

    Al images are rectangles and so there will be a background that is a rectangle, and it will print.

    Except for anything with 0 alpha (#xxxxxx00) in a PNG because Cura uses (effectively) the luminance value of each pixel to build its heightmap and "nothing here" doesn't appear on the luminance scale.

  • Link to post
    Share on other sites

    Posted (edited) · Problem importing .png file into Cura (Alpha Channels?)

    Thank you everyone for the input, especially Slashee for the in-depth explanation, and pics! I went down one heck of a rabbit hole for a "problem" that could have been "fixed" by just clicking Preview.

     

    I will check out OpenSCAD, I am fairly new to this, and am excited to learn more!

     

    Thanks again

    Edited by n8raymond
  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.8 beta released
        Another Cura release has arrived and in this 5.8 beta release, the focus is on improving Z seams, as well as completing support for the full Method series of printers by introducing a profile for the UltiMaker Method.
          • Like
        • 1 reply
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
          • Thanks
          • Like
        • 3 replies
    ×
    ×
    • Create New...