Wrong fill in imported SVGs #53280

Closed
opened 2017-11-09 17:08:05 +01:00 by Miko Dela · 7 comments

System Information
Macbook Air 2015, Mac OS Sierra

Blender Version
2.79

Short description of error
When I import an SVG with a complex path, the fill shows up wrong in Blender.

Exact steps for others to reproduce the error
All files here: https://drive.google.com/open?id=1rrv7fqc-mGk7lwQTVJfHFYnJc3ZBDMOY

To see the problem with fill, just open the blender file (untitled.blend).untitled.blend

This file was created by simply importing this SVG:
dmuchawce-export.svg

The SVG is supposed to look like this: Screen Shot 2017-11-09 at 16.33.04.png
But when imported to Blender, some parts of the graphic are covered with black (this is the problem): Screen Shot 2017-11-09 at 16.31.56.png

What's even more weird, changing the resolution ("Preview U") setting changes the fill in unpredictable ways (go through the screenshots in the Google Drive folder ).

Btw. I've also seen the same bug with many other SVGs, so this one is not an isolated case.

**System Information** Macbook Air 2015, Mac OS Sierra **Blender Version** 2.79 **Short description of error** When I import an SVG with a complex path, the fill shows up wrong in Blender. **Exact steps for others to reproduce the error** All files here: https://drive.google.com/open?id=1rrv7fqc-mGk7lwQTVJfHFYnJc3ZBDMOY To see the problem with fill, just open the blender file (untitled.blend).[untitled.blend](https://archive.blender.org/developer/F1112350/untitled.blend) This file was created by simply importing this SVG: ![dmuchawce-export.svg](https://archive.blender.org/developer/F1112353/dmuchawce-export.svg) The SVG is supposed to look like this: ![Screen Shot 2017-11-09 at 16.33.04.png](https://archive.blender.org/developer/F1112342/Screen_Shot_2017-11-09_at_16.33.04.png) But when imported to Blender, some parts of the graphic are covered with black (this is the problem): ![Screen Shot 2017-11-09 at 16.31.56.png](https://archive.blender.org/developer/F1112339/Screen_Shot_2017-11-09_at_16.31.56.png) What's even more weird, changing the resolution ("Preview U") setting changes the fill in unpredictable ways (go through the [screenshots in the Google Drive folder ](https://drive.google.com/open?id=1rrv7fqc-mGk7lwQTVJfHFYnJc3ZBDMOY)). Btw. I've also seen the same bug with many other SVGs, so this one is not an isolated case.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @Mikolaj-Dadela

Added subscriber: @Mikolaj-Dadela

Added subscriber: @Sergey

Added subscriber: @Sergey

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2017-11-10 11:53:22 +01:00

Thanks for the report, but it's a limitation of our rather simplistic SVG importer: it creates single Curve object per and tessellation happens on that curve. The tessellation is not friendly (and can not be reliable enough) if curve have self-intersections, which is an exact reason of things failing here.

You need to split object into multiple paths in either software you used to create that SVG or in Blender after the import.

Thanks for the report, but it's a limitation of our rather simplistic SVG importer: it creates single Curve object per <path /> and tessellation happens on that curve. The tessellation is not friendly (and can not be reliable enough) if curve have self-intersections, which is an exact reason of things failing here. You need to split object into multiple paths in either software you used to create that SVG or in Blender after the import.
Author

What's the difference between "bug" and "limitation"? To me, this very limitation is a bug, as the feature claims to import SVGs, and the imported thing looks quite different from the original thing.

I often work with complex shapes similar to this one, and I haven't figured a way to get them exported form Inkscape in a way so that it imports correctly in Blender. I'm trying to extrude this shape and add some bevel on top. This all seems to be available directly from the curve settings.

What I have in my SVG prepared for export is a single SVG that happens to be pretty complex, but it nevertheless shows up correctly in all viewers I could try. What's problematic for blender, I guess, is that this contains many sub-paths that are meant to act as holes in the shape. When I use "path -> break apart" feature in inkscape, and fill the parts with different colors, it shows up clearly:

Screenshot from 2017-11-14 09:40:16.png

When I import the separate shapes to Blender, they are just that -- separate shapes, so fill and bevel still doesn't work correctly. I can extrude the (empty) curves to create the sides of the mesh that I need, but it's really hard to get the fill right afterwards. That's why the broken SVG import is a big issue to me.

What's the difference between "bug" and "limitation"? To me, this very limitation is a bug, as the feature claims to import SVGs, and the imported thing looks quite different from the original thing. I often work with complex shapes similar to this one, and I haven't figured a way to get them exported form Inkscape in a way so that it imports correctly in Blender. I'm trying to extrude this shape and add some bevel on top. This all seems to be available directly from the curve settings. What I have in my SVG prepared for export is a single SVG <path> that happens to be pretty complex, but it nevertheless shows up correctly in all viewers I could try. What's problematic for blender, I guess, is that this <path> contains many sub-paths that are meant to act as holes in the shape. When I use "path -> break apart" feature in inkscape, and fill the parts with different colors, it shows up clearly: ![Screenshot from 2017-11-14 09:40:16.png](https://archive.blender.org/developer/F1134682/Screenshot_from_2017-11-14_09_40_16.png) When I import the separate shapes to Blender, they are just that -- separate shapes, so fill and bevel still doesn't work correctly. I can extrude the (empty) curves to create the sides of the mesh that I need, but it's really hard to get the fill right afterwards. That's why the broken SVG import is a big issue to me.

Limitation: the functionality is not implemented at all, code is working as it's expected within a given limitations.
Bug: functionality is there, but does not work as it is designed to.

Limitation: the functionality is not implemented at all, code is working as it's expected within a given limitations. Bug: functionality is there, but does not work as it is designed to.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#53280
No description provided.