SVG display in eevee rendered mode #79050

Open
opened 2020-07-18 12:59:55 +02:00 by Dennis Mabuka · 18 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-02, hash: blender/blender@b18c2a3c41 (Bisected)
Worked: Before the above commit.

Short description of error

When importing an svg file, especially when there are several objects in the file, EEVEE would still display the svg more or less how the drawing looked in the drawing program (Inkscape) without having to manually reorganize the objects to have it look right as shown in the screenshots.
Inkscape:
ink.PNG
EEVEE:
2.83.PNG
(the svg would be displayed without artifacts when viewed from the direction of the normals)

This is broken in 2.9 where EEVEE displays the same file as seen here 2.9.PNG

blendfile
SVG.blend

Exact steps for others to reproduce the error
Simply importing an svg with multiple layered objects in v2.90, and viewing them in EEVEE in rendered mode can have them displaying in a weird way.
It is possible to correct this by manually reordering the objects but that can get quite overwhelming in files with several objects.

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67 **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-06-02, hash: blender/blender@b18c2a3c41 (Bisected) Worked: Before the above commit. **Short description of error** When importing an svg file, especially when there are several objects in the file, EEVEE would still display the svg more or less how the drawing looked in the drawing program (Inkscape) without having to manually reorganize the objects to have it look right as shown in the screenshots. Inkscape: ![ink.PNG](https://archive.blender.org/developer/F8704071/ink.PNG) EEVEE: ![2.83.PNG](https://archive.blender.org/developer/F8704067/2.83.PNG) (the svg would be displayed without artifacts when viewed from the direction of the normals) This is broken in 2.9 where EEVEE displays the same file as seen here ![2.9.PNG](https://archive.blender.org/developer/F8704050/2.9.PNG) blendfile [SVG.blend](https://archive.blender.org/developer/F8704076/SVG.blend) **Exact steps for others to reproduce the error** Simply importing an svg with multiple layered objects in v2.90, and viewing them in EEVEE in rendered mode can have them displaying in a weird way. It is possible to correct this by manually reordering the objects but that can get quite overwhelming in files with several objects.
Author

Added subscriber: @Mabuka

Added subscriber: @Mabuka

blender/blender#88853 was marked as duplicate of this issue

blender/blender#88853 was marked as duplicate of this issue
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Are you sure this is a bug, and not the default cube's revenge for being deleted? blender/blender#77728 /jk


I can confirm.
Tested with 2.83.2 and 2.90 blender/blender@974e36d7d0, blender/blender@e3f8768d8a and blender/blender@fe49e4139c.
Win10 GeForce GTX 470/PCIe/SSE2 4.5.0 NVIDIA 391.35

Are you sure this is a bug, and not the default cube's revenge for being deleted? blender/blender#77728 /jk --- I can confirm. Tested with 2.83.2 and 2.90 blender/blender@974e36d7d0, blender/blender@e3f8768d8a and blender/blender@fe49e4139c. Win10 GeForce GTX 470/PCIe/SSE2 4.5.0 NVIDIA 391.35
Member

Setting to high as this worked last version.

Setting to high as this worked last version.
Member

Worked in 2.90 version blender/blender@86fa8dc7f7

Worked in 2.90 version blender/blender@86fa8dc7f7
Member

Added subscriber: @fclem

Added subscriber: @fclem
Member

Git bisect points to blender/blender@b18c2a3c41
Paging @fclem

Git bisect points to blender/blender@b18c2a3c41 Paging @fclem

So I found that this also broke for Workbench during the development of 2.83. This is caused by the depth test being set to DRW_STATE_DEPTH_LESS_EQUAL instead of DRW_STATE_DEPTH_LESS.

The fact that is was rendering quite correctly is a total coincidence and was completely undefined behavior. All the layers have the same depth/position so you are effectively seeing at Z figthing artifacts but in ortographic view. The issue seems to be solvable for workbench but EEVEE now uses some optimization that cannot make the rendering do the same thing as 2.83 (because of out of order rendering). Again, the fact it could work in workbench is not normal, but just a coincidence.

What I would do Is patch the SVG importer to add a per layer epsilon offset.

So I found that this also broke for Workbench during the development of 2.83. This is caused by the depth test being set to `DRW_STATE_DEPTH_LESS_EQUAL` instead of `DRW_STATE_DEPTH_LESS`. The fact that is was rendering quite correctly is a total coincidence and was completely undefined behavior. All the layers have the same depth/position so you are effectively seeing at Z figthing artifacts but in ortographic view. The issue seems to be solvable for workbench but EEVEE now uses some optimization that cannot make the rendering do the same thing as 2.83 (because of out of order rendering). Again, the fact it could work in workbench is not normal, but just a coincidence. What I would do Is patch the SVG importer to add a per layer epsilon offset.

Added subscriber: @howardt

Added subscriber: @howardt

Maybe @howardt can answer this one, he is the author of the SVG importer.

Maybe @howardt can answer this one, he is the author of the SVG importer.
Member

Added subscriber: @Sergey

Added subscriber: @Sergey
Member

@fclem, @howardt is the author of the Import/Export Vector Files add-on, which can import SVG files and convert them into meshes. https://developer.blender.org/diffusion/BAC/browse/master/io_vector/
@Sergey in the author of the on by default Import/Export SVG add-on. https://developer.blender.org/diffusion/BA/browse/master/io_curve_svg/
This report is about the latter I believe.

@fclem, @howardt is the author of the Import/Export Vector Files add-on, which can import SVG files and convert them into meshes. https://developer.blender.org/diffusion/BAC/browse/master/io_vector/ @Sergey in the author of the on by default Import/Export SVG add-on. https://developer.blender.org/diffusion/BA/browse/master/io_curve_svg/ This report is about the latter I believe.
Member

Added subscribers: @wt, @antoniov

Added subscribers: @wt, @antoniov

I wouldn't say this is a specific to particular importer. This issue will happen for any importer which imports 2D images.

Adding epsilon is possible, but it will solve this particular issue, and introduce another.

Does the grease pencil handle such configurations in a more traditional to 2D painting apps manner? Because to me the real solution is to cover such usecase by importing SVG/PDF/.. as a grease pencil object.

I wouldn't say this is a specific to particular importer. This issue will happen for any importer which imports 2D images. Adding epsilon is possible, but it will solve this particular issue, and introduce another. Does the grease pencil handle such configurations in a more traditional to 2D painting apps manner? Because to me the real solution is to cover such usecase by importing SVG/PDF/.. as a grease pencil object.

Added subscriber: @Thomas2

Added subscriber: @Thomas2

Added subscriber: @Lin-Hsu

Added subscriber: @Lin-Hsu
Sign in to join this conversation.
No Milestone
No project
No Assignees
7 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#79050
No description provided.