I found part of code that helped me 
%% Loop of images
for k = 1:2550 
   Z=surf(Di3(:,:,k));
   Z.LineStyle='none';
   axis tight manual 
   colormap jet
   set(gca,'nextplot','replacechildren');
    set(gcf,'Renderer','zbuffer');     % addition of this line helped me
   frame = getframe(gcf);              % and change in getframe
   writeVideo(v,frame);
end
close(v);


