bugGNU Octave - Bugs: bug #45137, patch/print: exports too many...


bug #45137: patch/print: exports too many polygons

Submitter:  Oliver Heimlich <oheim>
Submitted:  Mon 18 May 2015 10:01:35 PM UTC
Category:  Plotting with OpenGL Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Duplicate Assigned to:  None
Originator Name:  Oliver Heimlich Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Mon 13 Nov 2017 12:30:22 PM UTC, comment #5: 

The export to png and rater formats is now "fixed", ghostscript is now configured to not apply antialiasing when converting to raster formats, and the export to eps issue is already tracked in bug #45494. I'll close this report as a duplicate of bug #45494

Pantxo Diribarne <pantxo>
Group Member
Wed 28 Dec 2016 10:29:16 PM UTC, comment #4: 

This issue is probably still present in Octave 4.2.0.

When I create a qt figure with "demo('patch', 7)" and afterwards export it to an eps file, then my result looks different to the eps file given in comment #3. But I still see the two big triangle swith the color gradients split into many smaller triangles.

Hartmut <hardy>
Tue 19 May 2015 08:26:26 AM UTC, comment #3: 

Just to clarify, it is GLU that does the polygon triangulation, GLU being an extension of OpenGL.  I've advocated using the OpenGL convex polygon routine when possible, to avoid these issues.

I see the similar output as reported here so far.  Also, I've attached an printout of example 7 which has aliasing for all the small grandient triangles.  One can see there are five different, larger sectional triangles on the right-hand face (and all kinds of tiny triangles packed inside those bigger triangles).  It seems the axis crossing line has something to do with that patch being broken up the way it is.  Why the left-hand face is treated as one big triangle when it is a similar layout, I'm not sure.

(file #34059)

Dan Sebald <sebald>
Tue 19 May 2015 05:24:41 AM UTC, comment #2: 

Please find the requested files attached.

The 3D plot is a demo from the upcoming interval package release (http://sourceforge.net/p/octave/interval/ci/7c5be1541012af11e601be08a2387503379833b0/tree/inst/%40infsup/plot3.m#l247). It shows 100 small blue cuboids, 1 big coboid with edges, a red line and 2 gray rectangles with edges in the background. The cuboids and rectangles are created with the patch function.

The problem is probably caused by the GL implementation not exporting optimal polygons, together with bug #45104 / bug #44181 which makes the individual polygons visible in the export.

file #34054, file #34055, file #34056)

Oliver Heimlich <oheim>
Tue 19 May 2015 12:07:02 AM UTC, comment #1: 

Can you provide a screen capture of the plot as it appears on your monitor so I can see what the output is supposed to be?

Second, can you provide the eps files for the 4.0.0rc4 tests?

Third, can you provide the eps for the 6th demo of patch from just one of the hardware implementations?

Octave is using gl2ps for printing, which in turn uses OpenGL, which in turn is just an API/library.  The implementation of an actual OpenGL function call could be very different depending on what hardware, or even software if you are using Mesa, is doing the rendering.  Thus, I wouldn't be that surprised if the number of polygons differ.  But if there are actual visual differences between the on-screen rendering and the "printed" result then that is a problem that needs exploring.

Rik <rik5>
Group administrator
Mon 18 May 2015 10:01:35 PM UTC, original submission:  

The export of 3D patches to eps creates too many objects, the exports to png is also affected and looks strange (see attachements). On-screen rendering is fine.

Behaviour in version 3.8.2 and 4.0.0rc4 seems to be the same regarding this particular issue. I can observe it under GNU/Linux and Windows.

The number of polygons used during export is also affected by the GL driver. I have a dual graphics card in my notebook (Intel HD 4600 and NVIDIA GeForce GTX 860M), the intel driver creates a lot more polygons than the nvidia driver (41150 vs 17191).

Another example, in the 6th demo of patch (red/blue pyramid) the blue triangle is split into 5 triangles during export.

I can also provide eps files if needed.

Oliver Heimlich <oheim>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #34059:  pyramid_gradient_qt.eps added by sebald (9KiB - application/postscript)
file #34053:  screenshot.png added by oheim (24KiB - image/png)
file #34054:  intel.eps.gz added by oheim (457KiB - application/gzip)
file #34055:  nvidia.eps.gz added by oheim (202KiB - application/gzip)
file #34056:  demo-patch-6-nvidia.eps added by oheim (9KiB - application/postscript)
file #34049:  intel-4.0.0rc4.png added by oheim (231KiB - image/png)
file #34052:  nvidia-3.8.2.png added by oheim (106KiB - image/png)
file #34051:  intel-3.8.2.png added by oheim (230KiB - image/png)
file #34050:  nvidia-4.0.0rc4.png added by oheim (103KiB - image/png)


   bug dependencies.

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by sebald (Updated the item)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by oheim (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-13 pantxo StatusNeed Info Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #45494
    2015-05-19 sebald Attached File- Added pyramid_gradient_qt.eps, #34059
    2015-05-19 oheim Attached File- Added screenshot.png, #34053
        Attached File- Added intel.eps.gz, #34054
        Attached File- Added nvidia.eps.gz, #34055
        Attached File- Added demo-patch-6-nvidia.eps, #34056
    2015-05-19 rik5 StatusNone Need Info
    2015-05-18 oheim Attached File- Added intel-4.0.0rc4.png, #34049
        Attached File- Added nvidia-4.0.0rc4.png, #34050
        Attached File- Added intel-3.8.2.png, #34051
        Attached File- Added nvidia-3.8.2.png, #34052

    Back to the top

    Powered by Savane 3.13-f762.
    Corresponding source code