Working with SVG files in Geometry Nodes

ยท By Richard

In this tutorial I'll show you how to work with SVG files in Blender and manipulate them with Geometry Nodes.

We're going to turn a flat SVG design into 3D, engrave (or emboss) the shape into another 3D object.

SVG means Scalable Vector Graphics and these files are typically used for logo designs. Instead of image formats like png's that have pixels, svg files store curve information. That's why you can scale them as much as you want, without reducing quality or getting a pixelated result.

There are two ways to import svg files into Blender: as Grease Pencil paths, or as Curve objects.

We will focus on the latter, because curve objects give us a lot of flexibility. Curves allow us to use the shape, turn them into 3D objects, engrave them into other objects, etc.

Importing an svg file is simple. In Blender you go to File > Import > Scalable Vector Graphics (.svg) and select your svg file.

I would like to focus on using Geometry Nodes to manipulate our svg files because it gives us a lot of flexibility.

The first Geometry Nodes tree I want to create is one that turns the logo form a path into a 3D mesh. It's possible to do this without Geo Nodes, but I want to build a foundation for later steps where we can bend and engrave the logo.

Here is a full walkthrough screencast of this first step:

If you want to follow along, you can download the svg file I use (the Blendergrid logo) here: blendergrid-logo.svg

And here is the final .blend file after part 1: svg-to-geometry-nodes-part-1.blend

Now that we can turn the logo Curves into a 3D mesh with Geometry nodes, let's look at engraving the logo into another mesh.

We'll start with a "flat" surface to keep it simple.

I'll start with a cube but I want to randomize the surface a little with some noisy displacement. Just to show how the Geometry Nodes solution procedurally reacts to the random surface.

Here is the walkthrough for this step:

Here is the resulting .blend file: svg-to-geometry-nodes-part-2.blend

Now we can see the value of Geometry Nodes setups, it allows for a reactive / procedural solution.

This was embossing and engraving into a flat surface. But there are a lot of use cases where you might want to engrave a logo into a curved surface.

So for this last example I'd like to show how to engrave the logo into a cylindrical object.

This requires two steps:

  1. Bend the logo around a circle to match the cylindrical surface
  2. Engrave the logo

For the first step of bending the logo we're going to create a new Geometry Nodes setup on the logo.

The conversion from curve to mesh is a bit tricky. To make everything work and properly subtract certain paths from other paths (like the hole in the "b" letter in blendergrid) the path has to be 2D.

In Geometry Nodes, if we turn a curve into a mesh, only the X and Y coordinates are used, and the Z coordinates are all reset to 0.

That's why we first turn the logo into a 2D mesh, and then in a second Geometry Nodes setup we bend the mesh around a circle.

For a full walkthrough check this video:

Here is the resulting .blend file after part 3: svg-to-geometry-nodes-part-3.blend

Now that we have nice control over bending the logo, we can look at the final step: Engraving.

To show off the power of proceduralism again, I want to engrave it into a randomly displaced surface.

So I'll start with a basic Cylinder primitive, and then apply the same modifiers that were added to the Cube.

Next we'll also start from the same Geometry Nodes setup we used to engrave the logo into the Cube.

There are a few differences, so we'll make copy and start modifying the node tree.

The main difference is that we don't want to Raycast straight down (into the negative Z direction). Instead we now want to make this a bit more dynamic. A good direction for the Raycast rays is towards the center object that controls the radius of the logo.

So we'll import that location into the Geo Nodes tree and do some basic Vector Math to figure out the ray directions.

Other than that, it's very similar to the flat surface engraving we did before.

Here is the final screencast with a full walkthrough of setting up the curved engraving:

And the resulting .blend file: svg-to-geometry-nodes-part-4.blend

Beveling

In the Geometry Nodes Text series, we covered how to bevel the edges of the text. Let's try the same thing with the SVG logo.

The final .blend file with bevelled engraving: svg-to-geometry-nodes-part-5.blend

I hope that was useful!

If you have any questions or suggestions, feel free to reply below.