Search Issue Tracker
By Design
Votes
0
Found in [Package]
2.0.0-preview.21
Issue ID
VGB-7
Regression
No
[Vector Graphics] Resolution loss and artifacts when importing SVG with the Vector Graphics package
Reproduction steps:
1. Open the attached project "ReproProj"
2. Open the “/Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
4. Observe the Game view window
Expected result: SVG on the right looks the same as SVG seen on the left side
Actual result: Right SVG differs from the SVG seen on the left side
Reproducible with: 2.0.0-preview.6 (2021.3.28f1), 2.0.0-preview.21 (2021.3.28f1, 2022.3.6f1, 2023.1.5f1, 2023.2.0b1)
Could not test with: 2.0.0-preview.5 (2021.3.28f1) (Library\PackageCache\com.unity.vectorgraphics@2.0.0-preview.5\Runtime\InternalBridge\VectorImageBridge.cs(88,25): error CS0117: 'Vertex' does not contain a definition for 'settingIndex')
Reproduces on: Windows 10 Enterprise 21H2
Notes:
- SVG is imported from a script using the VectorUtils.VectorUtils.TessellateScene and VectorUtils.FillMesh methods
- The Tesselation is not uniform
- Looks like the StepDistance gets bigger and bigger over time with an increased resolution loss and artifacts: those are well visible with dashed strokes
- On the left, there is the correct result using the Sprite Renderer, while on the right the erroneous import via Script
- Could not test with Windows Standalone Player due to the right SVG not being rendered
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Prefab Override popup displays on wrong monitor when Inspector width is resized to minimum
- Scroll View is not moving by inertia after scrolling by click and dragging when Editor window is minimized and Canvas "Render Mode" is set to "World Space"
- "type mismatch error" occurs when the currentDirectionWS output of a Sample Water Surface node is connected to a float3 input
- URP Material Upgrade utility does not enable Alpha Clipping when material had Rendering Mode set to Cutout
- Particle System emission ignores the Sprite Atlas when using a Material that has the "Include in Build" setting unchecked
Resolution Note:
This is expected. The SamplingStepSize value should be equivalent to 1/"Sampling Steps" provided in the SVGImporter. So to have 100 steps, you would provide a value of 0.01 for the SamplingStepSize.
We may eventually either revise this API or fix the documentation for that behaviour.