Message Boards Message Boards

4
|
26130 Views
|
55 Replies
|
38 Total Likes
View groups...
Share
Share this post:

Huge speed regression on Graphics3D in 10.4

Dear All,

I have a simple scene with some (non-transparent) cubes:

enter image description here

While this motion was relatively fluent (10-20 fps I estimate) in version 10.1, 10.2, 10.3., 10.3.1, it is roughly 0.3 fps for me in version 10.4. Can someone else confirm this behavior? I've tried some of the different rendering engines to no avail.

I've attached the notebook. I'm working on El Capitan with a Macbook pro Retina.

Attachments:
POSTED BY: Sander Huisman
55 Replies
Posted 8 years ago

I still observe in version 11.0.0. (and since v 10.4.0) the important speed regression when rotating big 3D objects.

The motion is definitely much more fluid in version 10.3.1.

I am also on OSX (10.9.5), with a mid-2009 macbookpro which comes with two (nvidia) graphics card. Whatever card I switch to, the rotation is faster in 10.3.1

As previously observed by Szabolcs Horvat, I also notice that antialiasing is disabled in v 11.0.0 while rotating (?)

(My 3D graphics test object is Sander Huisman's first Lego shape in this post http://community.wolfram.com/groups/-/m/t/813449)

Really hope this get fixed very soon.

POSTED BY: Chris P

That's interesting. It would be interesting to get some comments from people with MacBooks and similar computers (without dedicated graphics).

Interestingly, if I disable dedicated graphics, there is no noticeable change in display (antialiasing) or performance. The integrated graphics in this machine is "Intel Iris Pro"

POSTED BY: Szabolcs Horvát

I am seeing the same lack of glitches on the 2016 MacBook after moving the slider all the way to the left (No Antialiasing).

I need to periodically make presentations, so I just bought and tested the Apple USB-C to VGA adapter. Regardless of having the Mathematica window located on the external display or the built-in display, the built-in display shows the glitches when rotating the head (slider back to Highest Quality)--though the glitches are not as persistent or noticeable.

An additional observation (should have posted on the other thread): rotating the 3D head is painfully slow on the MacBook ... Mathematica is using a little over 2 GB RAM and maxing out at 70% CPU during rotation with only one notebook open with one line of code.

POSTED BY: Timothy Ewing

I can confirm Timothy's observation. No apparent graphic problems on MacBook 2016 when antialiasing slider is all the way to the left. It's just a bit slow.

M.

POSTED BY: Marco Thiel

I tried turning off anti-aliasing (moved the slider in preferences all the way to the left), and the glitches went away. Not sure if this is treating the symptom or the problem.

This was with a 13 Inch Retina MacBook Pro (2013 wish) that has only Intel Graphics.

If anyone wants to test this, I can pass the information along to tech support.

On my machine (Mac with dedicated graphics), version 11.0 automatically (and visibly) disables antialiasing during rotation. When the rotation stops, the graphics are rendered with antialiasing again.

With version 10.4 and 10.3, antialiasing was always on, both during rotation and static display.

POSTED BY: Szabolcs Horvát

On my machine (Mac with dedicated graphics), version 11.0 automatically (and visibly) disables antialiasing during rotation. When the rotation stops, the graphics are rendered with antialiasing again.

With version 10.4 and 10.3, antialiasing was always on, both during rotation and static display.

POSTED BY: Szabolcs Horvát

I got an e-mail from tech support that the matter had been turned over to the developers. Since the original problem was fixed for Macs with a dedicated graphics card (fixed in the first beta for M11), perhaps the problem will be fixed for the rest of the Macs for 11.0.1 or 11.1.

I thought that this issue had been resolved for v11. However, it is resolved only for Macs that have dedicated graphics cards. (During the beta tests, I just checked my 15 inch Retina MBP with a dedicated (NVIDIA) graphics card.)

However, there are other graphics issues that have shown up with V11 for Macs that do not have a dedicated graphics card. This includes all MacBooks, all MacBook Airs, all 13 Inch Macbook Pros (Retina and non-Retina), and some 15 inch Retina MacBook Pros. The dedicated graphics card is an option with the top-of-the-line computer. I have no clue about iMacs, although I believe that the 27 inch models all have dedicated graphics cards, and the 21.5 inch models probably do not.

Instead of having a speed regression, the screen is messed up and the whole computer freezes, requiring a hard restart. I was able to reproduce this with the RotateCubes.nb from the beginning of this thread.

Wolfram support knows about the problem, but they might like to know the extent of the problem. I am basing my list of affected computers on the feedback on the other thread.

I second George Woodrow III's observations. I can confirm the messed up screen issues, and while I haven't had a full computer freeze, I have had Mathematica crash several times--on both 2016 MacBook and mid-2013 11" MacBook Air.

POSTED BY: Timothy Ewing
Posted 8 years ago

Sander, apologies. I thought we were talking about the performance of El Capitan.

Ok, so all the slow ones are Macs with El Capitan... well, unlucky us ;) I'm very hopeful a solution will come soon.

