-
-
Notifications
You must be signed in to change notification settings - Fork 401
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
Problem generating a heart shape #56
Comments
I managed to get a better render by redoing my shape a bit I get this line down the middle now at some scales. It looks better if I generate a regular signed distance field and use my grayscale sdf shader instead of the multichannel one, but when zooming in very far there's that weird artifact that occurs that your algorithm solves. I don't plan on zooming in far so it's OK. . |
The first issue was a bug in the SVG parser which I have now fixed. The second one is a little more complicated than it may seem. This is actually a specific edge case, where at the middle vertex, the inner angle between the two curves is exactly 360 degrees. The simplest solution would be to move the curve control points ever so slightly away from the middle to decrease this angle. |
I tested the latest and the change on 82364f9 seemed to solve the problem. Will do some more testing. Repeated. |
This issue should be resolved by 80039d7, the fix is present in the v1.8 release. |
This zip file contains an example svg that results in a weird output. The svg is produced by exporting from a photoshop file shape I made.
HealthIcon.zip
First off, the svg can't be parsed without my pull request: #55
Once done, this is how my Unreal Engine material renders it.
This is the output produced by msdfgen when I use the sdf flag. Not what I'd expect.
![t_ui_healthicon_msdf](https://user-images.githubusercontent.com/173169/28209053-b0938d06-6845-11e7-9cb9-b8fc37706ce0.png)
There may be some weirdness in my shape data. I'll look at trying to fix the shape later.
The text was updated successfully, but these errors were encountered: