New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(SVG) Missing fills / Fill tool not working properly #119
Comments
Thanks for the bug report. Is anybody experiencing this on OSX as well? I just want to double check. |
Has anything been done about this is in the new Nightly Build? My OpenToonz install works great otherwise so I dont want to update and risk losing what I have, but i would be willing to if that has been fixed |
We have been able to reproduce this bug on Windows 7; the bug is caused that Toonz does not accurately support |
Problem exists on Windows 10 as well. |
Please attach a simple SVG that causes the error. |
Here is a simple example: (I created the SVG file in Inkscape.) But instead it displays like this: The top brown shape has no stroke; the other three blobs have strokes. You can use the fill bucket to paint the top brown shape a different color, but you can't fill in any of the three below shapes. Here is a YouTube video in which someone demonstrates how she was able to get around this issue: https://www.youtube.com/watch?v=wQ8hll0wt1Q But while the problem I'm experiencing with this file looks quite similar to the problem in this video, I wasn't able to do the thing she does, where she is able to ungroup and separate out multiple lines. I wonder if the program has been changed since then, if my .svg file is just different somehow, or if I'm just doing it wrong... However, I found that if you manipulate the three bottom shapes in basically any way, they become fillable. I'm thinking this issue (or at least the issue with this particular sample file) is related to #1007. Obviously, besides not being fillable, the line thickness on the 3 bottom shapes is completely messed up. (And they have a glitch where they have way too many control points.) But since this seems to be a separate glitch, I decided to move it to a separate issue (#1009). I got the same behavior on Win 7 and OSX 10.11. By the way, I have a question: Why are imported SVGs considered to be just "Vector Levels" instead of "Toonz Vector Levels"? When you import an .SVG, it's converted to and saved as a .PLI file, and you're able to use palettes and everything. It seems like it's at least trying to be the same thing; the only differences I've found so far are glitches (some of which I'll have to open as separate issues). |
Still an issue in 1.1.3 (Arch x86_64) Really ruins workflow since OT doesn't have 3D tooling of its own. |
Output when run from console and trying to load attached example
|
Ok, I continued investigation into this and found out that it is sth in the structure of d parameter of the Path is what causing it. Their pathdatas inside SVG are [Fillable one - deleted final C command symbol] Also it seems like Stroke Thickness bug is independent of Fill bug I finally was able to have QtCreator debugging sessions and breakpoints going on so maybe I'll be able find out what is causing this internally. Interestingly it seems like geometry parsing itself works ok (shapes are just unfillable - not wrongly-shaped or sth). But nevertheless sth in this pathdata makes the difference between unfillable or fillable. |
If you manage to get this figured out, I would be so grateful. I would love to be able to consistently import svg files. |
Ok, seems like I somewhat figured out what pathdata is considered bad by OpenToonz. Error arises when the final point of the pathdata matches or nearly matches (0/128 precision) the first point. I manually simplified SVG to the max and did some testing to be sure. So here is different pathdata that works and pathdata that doesn't [X axis] [subcritical deltaX - unfillable] [Y axis] [Negative Y axis] However, it looks like there are no real geometry calculations on the distance because: [subcritical DX and subcritical DY but supercritical Euclid distance - unfillable] And here's the folder with exemplary SVGs Will continue tomorrow. |
Is this fill vs non fill problem just a matter of rounding? |
In looking at the svgtestfiles (in the above attached zip file) the common theme seems to be that of overlaid control points. I will also note that while it doesn't address the specific import issue the use of the new feature "Replace Vectors with simplified Vectors" does resolve the fill problem for ALL of the exemplary SVGs in the svgtest zipfile. So in some instances that could be an acceptable workaround. It would be good to revisit this issue and see how much of it still applies to current releases. |
A few SVG related issues were fixed in #2358 |
|
This is one of many reports that will need to be reviewed after merging #5334. Some issues relate to SVG but others to PLI. |
I did a screencapture video to show exactly whats going on. That is here : https://youtu.be/BzjvsnS1BzY
And you can see from my reaction in the video that it is random each time you import something if a fill is going to work or not. Before recording the video the tires in the vector drawn van would not let me fill, but in the video they do. There are still other parts of the van that do not let me fill for no particular reason.
Hopefully this is something that can be fixed with a new release
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: