"mesh" or "surf" display problem on Windows 7

2 Ansichten (letzte 30 Tage)
Pinpress
Pinpress am 6 Nov. 2012
Kommentiert: Sean de Wolski am 31 Jul. 2014
Hi,
This is strange and I scratched my head but could't figure out why. Very simple matlab code:
[x,y] = meshgrid(1:10,1:10);
mesh(x,y,x);
or:
surf(x,y,x);
I would expect to see a regular grid displayed either only showing the edges or surface patches. Works fine on Linux or Mac (R2012a), but it shows some extra lines/edges on my Windows 7 platform, like lines connecting nodes on the left to the nodes on the right at a different row. I wish I could upload a figure to demonstrate (if possible, how?)
I have also confirmed that if I save the figure on Linux, and open on Windows, same thing happens. The following is the ver on my Windows.
It appears to me this is probably a display problem. but not sure what is the cause, and how to overcome with it.
>> ver
-------------------------------------------------------------------------------------------------------
MATLAB Version: 7.14.0.739 (R2012a)
MATLAB License Number: (manually deleted)
Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
-------------------------------------------------------------------------------------------------------

Antworten (10)

Pinpress
Pinpress am 6 Nov. 2012
Bearbeitet: Pinpress am 6 Nov. 2012
OK -- some more discovery here. I think the problem is with the "opengl" renderer. If I change to "zbuffer", the problem is gone.
Any suggestion how to make opengl work? Sometimes the figure has a lot of data, opengl seems faster (based on past experience).
thanks.
>> opengl info
Version = 3.3.0 Vendor = NVIDIA Corporation Renderer = Quadro FX 1700/PCIe/SSE2 MaxTextureSize = 8192 Visual = 07 (RGB 32 bits(08 08 08 00) zdepth 24, Hardware Accelerated, Opengl, Double Buffered, Window) Software = false # of Extensions = 243
Driver Bug Workarounds: OpenGLBitmapZbufferBug = 0 OpenGLWobbleTesselatorBug = 0 OpenGLLineSmoothingBug = 0 OpenGLDockingBug = 0 OpenGLClippedImageBug = 1 OpenGLEraseModeBug = 1

Sean de Wolski
Sean de Wolski am 6 Nov. 2012
First: update your graphics drivers.
Second: you could try the software implementation of OpenGL:
opengl software
and
doc opengl
for more information on OpenGL and what to do about OpenGL issues.

Pinpress
Pinpress am 6 Nov. 2012
Thanks. The graphics card driver is up-to-date. Tried both software and hardware opengl, same effect and no cure. Also tried all "work around", still no help.
K>> opengl info
Version = 3.3.0 Vendor = NVIDIA Corporation Renderer = Quadro FX 1700/PCIe/SSE2 MaxTextureSize = 8192 Visual = 07 (RGB 32 bits(08 08 08 00) zdepth 24, Hardware Accelerated, Opengl, Double Buffered, Window) Software = false # of Extensions = 243
Driver Bug Workarounds: OpenGLBitmapZbufferBug = 0 OpenGLWobbleTesselatorBug = 0 OpenGLLineSmoothingBug = 0 OpenGLDockingBug = 0 OpenGLClippedImageBug = 1 OpenGLEraseModeBug = 1
K>> opengl software K>> set(gcf,'renderer','opengl'); K>> opengl software K>> opengl info
Version = 1.1.0 Vendor = Microsoft Corporation Renderer = GDI Generic MaxTextureSize = 1024 Visual = 309 (RGB 32 bits(08 08 08 00) zdepth 32, Generic, Opengl, Double Buffered, Window) Software = true # of Extensions = 3
Driver Bug Workarounds: OpenGLBitmapZbufferBug = 1 OpenGLWobbleTesselatorBug = 0 OpenGLLineSmoothingBug = 0 OpenGLDockingBug = 0 OpenGLClippedImageBug = 0 OpenGLEraseModeBug = 0

Fredrik
Fredrik am 8 Mär. 2013
Hi,
I have exactly the same problem. Are there any solutions?
best regards, Fredrik

Fredrik
Fredrik am 11 Mär. 2013
Hi Sean,
thanks, it works now. What I did to get it work:
- I updated graphic drivers - problem is still there.
- I tried
opengl software
and
opengl hardware
problem is still there.
- I set the renderer manually to opengl:
set(gcf, 'Renderer', 'OpenGL');
It works! Independent from 'opengl software' or 'opengl hardware'.

Francis
Francis am 15 Mär. 2013
Bearbeitet: Francis am 15 Mär. 2013
Hello, I am experiencing the same issue, see this image for example: (left is with the default opengl renderer, right is with zbuffer)
- Software OpenGL produces the same incorrect output
- Manullay setting the renderer (as above) produces the same incorrect output
- I am using the latest drivers from nvidia for my Quadro FX580.
- Windows 7 SP1 x64
- Matlab R2012b
EDIT: Software opengl does fix the problem, i just have to set the renderer to zbuffer then back to opengl for the figure to redraw.
Is this a bug with matlab or opengl/drivers? I see no reason why hardware opengl should produce incorrect output

Roger Moss
Roger Moss am 18 Sep. 2013
I've got the same problem - R2013b, Windows 7, Quadro K600 graphics card. New PC with the latest drivers.
The 'painters' and 'zbuffer' renderers work but OpenGL (either hardware or software) gives me spurious edge lines that wrap back from the end of each mesh line to the start of the next.
e.g. surf(peaks(10)); set(gcf, 'renderer', 'opengl') % looks horrible
I had this in R2012b and I thought installing 2013b might fix it, but it hasn't.
Roger

Erik S.
Erik S. am 7 Okt. 2013
I've got the same problem on Win 7 Matlab R-2012B. I am running a Quadro 2000D. Is this an issue only with Quadro cards? When I am running the same machine with a Geforce there are no errors.
Erik

Gabriel
Gabriel am 2 Jan. 2014
I am using Quadro K3000M/PCIe/SSE2, and also have this problem. It occurs on larger meshes, but not on smaller meshes. For example, the following code gives no display errors:
n = 10;
x = linspace(-10,10, n);
y = linspace(-10,10, n);
z = repmat((y.^2)', [1,n]) - repmat(x.^2, [n,1]);
mesh(x,y,z)
However, if n is set to 50, then the display error occurs.
Is Mathworks working on a solution to this?
Gabe

Gabriel
Gabriel am 17 Mär. 2014
A simple fix I found is to set the 'EdgeAlpha' value to something other than 1. I set the 'EdgeAlpha' to 0.99 and the extra lines go away.
Gabe
  2 Kommentare
Tor
Tor am 30 Jul. 2014
Great quick fix! Worked for me.
Sean de Wolski
Sean de Wolski am 31 Jul. 2014
This is the same effect of explicitly setting the renderer to OpenGL (which is required for transparency)
set(gcf,'Renderer','OpenGL')

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Graphics Performance finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by