Svg scale factor

I want to import svg files and notice that these are not 1:1 scale to the vector file it originally is. Where does this scaling factor come from? does somebody know?

Thanks in advance

Are you talking about the size in inches, cm, or meters or the proportions vertical/horizontal?

It is possible that you are using different systems in blender and in your SVG editor program. I made a test here and created a circle in Inkscape and imported in Blender and it works perfectly. But both programs are working in the metric system.

wel made a test square of 2x3 (meters) had to scale by 4.444 caused it was 8.89x13.3 after importing. The units in blender are metric settings in affinity designer (which i use) are metric as well. Only thing i could come up with was that it had something to do with dpi setting but i cant see a relation in that ( 400dpi)

Sorry, I have never used Affinity, but it seems that the problem comes from there. You could install Inkscape and try it since it’s free or try to find what the problem could be in Affinity.

It seem’s a problem that affects other people as well. I found this on the internet.

In this post they mentions something about the DPI, but I don’t know if that would change something. Someone there said it should be 96 DPI when you export.

tried inkscape (i have it installed, rarely use it tough) and indeed, works flawlessly as it seems.
Adjusted the dpi to 96 in affinity and it did cange something, it gets closer to the dimensions when importing but it is nog quite there yet. Strange…

1 Like

Try the 72 dpi, then. It was the standard DPI setting for monitors long ago. Maybe they still use this somehow.

well something with dpi it seems. however neither 72 or 96 does it (to small to big).

That’s sad. I ran out of Ideas since I never worked with that program and it’s made for windows and Mac and I use Linux only. I hope someone else can help you with thet. Good luck.

Well… since SVG is an XML file… it’s just text… so you could have a look at the start of the document and maybe see some “strange” (?) extra scale factors ??

1 Like

No problem tnx so far.

1 Like

Wel i could give that a try of course, tnx okidoki

Easy fix from any program.

Size the .svg, import into Blender and do a simple division.

From Illustrator, scale your file by 125% before saving as .svg

From CorelDraw no scaling required

I’ve found that a 3,544 pixels square saved as SVG will show up as 1 unit square (meter, for example) when imported into Blender.

An example SVG you can test is in this post:

i just stick with calculating the scale by hand seems the most reliable for now.
Thanks all so far for the input

Or, you can also insert in you SVG a figure that you can use as scale reference, like a perfect square.

The amount of scale you need to apply to that square to be a perfect square in the size you want is the perfect scale factor you need to apply to your SVG.

By the way, scaling lines inside Blender, if not in edit mode can mess with your points mean radius. You need to remember, after applying your scale, to enter edit mode selecting everything and setting the mean radius back to 1. Otherwise, if you bevel your curve it will be messed up.

1 Like

I always work with Inkscape and never found any scale issue. In Document Properties set the dimensions in mm and Scale to 1 mm per user unit. The SVG will import correctly into Blender.

But when generated in other software (eg. Illustrator) the data runs through a mm to px - dpi conversion and sizes in the SVG are messed up.

As @Calandro pointed, a reference object with known dimensions is the best choice to guess scale.

Here is an SVG generated with Illustrator, the outer square is an A4 document, but Illustrator exported to SVG with its mm to px conversion, resulting in wrong dimensions.

Parent all your imported SVG objects to this reference object and scale it to the known dimensions, Blender will calculate the scale factor for you.

After this, you can keep the hierarchy or Clear parents, but the objects have their correct size.

Hope it helps.

1 Like

That sounds more or less like the work around i do now, i can see the size of the object in affinity and i compare it to the size in blender after import. Than it is indeed simple math. THe A4 trick is a nice extra, didnt realize this: when i export the artboard is exported as well, i can use that as the A4 in your example. nice trick!

Thanks, learned again something today :slight_smile:

1 Like

That’s misleading. SVG format supports different units and Blender’s SVG importer takes them into account. The post you link to contains an SVG file with dimentions defined in pixels:

This does not have to be so. Units can be different like millimetres, or centimetres, or inches and Blender’s importer will attempt to use them if they are correctly defined in the SVG file. If they are correctly defined, the importer will take care of everything. It’s a matter of saving the SVG file correctly and if the software used to make the SVG file supports that.

2 Likes

:+1:… i did forget to mention units in

Remark to self: double read your posts to check if you wrote what you thought… would be easier for others than to do some mind reading…:crazy_face:
1 Like