On 2010-09-07 14:21, Thorsten Wilms wrote:
On Tue, 2010-09-07 at 13:53 +0200, Jasper van de Gronde wrote:
Good point, I forgot to mention that one of the main "problems" with diffusion curves as defined in the original paper(s) is that they completely do not fit in the normal "stack of objects with fill/stroke" idea. Basically they solve this by explicitly specifying the color on either side of each boundary, but this is not ideal (compared to simply superposing an object over a background for example) and some adhoc solutions are presented (in subsequent papers).
In contrast I (and others) would like to integrate diffusion curves into the normal "stack of objects" concept used in SVG, as this has some definite advantages when it comes to designing an image. Unfortunately this makes it a lot less obvious (to say the least) how "soft boundaries" can be supported. I have some ideas on this, but one of the outcomes could be that it is simply not that big a deal to combine the two, it might actually be more useful to simply have the ability to do a spatially varying blur *as well*.
I may be missing the point, but should it come down full control in one specific instance vs the ability to reuse a paint, I would choose full control to be able to get the most out of this technique. Seeing how a complex shading/paint/fill will be very dependent on the object, anyway.
The issue is not so much full control vs. ability to reuse. There are actually a few issues, but the main one is that the original definition assumed one (fixed-size) flat canvas, so no stacking of objects or translucent overlays or anything. Apart from clashing with SVG's painting model it's also not very useful for a general drawing tool, you want to be able to draw a background and then draw something on top of that without affecting the background (and be able to move it later on) for example. This means we need to figure out a way to make diffusion curves work well within SVG(/Inkscape).
One obvious way to make diffusion curves work within SVG would be to just see it as another kind of paint. So if you give an object a solid color the area affected by the color would be the area affected by the diffusion. This would give a very flexible alternative to the current linear and radial gradients while fitting perfectly within the framework of SVG, in theory you could even reuse the whole gradient stop idea (only the stops would apply to the boundary).
The main restriction this would put on diffusion curves (as far as I can see) is that you can't (easily) have "soft" boundaries. However, in the original paper these are implemented by simply reblurring the result, so you could imagine also separating the two steps in Inkscape.
So, are there other problems people can see with this approach? Any important use cases you can think of that would not be able to benefit fully?