Other Problem with VideoWriter and zbuffer renderer

2 Ansichten (letzte 30 Tage)
Paul
Paul am 3 Jan. 2012
Hello,
I just read the post http://www.mathworks.de/matlabcentral/answers/19731-videowriter-trouble-creating-the-example-peaks-avi, which helped me avoiding the faded, distorted always the first frame video.
But my sphere (surf) does then forget about the FaceAlpha 0.1 and plots a colormap onto the sphere.
My code is as follows:
vidobj = VideoWriter(moviename,'Motion JPEG AVI');
vidobj.FrameRate = 24;
open(vidobj);
for timeIdx = from_step_to
plot_Orbit(...);
set(gcf,'renderer','zbuffer');
F = getframe(gcf);
writeVideo(vidobj,F);
clf;
end
and
plot_Orbit(...) contains
...
%--- mesh visualization of Earth ----------
[X Y Z] = sphere(20);
X = X * r_earth;
Y = Y * r_earth;
Z = Z * r_earth;
hold on;
surf(X,Y,Z,'FaceAlpha',0.1);
which is neglected with the zBuffer renderer, but not with the OpenGL renderer, which on the other hand does not create a working video.
thx for any advice.

Akzeptierte Antwort

Titus Edelhofer
Titus Edelhofer am 3 Jan. 2012
Hi,
yes, OpenGL is the only renderer capable of transparency. I tried your example and it works fine for me (using OpenGL instead of zbuffer). You might try to use the software driver instead of hardware driver:
opengl software
will use a generic software driver. It's of course not using hardware acceleration but quite often shows less problems then hardware drivers.
Titus

Weitere Antworten (0)

Kategorien

Mehr zu Convert Image Type 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