Edge-Artifact in Trisurf Rendering

4 visualizzazioni (ultimi 30 giorni)
Justin
Justin il 28 Ott 2013
Risposto: Justin il 31 Ott 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

Risposte (1)

Justin
Justin il 31 Ott 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!

Translated by