POSTED BY: Gary Palmer
Posted 8 years ago

Btw: Mathematica doesn't have 'patches'.

I was referring to OS X. Not that I know anything about it, but somewhere I saw an upgrade referred to as a patch.

POSTED BY: Gary Palmer

OS version (afaik) does not matter, feel free to upgrade your OS...

POSTED BY: Sander Huisman
Posted 8 years ago

@Sander Huisman, Does that mean that the problem occurs only when older versions are patched, but not when an older version is replaced or El Capitan is installed on a clean disk?

POSTED BY: Gary Palmer

No, it is just the mac versions of Mathematica 10.4 and 10.4.1 that show this behavior, independent of your OS version (Capitan, Yosemite...). Btw: Mathematica doesn't have 'patches'.

POSTED BY: Sander Huisman
Posted 8 years ago

Has the problem been fixed? I am trying to decide whether to upgrade to El Capitan.

POSTED BY: Gary Palmer

nope, but I'm pretty sure it's independent of your Mac OS version...

POSTED BY: Sander Huisman

@Yuzhu Lu I just downloaded the new 10.4.1. Does this include any fix for the problem of this thread? I notice it is marginally faster (or rather marginally less slow) but not nearly the performance of 10.3 or prior...

POSTED BY: Sander Huisman

@Arnoud Buzing and @Yuzhu Lu

Here is another simple test-scene that you can easily replicate. Can you confirm that these work smoothly on your installations and at what (perceived) FPS:

scene = Flatten[Table[Cuboid[{x, y, z}], {x, 0, 25, 2}, {y, 0, 25, 2}, {z, 0, 25,2}], 2];
Graphics3D[scene]
scene[[1]] = {Opacity[0.5], scene[[1]]};
Graphics3D[scene]

First is ~4fps for me. Second is ~0.1 fps, includes rainbow beachball between updates...

See also the video here: https://www.youtube.com/watch?v=UUis10bGohQ

POSTED BY: Sander Huisman
Posted 8 years ago

@Sander Huisman, Thanks very much for the feedbacks. We take it seriously and are working on 3D performance optimization now.

POSTED BY: Yuzhu Lu

Any news on the problem? I'm wondering whether there is workaround now so I can start using 10.4?

POSTED BY: xslittlegrass *

no real work-around, the next release of Mathematica will bring improvements.

POSTED BY: Sander Huisman

I desperately hope that will be the case ...

BTW it's not only the rotation performance that's bad. It also uses a lot more memory than 10.3 used to. In some cases more than 5x more (!!!). Combine this with the fact that the Mac front end is only 32-bit, thus can only address 2 GB of memory, and you get a lot of crashes due to out of memory problems.

Recently I've been working with large MeshRegions and things that were possible to visualize in 10.3 simply cannot be done in 10.4. The front end keep crashing.

I'll make a small test case eventually to report, but I really don't have time now.

POSTED BY: Szabolcs Horvát

Didn't know it was 32bit! Is it Cocoa? Carbon? any more details?

POSTED BY: Sander Huisman
Posted 8 years ago

It's probably already known since Linux uses OpenGL as well, but I am also seeing a massive slow-down with Graphics3D on Mathematica 10.4 in Linux (Arch, fully updated).

My SystemInformation["Devices"] output said that it was using the Gallium software rendering driver for some reason, so I tried removing the Mesa libraries included with Mathematica (SystemFiles/Libraries/Linux-x86-64/Mesa) so that it would be forced to use the system libraries in /usr/lib. It now shows the proper Intel driver in SystemInformation["Devices"] and the performance of Graphics3D is massively improved. I no longer have 10.3 to compare against, but the performance is now satisfactory for me.

This is obviously a workaround and not a solution, but I've not had any problems yet. Also, I don't know if this is what is affecting Mac users since their SystemInformation["Devices"] output seems to mention the Intel drivers already.

POSTED BY: M R

