Hi,
I am exporting vector graphics for use in game design, and opacity is really useful for shading, but when I export my png I want the shading that I created using opacity in Inkscape, but I don't want the opacity to be maintained with the image I export. I guess Ideally I want to be able to "replace" the opacity with the color/shading achieved using it.
Currently my assets are opaque in my game engine which sometimes is not going to be what I want.
Thanks for any help.
Loose opacity but maintain the colors achieved with it?
-
- Posts: 4
- Joined: Sun Oct 15, 2017 4:34 am
Re: Loose opacity but maintain the colors achieved with it?
The easiest way is simply to add a background object of the same colour that you're using for the canvas background (typically white, but could be something else). Just adding a rectangle will do, but you'll then lose the transparency around the outside of your shape. So what you probably want is a coloured silhouette of your objects which you then drop to the back of the lowest layer (or put on a "background" layer of its own).
There are a few ways to create a silhouette, depending on the complexity of your shapes; if you can get away with it, just selecting all the objects that contribute to the outline, duplicating them and then using Path > Union will often do the job.
There are a few ways to create a silhouette, depending on the complexity of your shapes; if you can get away with it, just selecting all the objects that contribute to the outline, duplicating them and then using Path > Union will often do the job.
Re: Loose opacity but maintain the colors achieved with it?
What I usually do for these cases to achieve only pixels with 100% opacity or 100% transparency is to open the image in gimp, put a white layer below, merge the layers into one, then use the wand tool with a threshold of 0 to select all exactly white areas (there may exist a better way), then hit Del to remove.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 2344
- Joined: Sun Apr 14, 2013 12:04 pm
- Location: Michigan, USA
Re: Loose opacity but maintain the colors achieved with it?
Sorta begs the question, do you want overlapping objects to have the third color..
If not, maybe for a few items:

Not gonna work easily for gradients, tho.
If not, maybe for a few items:

Not gonna work easily for gradients, tho.
Have a nice day.
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1
The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/
-
- Posts: 4
- Joined: Sun Oct 15, 2017 4:34 am
Re: Loose opacity but maintain the colors achieved with it?
Thanks for the suggestions! I'll give these a shot!
Re: Loose opacity but maintain the colors achieved with it?
I can think of a way to use the Dropper tool to "fix" a gradient. Not precise, but if close enough it ok, it could work.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Loose opacity but maintain the colors achieved with it?
I'd have suggested that, too, but if the user uses blur, it's not going to work 

Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)