Re: [Inkscape-devel] [Inkscape-user] Equivalent to Illustrator's Gradient Mesh?

On 5/21/07, MenTaLguY <mental@rydia.net> wrote:
>   <mesh xml:id="foo" meshUnits="userSpaceOnUse">
>       <vertex vertex-color="#27D" vertex-opacity="0.5" x="12.7" y="3.5"/>
>       <vertex vertex-color="rgb(123, 254, 37)" vertex-opacity="1" x="8.4" y="17.2"/>
>       <vertex vertex-color="#F0D" vertex-opacity="0" x="3.2" y="14.1"/>
>   </mesh>

Certainly this approach is a lot more practical for the implementor
compared to the one where you explicitly specify all the edges and
faces. Automatic triangulation should be relatively easy.

However, I'm concerned that this approach may not be too useful for
the designer. Yes, it is very easy to drag around the vertices and the
mesh will respond intuituvely. But the result won't look like
_anything_ in the real world. It will be too linear, too clunky, with
too visible vertices and edges. That's inevitable if you go with
straight line edges and linear color transitions between nodes, as
your plan implies.

The only way to use this to render something real-life-like is by
using a LOT of vertices so that the triangles are too small to be
visible. But IMHO that makes the whole affair rather meaningless. It
is unthinkable to create such tight meshes manually, so Inkscape
developers will have to provide yet another UI level on top of this -
using, most likely, bezier-based meshed like in Adobe Illustrator -
and then approximate the results using such a triangulated mesh. This
will blow up the size of SVG files considerably, and the mapping from
the triangulated approximation to the higher-level curvilinear
representation and back will be far from trivial to implement.
Actually, the proposed triangulated mesh in SVG won't buy us much at
all, because we can just as well approximate a bezier-based AI-like
mesh with small triangles or (better) beziergon paths right now (see
http://inkscape.org/screenshots/gallery/inkscape-0.45-gradient-mesh-experimental.png),
and it won't be _much_ worse or less efficient than if we used the
triangulated mesh.

Xara X has, along with elliptic and linear gradients, the
"three-color" gradient fill which looks exactly like one cell from a
triangulation that you propose. Since it's just a single cell it's not
an entirely fair comparison, but I can say that in several years of my
using Xara for a lot of different design projects, I have never once
found use for such gradients. A few times I thought I might use them,
but when I actually tried, they always turned out too awkard, too
sharp near the corners, too linear. So in the end I usually made do
with something like several overlapping elliptic gradients instead. To
my knowledge, other Xara artists are not often using this gradient
type either - so much so that I could not even google up any example
image to show you. On the other hand, it is well known that the lack
of bezier-controlled gradient meshes like those in AI is one of the
most frequent complaints of Xara users and is what drives some of them
to defect from Xara to AI. For me, it is obvious that three-point
gradients will never truly fulfill that need even if I can do a whole
triangulated mesh of such gradients. Smooth *curvilinear* controls are
absolutely crucial if you're doing any photorealistic art (and
photorealistic art is what gradient meshed in AI are most often used
for).

-- 
bulia byak
Inkscape. Draw Freely.
http://www.inkscape.org

Received on Friday, 25 May 2007 23:24:37 UTC