I have a question regarding
Asymptote, which I recently started to use to make some simple drawings. I am facing some problems when I try to create
2D output files.
I am working in a software company, and I am drawing some simple sketches in
Asymptote. The sketches are intended to be displayed in the graphical user interface (GUI) of my company's software. The sketches are three dimensional, and some of the surfaces are transparent.
At first, I simply used the
OpenGL renderer to produce high resolution
PNG-files. This worked well until I enabled transparency. With transparency enabled, the
OpenGL renderer creates misdrawn triangles on my surfaces, which disturb the overall look of the figure. I have been told on the official Sourceforge Asymptote forum that this is a known problem with
OpenGL, and I don't know of any way to alleviate this issue within the framework of OpenGL.
Consequently, I tried to produce
3D PDF (PRC-files) instead. This solves the problem with the misdrawn triangles. When I look at my
3D figures in Acrobat Reader, the graphics look beautiful when the active content in the PDF is enabled. The only thing I need to do is to convert the PRC-file to a suitable file format which can then be displayed in the GUI. The GUI programmers in my company have suggested that I hand over the files in a 2D format, like PNG or SVG.
It should be noted that in Acrobat Reader, my
3D figure only looks good when the active content is enabled. When the active content is disabled, the figure looks horrible. I think this is because, when the active content is disabled, Acrobat Reader just shows a preview of the 3D graphics. This preview is created in Asymptote by including the line
settings.render = 0;
Unfortunately, the preview obtained with this command looks very odd. I think this is because Asymptote's algorithm for turning three-dimensional graphics into two-dimensional vector drawings has some problems (as mentioned in the Asymptote tutorial by Charles Staats).
I have tried to export the PDF-file to JPEG and PNG using Adobe Acrobat Pro DC. However, the pictures obtained with this method were extremely blurred. I have also tried to print the graphics using the Adobe PDF printer, but this also yields poor results.
I don't have much experience with 3D PDF. As I mentioned, I can view my 3D graphics in Acrobat Reader when I enable the active content, and I can rotate the graphics, and it looks great.
The only work around I have come up with so far is to use my Windows snip tool to take a screen shot when the graphics is shown in Acrobat Reader. This actually works, and I can get a PNG-file of decent quality, but only at a relatively low solution. In any case, this is hardly a satisfactory solution.
My question is: Is there some way that I can obtain a high quality 2D file format from the 3D PDF (PRC-file) format?