Shading a patch that is behind another one in the light direction

2 ビュー (過去 30 日間)
Adina Stoica
Adina Stoica 2012 年 6 月 4 日
I am trying to make a lighting model on a set of leaves, and I am modeling the leaves as patches in Matlab. Unfortunately, when I have to 'leaves' behind each other, they both get lit, even if technically the one behind should be shaded (see image at https://dl.dropbox.com/u/43209398/Summer_Proj/results/shading.jpg). I've been trying to google this, but I couldn't find anything useful.
I am setting the light like this,
light('Position',lightPos,'Style','local');
The patches have, for now, these properties:
'FaceColor','green', 'EdgeColor', 'none',...,
'FaceLighting','phong',...
'SpecularExponent',1,...
'SpecularColorReflectance',0.2,'SpecularStrength',3,...
'FaceAlpha', 1,'AmbientStrength',0.0,...
'DiffuseStrength',0.0
Also, if I set 'FaceAlpha' to something smaller than 1 (eg 0.97), my images look completely different:
The results for the higher transparency level are closer to what I want, but the leaves still don't shade each other.
Any help would be appreciated. Thank you!

回答 (0 件)

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by