I'm using a late 2013 Retina Macbook Pro, and it shows that Gallium software is also used for version 10.4 on my system. I'm trying to use your workaround, but I don't seem to have Mesa library in /Applications/Mathematica 10.4.app/Contents/SystemFiles/Libraries/MacOSX-x86-64/. The only place I can find a file with a name "Mesa" is libOSMesa.1.3.dylib in /Applications/Mathematica 10.4.app/Contents/Frameworks/ . Removing that file would lead to crash at launch. Any ideas?

enter image description here

POSTED BY: xslittlegrass *
Posted 8 years ago

I no longer have this problem with Mathematica 10.4.1 - it now uses the hardware accelerated libGL.so from my system. No idea why this became necessary and, further, why it is no longer necessary.

The files/directories may be named slightly differently between Linux and OSX but I think the key library is libGL.so (plus all the symlinks). On my installation this is inside the Mesa subdirectory - maybe on yours it's just in the Library directory or somewhere else?

POSTED BY: M R

In SystemInformation[] it says that Mesa is used for printing only, not for on-screen rotation (on Mac). It seems people who still see the problem in 10.4.1 (including me) are all on OS X.

POSTED BY: Szabolcs Horvát
Posted 8 years ago

This might be caused by a depth offset made to edge/line by default so that it will not look dashed on a surface (avoid possible z fighting). You can try to turn it off with a method option:

Graphics3D[..., Method -> {"EdgeDepthOffset" -> False}]
POSTED BY: Yuzhu Lu

Thanks I didn't know about this option!

POSTED BY: Sander Huisman

I tried to turn it off, but with no success (I got exactly the same as without the option specification):

enter image description here

Is there anything else we can try? (10.4)

POSTED BY: Pedro Fonseca

Perhaps also try a software renderer as the hardware renderers sometimes have z-fighting errors...

For huge scenes you might want to show 'simple' lego blocks:

Change the following line inside TransformLego:

