Can I map a vector image on a mesh?
The requested feature doesn't natively exist within Blender, hence recreating the behaviour is very complex and tedious.

Download the accompanying blend file with various node setups.


Creating shapes with material nodes

If a shape can be recreated with mathematical functions (plotted shapes) it can be created with cycles math nodes.

Let's create a procedural rounded rectangle group. (If you know Blender and math, skip to step 3.)


On a large plane, add a material with an Object Texture Coordinate input.

We're going to focus on the X, Y positive area (marked blue) first.
Let's by defining the bounds for the rectangle, separate the XYZ channels and add two greather than nodes for X an. Add them together clamped.

The black is the interiour of the rectangle in the XY positive area. Make sure your object's scale is applied as we're using local coordinates. Strangely enough, we don't need these nodes, discard them!
Create a circular shape using the unit circle functions. 
In our case it is simple: radius^2 = x^2 + y^2
This means, that for every point inside the circle, the following is true: `sqrt(x^2 + y^2) &lt; radius.
In nodes, add a Power node for each x and y, then an add node to add them together, then another Power node for the square root. Finally a greather than to determine if the point is outside of the circle (= if the radius is to great).

The 2nd power node with a value of 0.5 is missing in the image.
Don't forget, the effect of the nodes is seen in material view and rendered view only.
Offset the X and Y coordinate by rectangle-"radius" minus rounded corner radius.

Regardless of the value of the CornerRadius, the circles bounds are clamped to the RectangleSize bounds.
Clamp the values left and below of the circle respective X and Y diameter.

These are the desired areas. To get the red area we multiply x &lt; rectangleRadius - circleRadius with `y &lt; rectangle radius, and for the blue area switch the inputs. Then add both results together.

This is the node graph, after multiplying this rectangle restriction onto the circle, a neatly rounded corner.
  
To make the rounded corner XY symmetrical, add an abs node each to the X and Y outputs form the separate RGB node.
  
Before the abs node, add a subtract node, to be able to shift the x and y coordinates.

Make the end result influence a color mix node.

Make it a group with an input for inputColor, Vector Coordinates, offsetX, offsetY, Size and CornerSize.

Nodegraph before grouping
But wait, add support for a different height and width. Figure it out yourself or download the blend.  


Go wild, this is rather slow.



Creating shapes based on functions with nodes

Let's recreate this easter egg.


The first function will be converted as we did with the first example. I will interpret
(x-10)^2 / 300 + y^2 / 600 = 1
as

I added some arbitrary sine functions.



Creating a shape with OSL

The open shading language enable us to use a custom script node. Knowlegde of C and Python is required for the following part. (Since I don't really know any C or Python, the code samples are messy.)

You might want to head to BlenderSushi and complete their OSL series.

We'll create a stop sign polygon octagon.


I'll hard code some coordinates. Store the points in a string and convert them to a c style array with this python snippet. I just manually copied and pasted the coordinates separated by spaces and commas and the manually copied and pasted the generated code. Execute the snippet in any python interpreter.




pts = "-1,2 1,2 2,1 2,-1 1,-2 -1,-2 -2,-1 -2,1"
pts = [[float(n) for n in m.split(",")] for m in pts.split(" ")]
pts.append(pts[0])

pt_array = "point pts[" + str(len(pts)) + "] = {"
for pt in pts:
    pt_array += " point(" + str(pt[0]) + ", " + str(pt[1]) + ", 0),"
pt_array = pt_array[:-1] + "};"

print(pt_array)


This generates the following output.

point pts[9] = { point(-1.0, 2.0, 0), point(1.0, 2.0, 0), point(2.0, 1.0, 0), point(2.0, -1.0, 0), point(1.0, -2.0, 0), point(-1.0, -2.0, 0), point(-2.0, -1.0, 0), point(-2.0, 1.0, 0), point(-1.0, 2.0, 0)};



In Blender, create a new text block and start off with a basic osl shader

shader simpleColor(
    point Vector = P,
    output color col = color(0.0))
{
    // insert our custom point array here
}
Select the textblock in a script-node in the material nodes. Activate Open Shading Language in the Render Settings.

Now we got our polygon in our osl shader. To detect if a point lies in the polygon, we are going to implement a simple version of the Ray Casting algorithm. There are plenty of resources on point-in-polgyon topics on stackoverflow. I'll cast a ray from the y minimum and check with how many polylines it intersects. If the number is a multiple of two, the point must lie outside the polygon.
Create a simple function, which will take two points of a linear mathematical function and an x value and return the corresponding y value.




float linear_function(float x, point p1, point p2) {
    float x1 = p1[0];
    float y1 = p1[1];
    float x2 = p2[0];
    float y2 = p2[1];
    if (x1 == x2)
        return 0.0;

    float m = ((y2 - y1) / (x2 - x1));
    float n = y1 - m * x1;

    return (m*x+n);
}


7. Now, we'll add another function to detect if a point lies above a polyline. First we'll check if the x coordinate is inbetween the two points of the line, then we'll compare the y value of the function between the two lines with the y value of our point.



int hit(point p, point p1, point p2) {
    float x = p[0];
    if (p1[0] == p2[0])
        return 0;
    if (p1[0] &lt; p2[0])
        if (p1[0] &gt; x || p2[0] &lt; x)
            return 0;
    if (p1[0] &gt; p2[0])
        if (p1[0] &lt; x || p2[0] &gt; x)
            return 0;

    if (linear_function(x, p1, p2) &gt; p[1])
        return 1;
    return 0;
}



With these two functions added, the shader can be tested with 2 points. Note, that osl shaders are only visible in rendered preview mode. 

We can also use our stop sign coordinates. 
 


Notes on svgs

With these tools you are equipped to start writing your svg plugin. The hit function has to be implemented for curveto, smooth curveto, quadratic Bézier curve, smooth quadratic Bézier curveto and elliptical Arc and the python script has to convert all types of the svg path. It's actually not that hard to compute further intersections, but parsing the svg is going to be a lot of work.

The final goal is to write a python script, which parses an svg (with python's xml parser) and converts is to a osl shader script. The points and curves would be hardcoded in the shader.
Unfortunately, we have to first implement the most basic collision detection for beziers (see the previous link), because most svgs will use them, and possibly for all other svg elements (see the previous2 link).