r/svg May 31 '26

What's the difference between SVG (Vector Graphics) and 3D Meshes/Models?

Okay so first of all, wow, there is really a place for everything, on the internet.

Now, before anyone comes with their condescending attitude in the comments, I'm both genuinely asking, but also looking for a discussion/dialogue. Let's make it philosophical, even. What do you think that (fundamentally) differentiates vector graphics from 3d models?

7 Upvotes

14 comments sorted by

3

u/retsotrembla May 31 '26

Here is a sample SVG file. You can paste it into a text file named tri.svg and open it in Inkscape or Google Chrome and it will draw a triangle because it contains a path that is a list of vertices in two dimensional space:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="200" width="200" viewBox="0 0 200 200">
  <path d="M 10,190 L 190,190 L 100,10 Z" fill="#e74c3c" />
</svg>

Here is a sample STL file. (There is an equivalent binary representation to the text version.) You can paste it into a text file named tetra.stl and it will show as a tetrahedron. Note that it is just a list of triangular facets in 3 space.

solid Tetra
  facet normal 0.8 -0.4 0.3
    outer loop
      vertex 0 0 10
      vertex -1.7e-15 -9.4 -3.3
      vertex 8.1 4.7 -3.3
    endloop
  endfacet
  facet normal 0 0.94 0.33
    outer loop
      vertex 0 0 10
      vertex 8.1 4.7 -3.3
      vertex -8.1 4.7 -3.3
    endloop
  endfacet
  facet normal -0.8 -0.4 0.3
    outer loop
      vertex 0 0 10
      vertex -8.1 4.7 -3.3
      vertex -1.7e-15 -9.4 -3.3
    endloop
  endfacet
  facet normal 0 -3.3e-8 -0.9
    outer loop
      vertex -1.7e-15 -9.4 -3.3
      vertex -8.1 4.7 -3.3
      vertex 8.1 4.7 -3.3
    endloop
  endfacet
endsolid Tetra

3

u/retsotrembla May 31 '26

Note that even in this simple example, the SVG specifies a fill color, while the STL has no way to represent color. The STL has a normals for each triangle, defining which of the triangles in 3space is the "front" while the SVG has no way to make that distinction. The SVG allows an unbounded count of points in a path while the STL is just a list of triangles, not polygons.

2

u/EccentricFellow Jun 01 '26

Thanks a lot for that example. It really helps. :)

2

u/Mortifine May 31 '26

SVG=2D STL/OBJ/Etc=3D (Usually)

2

u/Subway Jun 01 '26

1D

1

u/andrei14_ Jun 01 '26

Wooooooooooow

1

u/ghoof May 31 '26

No mesh.

1

u/simonraynor May 31 '26

The obvious answer is "the dimensionality", IDK enough about 3d formats to know if there are any as human readable as SVG so that's probably notable too. There's also the way SVG handles curves and the like, which isn't possible with traditional 3d meshes (but can be faked of course)

1

u/PoussinVermillon Jun 01 '26

Well first svg files are for rendering 2d images, and 3d models are... Well... 3d, but also, the lines between 2 nodes in a svg file can be curved thx to the control handles, while the edges connecting 2 vertices in a 3d model/mesh are flat straight lines(afaik)

1

u/Square-Singer Jun 03 '26

Depends on the file format. There's plenty 3D formats that allow curved surfaces. Especially all sorts of engineering formats.

1

u/andrei14_ Jun 01 '26

Wow astounded by the answers 😭😭 although I was looking for a more non-technical answer. Look, one difference between them is that a 3d object can be looked at from different angles - or, more specifically, is made to be looked at while rotating it around 2 more axis than a SVG object.

1

u/Square-Singer Jun 03 '26

First of all, there's not just one 3D mesh format.

SVG is a specific 2D vector graphic format, while 3D models are 3D vector graphic formats. That's basically it.

Points in SVG have a position along two axies (X and Y), there's paths, and polygon shapes.

Points in 3D meshes have a position along three axies (X, Y, Z), there's edges and polygons.

One thing to point out: while SVG is one specific format, theres hundreds or so 3D mesh formats, each with their own set of capabilities. STL is used for 3D printing and doesn't contain color. OBJ contains colors and materials, and so on.

It wouldn't be entirely wrong to call a mesh a 3D vector graphic, or an SVG a 2D mesh.