Other Problem with VideoWriter and zbuffer renderer
2 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
採用された回答
Titus Edelhofer
2012 年 1 月 3 日
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
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!