Edge-Artifact in Trisurf Rendering

4 views (last 30 days)
Justin
Justin on 28 Oct 2013
Answered: Justin on 31 Oct 2013
I'm rendering some asteroid shapes using trisurf. I'm attempting to get a feel for how they look under realistic lighting conditions, particularly with regard to shadowing. When I set a black background, it almost looks right. The only exception is a small 1-pixel wide edge artifact around the unlit side of the object. I looked at it in an external program that verified that the edge shouldn't be there.
I'm going to try to include an image below.
I've tried changing the material properties (specular, diffuse), the figure renderer (openGL, Zbuffer), the shading algorithm (phong, gouraud), and the "edgelighting" lighting property-- no luck yet.
Any ideas?
Thanks, Justin

Answers (1)

Justin
Justin on 31 Oct 2013
Looks like this error is associated with a surface parameter called "BackFaceLighting". It turns out that there's a decent write-up about this problem in the help documentation titled "Reflectance Characteristics of Graphics Objects".
Now I'm happy to report that I'm getting the right behavior. In addition, the matlab central anti-aliasing function (myaa.m) cleans up the edges.

Community Treasure Hunt

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

Start Hunting!