biocore / emperor

Emperor a tool for the analysis and visualization of large microbial ecology datasets
http://biocore.github.io/emperor/
Other
52 stars 50 forks source link

Minor Graphical Artifacts In SVG + PNG Exports #736

Open dhakim87 opened 4 years ago

dhakim87 commented 4 years ago

This issue was brought to my attention by Pedro.

Viewing either png or svg exports results in white lines (could potentially be background color lines) along the borders of each triangle. Further, both the svg and png exports are flat shaded rather than smooth shaded.

The lines visible on spheres (and also on all other shapes) correspond to the exact triangles being drawn by OpenGL underneath.

dhakim87 commented 4 years ago
Screen Shot 2019-10-01 at 12 34 43 PM
dhakim87 commented 4 years ago
Screen Shot 2019-10-01 at 12 36 30 PM
dhakim87 commented 4 years ago

Lines bordering the triangles appear to match background color.

dhakim87 commented 4 years ago

Users also don't understand why the red sphere is surrounded by a black halo when the background is white. That is the expected behavior of our current lighting parameters, but could potentially be addressed by setting our ambient lighting as a function of the background color.

ElDeveloper commented 4 years ago

The problem stems from the SVGRenderer. This object draws each individual polygon, instead of say a whole geometry. This has many downsides, as you can tell. Perhaps we could re-write a version of the SVGRenderer that draws whole geometries instead of each polygon in the scene. Although it is still experimental, exporting as a vega document remediates several of these issues.

That is the expected behavior of our current lighting parameters, but could potentially be addressed by setting our ambient lighting as a function of the background color.

This is a great idea, I hadn't though about that. I would love to see how things look under different lightings.