Which renderer do you use?
Try set(handle_to_figure, 'renderer', 'opengl').
Tobias
> why is matlab so slow in 3d visualization (isosurface,
> isonormals, volume rotation in 3d etc) ?
>
> 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
set(GCF, 'Renderer','OpenGL');
is already there but rotate is extremly
slow
giaani
Tobias <tc-ng-spam@gmx.de> wrote in message
<5ugqcdF1ig1uuU1@mid.dfncis.de>...
> Which renderer do you use?
> Try set(handle_to_figure, 'renderer', 'opengl').
>
> Tobias
>
>
> > why is matlab so slow in 3d visualization (isosurface,
> > isonormals, volume rotation in 3d etc) ?
> >
> > 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
"Gianni Schena" <schena@univ.trieste.it> wrote in message
<fltd35$8p6$1@fred.mathworks.com>...
>
> why is matlab so slow in 3d visualization (isosurface,
> isonormals, volume rotation in 3d etc) ?
>
> 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
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!).
My experience is the same with nvidia-based Quadro cards and
an 8800 GT at home for some reason.
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" <mahadeva@cs.umass.edu> wrote in message
<fm5e6n$9qj$1@fred.mathworks.com>...
> "Gianni Schena" <schena@univ.trieste.it> wrote in message
> <fltd35$8p6$1@fred.mathworks.com>...
> >
> > why is matlab so slow in 3d visualization (isosurface,
> > isonormals, volume rotation in 3d etc) ?
> >
> > 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
>
>
> 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
>
Gianni Schena <schena@univ.trieste.it> wrote:
>
>
> tobias
>
> set(GCF, 'Renderer','OpenGL');
> is already there but rotate is extremly
> slow
> giaani
>
>
>
Which version of MATLAB do you use?
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.
tristram.scott@ntlworld.com (Tristram Scott) wrote in message
<ftTWj.28967$66.11712@newsfe20.ams2>...
> Gianni Schena <schena@univ.trieste.it> wrote:
> >
> >
> > tobias
> >
> > set(GCF, 'Renderer','OpenGL');
> > is already there but rotate is extremly
> > slow
> > giaani
> >
> >
> >
> Which version of MATLAB do you use?
>
> 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).
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
On May 15, 10:35 am, tristram.sc...@ntlworld.com (Tristram Scott)
wrote:
>
> You could also try running with Java disabled. There seems to be some
> overhead in the java based figures.
>
Yes, please, how can we disable Java? And how to find out which
functions are java-based. Thanks.
Igor
rych <rychphd@gmail.com> wrote:
> On May 15, 10:35 am, tristram.sc...@ntlworld.com (Tristram Scott)
> wrote:
>>
>> You could also try running with Java disabled. There seems to be some
>> overhead in the java based figures.
>>
> Yes, please, how can we disable Java? And how to find out which
> functions are java-based. Thanks.
> Igor
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.
OK, I figured out a solution for all of our NVIDIA-based PCs.
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" <schena@univ.trieste.it> wrote in message
<fltd35$8p6$1@fred.mathworks.com>...
>
> why is matlab so slow in 3d visualization (isosurface,
> isonormals, volume rotation in 3d etc) ?
>
> 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
The "bench" got about twice as fast with vsync disabled,
thnx
"Dan " <daniel.salluce@ngc.com> wrote in message <g154n2
$8mg$1@fred.mathworks.com>...
> OK, I figured out a solution for all of our NVIDIA-based
PCs.
>
> 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" <schena@univ.trieste.it> wrote in message
> <fltd35$8p6$1@fred.mathworks.com>...
> >
> > why is matlab so slow in 3d visualization (isosurface,
> > isonormals, volume rotation in 3d etc) ?
> >
> > 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
>
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.