brickies=DrawLego[#1,#2,False (* detailed *)]&@@@brickspec;

to

brickies=DrawLego[#1,#2,None (* detailed *)]&@@@brickspec;
POSTED BY: Sander Huisman
Posted 8 years ago

Also if you change Sander's code like this, it should also do the trick:

Change the following Line:

knobs = Cylinder[{Append[# {dimx, dimy}, nz dimz], 
      Append[# {dimx, dimy}, nz dimz + knobh]} & /@ knobs, knobd/2];

to:

knobs = {EdgeForm[None], 
   Cylinder[{Append[# {dimx, dimy}, nz dimz], 
       Append[# {dimx, dimy}, nz dimz + knobh]} & /@ knobs, knobd/2], 
   brickstyle, FaceForm[None], 
   Cone[{Append[# {dimx, dimy}, nz dimz + knobh], 
       Append[# {dimx, dimy}, nz dimz]} & /@ knobs, knobd/2]};

Of course, you still need to set the "EdgeDepthOffset" method option to False .

POSTED BY: Yuzhu Lu
Posted 8 years ago

Sorry. I took a deep look. That option works with all other edges/lines but not Cylinder edges, which obviously is bug. I am expected this will be fixed in the next release. And before that, you can try to use the BSPTree rendering method which is located in Graphics Options/RenderingOptions, or you can set it like this:

Style[Graphics3D[...], RenderingOptions -> {"Graphics3DRenderingEngine" -> "BSPTree"}]

But this rendering method will slow things down a little though. Another possible solution is to define those edges explicitly.

POSTED BY: Yuzhu Lu
Posted 8 years ago

There is an edge/line drawing bug found which only happens on Retina (Mac) machines. It might cause 4 or 5 times slowness for some examples. We are expecting to have a fix soon.

POSTED BY: Yuzhu Lu

Hi Yuzhu Lu, great to hear you tracked down the issue!

Is it also related to this line-drawing bug (from here)

enter image description here

or is this simply z-fighting?

POSTED BY: Sander Huisman

Also cool: On the higher MacbookPro Retina (Mid2014, 3GHz i7,16GB, Intel Iris 1536 MB) this rotates substantially worse than on the MacBooPro (Mid 2012, 2.9Ghz i7, 8GB, Intel HD Graphics 4000 1536 MB).

M.

POSTED BY: Marco Thiel

So you're saying less is more... hmmm

I btw have the mid 2012 macbook pro retina (the very first retina notebook that came out).

POSTED BY: Sander Huisman

Yes, I have noticed that on several occasions. It is occasionally very difficult for me to predict on which machine (including MacPros and iMacs and even Linux Clusters) Mathematica is faster; the specs do not seem to be very predictive. I also work for a company on a Windows server (no way around it) and have a variety of toy Windows machines for connected devices projects; a direct comparison between all of these machines sometimes is surprising, but I have not studied this systematically.

On one occasion my high spec MacBook Pro Retina was outrun by a really old low-spec student PC on linux. I did not report it at the time, but was quite annoyed at my MacBookPro...

Cheers,

M.

POSTED BY: Marco Thiel

I've never seen any negative correlation between pc speed and performance yet, so very interesting that this can happen!

POSTED BY: Sander Huisman

Hi everyone,

I have tried this out on many different Macs now. I the latest, very highest spec MacBook Pro Retinas it works ok-ish (much worse than on 10.3.1 though), but on a highest spec MacBook the graphic takes 4 seconds or so to update. The MacBook has no issues on 10.3.1 at all with that graphic.

Cheers,

Marco

POSTED BY: Marco Thiel

Perhaps, you could share also SystemInformation["Devices"] ? I'm not sure if the operating system might be important though...

POSTED BY: Sander Huisman

They are all on the latest version of El Capitan.

Attachments:
POSTED BY: Marco Thiel

Ok, so all the slow ones are Macs with El Capitan... well, unlucky us ;) I'm very hopeful a solution will come soon.

POSTED BY: Sander Huisman

I a bit too lazy to run this on all university machines and generate the report for all the laptops again, but the issue is universal on all of the machines.

Cheers,

Marco

PS:I'll add one or so more SystemReports to this.

POSTED BY: Marco Thiel

Sander, we're looking into the problem and we can reproduce this in-house.

10.4 has a significantly overhauled OpenGL implementation which we expect will improve both the speed and quality of 3D graphics in upcoming releases. If there is a fix for this specific issue, we will work towards providing you and other customers an updated version.

In the mean time, please do provide the output from SystemInformation["Devices"]

Thank you for reporting this issue.

POSTED BY: Arnoud Buzing

Hi @Arnoud Buzing

I have attached a notebook with the command you said. I was also wondering what happened to the prerelease program, I think these are definitely things that could have been avoided or at least known before release. I would consider myself quite an extensive user (used it nearly half of my life) that use a lot of different domains of Mathematica and I think that prereleases would be great for the both of us (us playing around with new stuff, and you getting valuable reports in like the one above). I know @Szabolcs Horvat (another 'advanced user') also would like to see the prerelease coming back in order check compatibility of packages prior to a new release (something that is crucial for him and actually for the entire community that can't wait for all the packages made by others to be updated to support the new versions). Is there any such plan? You already have a mechanism in place that me and others used and it worked great! I don't see many downside, apart from perhaps a bit of bandwidth on your side...

Thanks for looking in to this, 3D graphics is at its very core and of course crucial for everyone, fortunately it seems the windows users (the majority of users I guess) are safe...

Attachments:
POSTED BY: Sander Huisman

I'd like to see the pre-release program come back. I also have this particular problem, (Retina MacBook Pro with dedicated graphics.)

I set the option to auto-switch, but I think that the computer always uses the dedicated graphics with Mathematica.

I re-installed 10.3.1 until this issue is resolved. There is no problem (as noted by others) with 10.3.1.

Posted 8 years ago

I assume you are talking about interactively dragging the Graphics3D object (rotating, etc.). I'm running 10.4 on Win 10. I don't see any slow down when dragging the cubes.

POSTED BY: David G

Yes indeed rotating it around in 3D is indeed unbearably slow (update every couple seconds)! Thanks for taking the time! It might be a Mac only thing...

POSTED BY: Sander Huisman
Posted 8 years ago

Also fast on Win 7, the cubes move around as fast as I can move the mouse.

POSTED BY: David Keith
Posted 8 years ago

Also fast on Win 7, the cubes move around as fast as I can move the mouse.

POSTED BY: David Keith

I can confirm this. I am also on OS X 10.11.3, late 2014 MacBook Pro retina.

The performance problem also affects the large mesh regions that I am working with at the moment. Example attached.

Attachments:
POSTED BY: Szabolcs Horvát

Your brain is still a bit moveable at 2-3 fps, but i would expect for my simple cubes, it should be able to do at couple hundred fps? (If i can imagine games like farcry or battlefield with many many polygons and physics computations run at 50-100Hz...)

I'm not sure what has caused this...

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract