Implementation of SVG Filters, specifically BLUR

Bug #170086 reported by Kidproto
2
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

One of the biggest artistic failings of Sodipodi is a
lack of blurry objects. If I want to have a shaped
blur, there really is no possible way of doing it in
Sodipodi. I have to hack together multiple circular
objects with radial blurs and hope the effect is right.

Think this in Gimp: Use Lasso tool to draw a shape.
Then choose to "feather selection", then fill the
selected area with a solid colour. If I could reproduce
this inside Sodipodi, I would be a very, very happy man.

See
http://faemalia.homeip.net/ArtWorx/Anasong-Asian-size850.jpg
and notice the shadow is very sharp and crisp. In this
case, it looks good. But in other cases, I might want
the shadow to be slightly blurry.

KIDPROTO: This should be implemented as SVG filters:
http://www.w3.org/TR/SVG11/filters.html

( NOTE: originally in sodipodi RFE tracker as RFE #
716562 , Date Submitted: 2003-04-06 22:22, Date Last
Updated: 2003-05-17 16:23, comments in sodi tracker )

Tags: other
Revision history for this message
Wiscalico (wiscalico) wrote :

For startes I would be great if Inkscape could just render
filters. Then you could write them in a text editor and have
em exported the right way. Right now I use Batik to render
my SVG images after putting filters in them.

Revision history for this message
Franp-users (franp-users) wrote :

The inkscape people are doing a wonderfull an amazing job
with features seen nowhere else, but I just wonder if the
low priority given to this feature (priority 6) is serving
the inkscape penetration in the "market".

With dropshadow common features of all vector drawing tools
on the market for more than ten years now (it was already in
CorelDraw 3 back in 1992), the lack of support for filters
(and particulary dropshadow) is a real problem when trying
to "sell" Inkscape to my friends. The first question I hear
each time is "Where is that bloody command to add shadow ?" ...

While I understand Inkscape surpasses many vector drawing
tools by far on many places, and happilly use it myself for
this very reason, the lack of dropshadow makes it very, very
, very, very hard to sell to the ordinary layman next door.

And since filters are part of the SVG spec there is even
less reason filters are kept as low priority as 6, IMHO.

If too difficult to add filters supports right now, I think
an effect, plug-in or whatever should be quickly added to
offer dropshadoow. This would certainly leverage by several
orders of magnitude the penetration of Inkscape in the
general population, even if ull, generalized support for the
other SVG filters comes years later.

This feature thread should be separated, IMHO, in two
threads : one titled "support for dropshadow" (priority 10),
and a second one titled "support for filters in general"
(priority 6 if you like).

Revision history for this message
Nicubunu (nicubunu) wrote :

franp wrote:
> If too difficult to add filters supports right now, I think
> an effect, plug-in or whatever should be quickly added to
> offer dropshadoow

You may want to check the recently released 0.42 and enable
in preferences the experimental effects menu. There you can
use a combination of "Dropshadow" and "Blur edge". It is not
the same as the dropshadow filter (and should not stop the
development of real filters) but it may be used as a
temporary solution.

> And since filters are part of the SVG spec there is even
> less reason filters are kept as low priority as 6, IMHO.

I guess the priority is so low (6) because is not easy to do
it with the current renderer. AFAIK, at some point in the
future Inkscape will switch to Cairo as renderer, which will
automatically give support for rendering filters.

Revision history for this message
Tyrerj (tyrerj) wrote :

> I guess the priority is so low (6) because is not easy to do
> it with the current renderer.

As mentioned by wiscalico, Apache Batik (Squiggle SVG viewer) *will*
render filters. This is written in Java, but I would think that it would
be
possible to port it if GCJ 4.01 won't compile it.

The filter I use for a Drop Shadow is:

<filter id="DropShadow">
<feGaussianBlur in="SourceAlpha" stdDeviation="2" result="DSBlur"/>
<feOffset in="DSBlur" dx="3" dy="3" result="FinalDS"/>
</filter>

This has three parameters:

    stdDeviation
    dx
    dy

and applying it needs:

    fill-opacity

in the "style"

style="fill-opacity:.7500000;fill:#000000;filter:url(#DropShadow)"

So we would have a plugin with 4 parramaters.

It would also be helpful if there was a direct method of creating the
object with #000000 fill that is the intersection of the relevant objects.

Revision history for this message
Nicubunu (nicubunu) wrote :

tyrerj -> so you propose to use Batik as Inkscape's
renderer? I am affraid this is not realistic, a much better
option is Cairo

Revision history for this message
Tyrerj (tyrerj) wrote :

Just a thought since Batik is already at 1.6 and Cairo is still
experimental.

Have you ever tried Sketsa which does use Batik to render SVG.

It also has some nice features which might improve InkScape.

Revision history for this message
Nicubunu (nicubunu) wrote :

Sketsa is a Java application, so it make sense for it to
have a Java renderer (Batik), but Inkscape is C/C++, so the
renderer, which is a core component, must also be C or C++

Unrelated, Cairo is preparing for a 1.0 stable release in a
few weeks and is already in use in some major projects like
Mozilla (Firefox 1.5) and GTK+ (2.8)

Revision history for this message
Tyrerj (tyrerj) wrote :

To quote from the GCJ documentation:
<<
The key idea in CNI is that Java objects are C++ objects, and all Java
classes are C++ classes (but not the other way around). So the most
important task in integrating Java and C++ is to remove gratuitous
incompatibilities.
>>
So, the important question is whether the current version of GCJ will
build Batik.

This might not be as easy as mixing procedural languages, but it might
work.

Revision history for this message
Julian Mehnle (jmehnle) wrote :

What's the status of this issue? Is it still being worked
on?

Revision history for this message
Bug Importer (bug-importer) wrote :

Subtle blurs and drop-shadows are like the second most
common effect used for web-design currently...

blurs are part of the svg spec as said - the sooner inkscape
can render them, the sooner it will get a whole lot more web
developers interested. once inkscape can render gaussian
blur, i assume its easy to make automatic 'outer glow',
'inner glow', 'drop shadow' effects and so on?

this feature is very important.

Revision history for this message
Buliabyak-users (buliabyak-users) wrote :

Finally we can close this.

Revision history for this message
Bug Importer (bug-importer) wrote :

has it been implemented? or is it not going to be added?

Revision history for this message
Franp-users (franp-users) wrote :

Yes it has been implemented in 0.45 thanks to Google Summer
of code. Yupee ! and Thanks Google !

Revision history for this message
Bug Importer (bug-importer) wrote :

Awesome!!! That is so great - hooray for SOC :D

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.