it is Slow even with one of the best graphic cards
(512 Mb gddr3 etc etc & lates drivers )
any idea ?
thank you to all in advance
Tobias
tobias
set(GCF, 'Renderer','OpenGL');
is already there but rotate is extremly
slow
giaani
Tobias <tc-ng...@gmx.de> wrote in message
<5ugqcdF...@mid.dfncis.de>...
Which graphics card are you using? I have the same
experience, and posted a note to this newsgroup a few days
ago.
I am using an NVidia 8600GT card with 512MB of DDR3 VRAM,
and the card performs poorly on MATLAB's graphics benchmark
(which does a 3D rotation of the MATLAB symbol).
The card turns in stellar performance on Vista graphics
benchmarks. I don't understand why it is slow in MATLAB
(and a much slower ATI 2400 HD card turns out to be faster
in MATLAB, but slower on Vista graphics benchmarks!).
- Sridhar
My laptop running an ATI mobile GPU is much fast than both
in the bench 3D performance. I cannot understand why and
would like a fix too! :)
"Sridhar Mahadevan" <maha...@cs.umass.edu> wrote in message
<fm5e6n$9qj$1...@fred.mathworks.com>...
If you have access to some older versions, try 6.5. I find it better for
3d graphics performance (although there are a few bugs which have been
resolved in later versions).
You could also try running with Java disabled. There seems to be some
overhead in the java based figures.
--
Dr Tristram J. Scott
Energy Consultant
Hi,
It happens the same thing here. R13(6.5) is indeed faster but
its is still 2 to 3 times slower than my 3 years old ATI card
You can pass options to MATLAB on the command line wjhen you start it up.
My favourite is -nojvm. If I need java (e.g. for database toolbox or for
report generator) then I instead use -nodesktop.
matlab -nojvm
I'm not sure of an easy way to list all the java based functions. For the
m files you can look through them with grep, but that won't help with p
files. It also would not find the functions which call these functions.
Perhaps the best way is to turn java off, and then try your code and see if
it fails.
A couple of things first though:
- This has nothing to do with running java or not
- This has nothing to do with the renderer really
- This is not an issue of ATI vs. NVIDIA as I earlier speculated
The real problem is that the Quadro and GeForce drivers
(v169.xx) install with Vertical sync ON as the default. This
basically throttles back the GPU so that it only rendered
frames in sync with the refresh rate of your display;
generally removing tearing which occurs when your display
shows midframe between GPU renders.
The Matlab bench algorithm simply turns on shading then
alters the logo math and flushes the buffer with "drawnow"
command. If vsync is on, the CPU is running through the loop
but waiting each time for the gpu to render in sync with
your display when it flushes. In my case this was limiting
to about 60 fps (my LCD is @ 60Hz).
Here is the code:
set(task,'string','3-D')
drawnow
pause(1)
evalc('logo');
set(logoFig,'color',[.8 .8 .8])
s = findobj(logoFig, 'type','surf', 'tag',
'TheMathWorksLogo');
set(s,'facelighting','gouraud')
L1 = 40*membrane(1,25);
L2 = 10*membrane(2,25);
L3 = 10*membrane(3,25);
mu = sqrt([9.6397238445, 15.19725192, 2*pi^2]);
n = 40;
tic
for j = 0:n
t = 0.5*(1-j/n);
L = cos(mu(1)*t)*L1 + sin(mu(2)*t)*L2 + sin(mu(3)*t)*L3;
set(s,'zdata',L)
drawnow
end
times(k,6) = toc;
pause(1)
close(logoFig)
Turn off vsync in the nvidia control panel by setting
advanced 3d settings option there to FORCE OFF.
I notice no tearing in anything I do but drastically
increased 3D bench scores which absolutely kill the ATI
cards I have.
I hope this helps!
"Gianni Schena" <sch...@univ.trieste.it> wrote in message
<fltd35$8p6$1...@fred.mathworks.com>...
>
"Dan " <daniel....@ngc.com> wrote in message <g154n2
$8mg$1...@fred.mathworks.com>...
"Dan " <daniel....@ngc.com> wrote in message <g154n2$8mg$1...@fred.mathworks.com>...
I recently came across a java-based way of doing something similar to a "surf":
see File Exchange id:32344 "Hardware accelerated 3D viewer for MATLAB" and follow the instructions there.
Once installed, you can render a "surf(peaks(200))" by copy-pasting the following:
% start of snippet
Z= peaks(200);
Imin = min(Z(:));
Imax = max(Z(:));
I = uint8( 200 * (Z-Imin) / (Imax-Imin) );
Miji(false);
imp = MIJ.createImage('Fast surf(peaks(200))', I, false);
universe = ij3d.Image3DUniverse();
universe.show();
color = javax.vecmath.Color3f(240 / 255, 120 / 255, 20 / 255);
c = universe.addSurfacePlot(imp, ...
javax.vecmath.Color3f(), ...
'Matlab Peak in 3D', ...
1, ...
[true true true], ...
1);
c.showCoordinateSystem(true);
c.showBoundingBox(true);
universe.resetView();
c.setColor(color);
c.setTransform([1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1]);
universe.fireContentChanged(c);
universe.centerSelected(c);
universe.rotateUniverse(javax.vecmath.Vector3d(-1, -0.5, +0.2), +120 * pi / 180);
% end of snippet
You may need to increase Java's heap memory in MatLab's preferences.
If you try to "manually" rotate the rendered image using your mouse, it will much, much faster than doing the equivalent "surf(peaks(200))".
So, one thing is almost sure: MATLAB's 3D rendering is not based on Java's 3D API.