|
 |
"Bald Eagle" <cre### [at] netscape net> wrote:
> "yesbird" <nomail@nomail> wrote:
> > Hi, guys.
> > May be am asking too many questions, but I am new to POV and before asking
> > trying everything I can not for only one hour.
> >
> > Could you suggest the way of getting rid of artifact, markered on this image,
>
>
>
> I knew this was going to be a debugging nightmare, so I made a nice big Gin &
> Tonic, got out the Italian olive medley, and started fiddling.
>
>
> I have found out what your problem is, and it's directly related to what MatLab
> exports, and how you're trying to render it in POV-Ray.
>
> At first glance, it sort of seemed to me that some of the colors were getting
> "dragged" up into places that they shouldn't be. And that's sort of what's
> happening. I outlined each triangle to show the edges, and there was a
> pronounced matching of the colors with the edges of the grid - parabolas of
> color that followed the vertical slicing of the surface.
>
> What you WANT is a nice, gradient y pattern like I first suggested.
> What you're getting is a 3-color interpolation of the 3 vertex colors, which is
> blending colors from the wrong regions, and thus giving you the funny colors.
>
> What I did was "shrink" the triangles a bit, and plot spheres with the vertex
> colors at each vertex. Then I made a cylinder with a gradient going from the
> color of one vertex to the color of the other vertex. Then I did the same
> thing, only connecting all of the vertices to the triangle's center.
>
> This shows the geometry and the colors along with the way the colors are
> interpolated.
>...
Yes, I think you have found the reason for the artifacts. Good job!
Here's a web page about how to deal with this:
"How to blend colors across 2 triangles"
https://webglfundamentals.org/webgl/lessons/
webgl-qna-how-to-blend-colors-across-2-triangles.html
Nice image btw.
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
Post a reply to this message
|
 |