Why is zbuffer no longer available in 2014b? I need it. Thanks!

I installed matlab 2014b and when opening an old figure it looked much different, and then I realized it was now rendered with OpenGL when it used to be in zbuffer. But surprisingly, in release 2014b, the zbuffer option is no longer available! (at least in the dropdown list of the property inspector). Only painters and OpenGL. Why did you remove zbuffer? I need it! Thanks.

 Accepted Answer

One of the problems we were trying to fix with the new graphics system was the fact that each of the renderers was missing a bunch of features.
For example, opengl supported alpha, but painters and zbuffer did not, while painters and zbuffer supported log scales, but opengl did not. This made it very difficult to combine different features because you'd have to hunt for a renderer which supported the combination you wanted.
In R2014b we did a lot of work to get painters and opengl to support all of the different features. We could have (and still could) do similar work to add all of these features to zbuffer, but it didn't seem like that was worthwhile because of how much softwareopengl has improved. Now that opengl supports all of the features it used to be missing, it seemed like the only point of zbuffer was that it wasn't dependent on graphics card drivers, and softwareopengl takes care of that.

4 Comments

My company uses Matlab to process large geophysical datasets, where we require data visualization to show a large number of graphical objects, which represent our data in a geographical region. We have a very important data visualization display window which performs poorly when rendered with 'OpenGL' or 'painters'. 'zbuffer' has always been used for this display window, due to the huge increase in performance of this display. With the new graphics system in 2014b and up, 'zbuffer' is missing and our display performs way too slowly to be used. Our small group of 10 licensed Matlab users have continued to use pre 2014b Matlab versions. We would very much like to upgrade to the latest versions, which is something we have always done until now. Our group would greatly appreciate if 'zbuffer' renderer made its way back into Matlab.
My understanding of the point of the 'zbuffer' renderer was just as the documentation always stated below. OpenGL has never performed anywhere close to as well as zbuffer has for our purposes. In my testing our display window when rendered in OpenGL or painters is unusable for Matlab 2015a.
zbuffer — MATLAB draws graphics objects faster and more accurately because it colors objects on a per-pixel basis and MATLAB renders only those pixels that are visible in the scene (thus eliminating front-to-back sorting errors). Note that this method can consume a lot of system memory if MATLAB is displaying a complex scene.
Could you expand on this please?
We have a very important data visualization display window
which performs poorly when rendered with 'OpenGL' or 'painters'.
We fixed an awful lot of OpenGL bugs in 14b. If you're still hitting some, we'd really like to know the details.
The comment from the doc is trying to explain the difference between painters and techniques like opengl & zbuffer. The differences between zbuffer and opengl are all in the implementation, rather than the basic algorithms.
that's great that opengl is getting better, but that doesn't justify dropping support for something that works better in our existing code. is zbuffer really that difficult to continue support? zbuffer does a better job rendering 3d data without errors in the surface. attached an example. this is not some extreme case; opengl typically does a poor job rendering a complete 3d surface. i don't understand how dropping support was even consider an option >:{
Hello,
which renderer supports transparency and output as vector graphic (PDF)? See also my question.
Tim

Sign in to comment.

More Answers (1)

Thanks for the answers, it's good to know you're working to get painters and opengl to support all of the different features. I needed zbuffer to quickly open and correct a text in an old 3D image that was rendered in zbuffer. There were missing things in openGL, and I couldn't select zbuffer in the new version of Matlab. I modified it using a PC with Matlab 2014a and solved the problem. Later, I found that OpenGL doesn't display things outside zLim, whereas zbuffer does. In my example, the figure was in X-Y view and things outside my zlim were displayed with zbuffer but not with OpenGL. Changing the zLim solves the problem although OpenGL looks different in other things such as, fonts or smoothness of 3D surfaces. The absence of zbuffer might not be convenient if you want to modify only one figure in a set of figures, you might have to open, check, modify and save all of them now in OpenGL. Thanks again!

1 Comment

That sounds like the new ClippingStyle property. You can set it to either 'rectangle', to get the behavior that zbuffer was giving you, or '3dbox' to clip against the ZLim. Consider this example:
line([0 1],[0 1],[0 1])
xlim([0 1])
ylim([0 1])
zlim([.25 .75])
Now setting ClippingStyle to 3dbox (the default) yields this:
set(gca,'ClippingStyle','3dbox')
And setting ClippingStyle to rectangle yields this:
set(gca,'ClippingStyle','rectangle')
It's a little more complicated than this because all of the renderers had bugs in this area in earlier releases, but I think that you probably want to be using ClippingStyle instead of Renderer.

Sign in to comment.

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products

Asked:

on 6 Jan 2015

Commented:

on 16 Feb 2017

Community Treasure Hunt

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

Start Hunting!