Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: objects with transparency rendered using opengl looks wrong in export
Date: Wed, 2 Jul 2008 01:43:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 54
Message-ID: <g4emf9$7fa$1@fred.mathworks.com>
References: <g4ctoc$5li$1@fred.mathworks.com> <g4cuqe$hr0$1@gemini.csx.cam.ac.uk>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1214962985 7658 172.30.248.37 (2 Jul 2008 01:43:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 2 Jul 2008 01:43:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1395525
Xref: news.mathworks.com comp.soft-sys.matlab:477022



tpl@eng.cam.ac.uk (Tim Love) wrote in message
<g4cuqe$hr0$1@gemini.csx.cam.ac.uk>...
> "Abe Lau" <abe@nonexistancegmail.com> writes:
> 
> >Hi all,
> >I have been trying to plot some datum points using plot3 to
> >a figure with a transparent surfaces created using patch and
> >isosurface.
> 
> >However, whenever I want to export the figure to png/pdf
> If you've not already done so, it's worth reading about
print's renderer
> and how it's chosen.
> 
> Note also that in matlab 7.4 "help print" says
>  There are cases, however, where the printed output is not
exactly
>  like the screen representation because of this. In these
instances
>  specifying -zbuffer or -opengl will more likely give you
output that
>  emulates the screen.
> (note, alas, the "more likely")

tpl, thx for your suggestion.  This is an interesting thing
to try!  but unfortunately this doesn't fix the wrong
viewpoint in the exported file.  The points which is
obviously in front of the transparent surface still looks
"behind" in the exported pdf

just an example:
load mri;
figure; patch(isosurface(squeeze(D), 10),...
    'FaceColor', [0.8 0.8 0.8],...
    'EdgeColor','none',...
    'FaceAlpha', 0.8,...
    'AmbientStrength', 0.5,...
    'DiffuseStrength', 0.1,...
    'SpecularColorReflectance', 1,...
    'SpecularExponent', 0.5,...
    'SpecularStrength', 0.5);
hold on; 
plot3(64,10,20, 'o',...
    'MarkerSize', 20,...
    'MarkerFaceColor', 'Blue')

The blue dot is obviously way in front of the head if you
rotate it, but when exported to pdf/png, the point looks as
if it's hidden inside the head!  Would that be something
wrong with my graphics card/OpenGL implementation?  would be
great if someone can try the above out and let me know if
they have the same issue or not.

Thanks