gotcha

Author Topic: Filters don't export truly to PNG  (Read 1288 times)

October 24, 2018, 03:18:19 PM
Read 1288 times

Kanga

  • Sr. Newbie

  • Offline
  • **

  • 3
Hello,

I simply created the text 'Sci-fi' and added the 'bright metal' filter to it and is captured in the attachment 'Sci-fi + filter'. I liked the look of this and felt it was perfect for my project. However, after using the File >> Export PNG image, the resulting file looked very different and no longer what I wanted. Please see the second attachment. After playing around I discovered the output file looked the same as if applying the Edit >> Make a Bitmap copy to the filter whilst still SVG but I don't know how that helps me.

Is there a way to export from SVG to PNG where filters remain unaffected by the translation between the types?

Many thanks

*Sci Fi + plus filter after export to PNG.png
(0 kB - downloaded 91 times)


*Sci Fi + plus filter after export to PNG.png
(0 kB - downloaded 87 times)


  • 0.92
  • Windows 10

October 24, 2018, 04:14:40 PM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

It looks like something went wrong with the screenshots.  They both are 0 kb in size.  And I can't understand enough from your other comments what the problem might be.

I can say that the most common problem using Export PNG dialog, is choosing the correct option at the top of the dialog (Selection, Drawing, Page, Custom buttons).  Although what little I can gather from your comments, those options would not seem to be involved. 

So we'll know a lot more when we can see the screenshots  :)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

October 28, 2018, 03:25:11 PM
Reply #2

Kanga

  • Sr. Newbie

  • Offline
  • **

  • 3
Hi,

I don't know why attachments won't work. There's no reason for it. I'm trying imgur and expected the images to appear below and again I don't understand why they haven't. Hopefully the links can be followed and I'm very sorry if this is a hassle but I don't know what else to try. I guess I'm not techy enough.

Back to my query, hopefully you can see in the first image what I wanted and how in the second, the Inkscape filter has been distorted once exported:

How it looked on Inkscape canvas:


How it looked after exporting to PNG:


Is there a method of exporting that avoids this problem and results in a PNG that is indistinguishable in appearance from the SVG?

Many thanks

Andy
  • 0.92
  • Windows 10

October 28, 2018, 04:07:42 PM
Reply #3

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi.

If you export at 96 dpi -since inkscape 0.91; previous versions it was 90 dpi-, you should see the exact same thing as rendered on canvas at 100% zoom level.
In addition make sure your exported area is made up by even pixels width/height too.

Other than that what you want to be an exact match of is basically an artifact of the renderer/filtering; the diffuse/specular lighting filter is what only uses the 256 values of the alpha channel as an input, resulting in heavy banding and such. Maybe with a bit of sharpen filter that glitch can be exaggerated.

October 29, 2018, 04:10:30 AM
Reply #4

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
So, the 'good' version for you is the one that looks 'bad' actually. The hard edges are not intended. This seems to be due to the filter quality setting in your Inkscape preferences.
For being able to work faster with Inkscape, it is possible to display filtered objects with less quality while working, and to export them with high quality.

See Edit > Preferences > Rendering.

October 29, 2018, 04:33:39 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
While I don't have the original image, so I can apply the filter to it, I saved the image you shared here (wusrXHi.png).  I imported to Inkscape, then exported to PNG.  It looks virtually identical to the original.

Your screenshot tool appears to do the job you want (saving what we consider the poor version).

Attached is how the Bright Metal filter is supposed to look, below the version of your image which I used for testing.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

November 04, 2018, 02:57:05 PM
Reply #6

Kanga

  • Sr. Newbie

  • Offline
  • **

  • 3
Hi Brynn,

Many thanks for this. Your filter output does look massively different to mine.
My original effort was indeed using lower quality settings and I have now spent time trying every different variation I can on the preferences>>Input/Output>>Rendering options as well as Bitmap output, but I don't ever get anything close to how the filter should look. Would you know of any other settings that may still account for this that I have not tried.

Cheers

Andy
  • 0.92
  • Windows 10

November 04, 2018, 04:40:27 PM
Reply #7

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Cannot really downsample an image with the current filter editor so instead here is another filter that looks blocky -and preserves that look better at a given zoom level. Hope you like it.

scif.svg
*scif.svg
(8.93 kB - downloaded 325 times)


Edit: adding in more files. These render better within inkscape.

scif2.svg
*scif2.svg
(8.95 kB - downloaded 308 times)


scif3.svg
*scif3.svg
(10.48 kB - downloaded 316 times)

November 04, 2018, 05:54:13 PM
Reply #8

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hi Brynn, ....
Would you know of any other settings that may still account for this that I have not tried.

No, this is really over my head, to understand how or why the quality of the filter rendering happens to create the kind of effect you want.  If you really like exactly that effect, as I mentioned earlier, your screenshot tool was able to capture it. 

Or else there are lots of sites where you can search for certain textures like that.  The last time I was looking for something like that....let's see if I still have a link to one of those sites....  I think this was one I liked:  http://www.assistcg.com/

With those comments, I'm trying to answer your original request to export a PNG, of a filter, with that kind of effect.  Since a PNG is a raster format, and filters are really like raster contents, and Inkscape is a vector editor, Inkscape might not be the best tool to use.  So that's why I suggested the texture site.  But it's possible that I (or we) don't clearly understand what you're trying to do.

Lazur is really our filters guru, so those are some special filters which I wouldn't be surprised if he made especially in hoping to help meet your needs.  I can't really do much with filters myself.  (although I still hope to read up on it, and try it someday)

Another open source graphics program called GIMP is a raster editor, and I'm pretty sure it has a lot of filters as well.  So you might look and see what it has to offer.  I'm pretty sure you could use textures from the site above, with GIMP, and apply them to text.  Although I couldn't tell you how, exactly.

Sorry, I wish I could help you better.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann