Trouble importing .SVG into Blender

This was an issue for me and this thread was the only relevant thing I found so I figured I’d post here because it still comes up on Google.
I managed to solve the issue. SVG is only meant for 2D so it uses draw order for depth. You can fix z-fighting issues by moving layers closer to the camera so that they render on top of layers underneath them.

I wrote a script to automate this. It assumes that lowering the y axis value movies an object closer to the camera and that my SVG image is a collection named siamese.svg with all of the layers as paths nested in the collection that are ordered in draw order.

import bpy

MIN_TRANSLATE_Y = -0.0000001
counter = 0

svg = bpy.data.collections["siamese.svg"]

for path in svg.objects:
    path.location.y += counter
    counter += MIN_TRANSLATE_Y

The value -0.0000001 was picked through trial and error. It might need to be bigger if it doesn’t fix all the z-fighting. Hope this helps someone out :slight_smile:

2 Likes