![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
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,
without increasing mesh density ? I would like to minimize rendering time and
achieve best quality.
Thanks in advance.
Post a reply to this message
Attachments:
Download 'surface3.png' (180 KB)
Preview of image 'surface3.png'
![surface3.png](/povray.general/attachment/%3Cweb.63d2365db6289f681ffa55cd10800fb2%40news.povray.org%3E/surface3.png?ttop=442896&toff=100&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Scene is here
Post a reply to this message
Attachments:
Download 'surface3.pov.txt' (2343 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"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,
>
> Thanks in advance.
I would say that the easiest way would be to get rid of all the pigment
statements and make a pigment {gradient y} and give it the color map that you
want. Then apply that to the entire mesh.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> I would say that the easiest way would be to get rid of all the pigment
> statements and make a pigment {gradient y} and give it the color map that you
> want. Then apply that to the entire mesh.
Thanks, I will try it.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
You're also making the scene/workflow uneccessarily complicated, since you're
starting off with an equation, converting to a mesh, and then having to deal
with lots of little triangles.
Likely your smoothest option would be to use an isosurface object and "graph"
the equation directly. You would then get the smoothness of a continuous
surface and not have to worry about artifacts caused by mismatched face/vertex
normals, especially when using reflection, and it would be "self-documenting"
since the equation would be in the code for the isosurface.
But admittedly, the approach to how you represent the surface depends on the end
use.
Nice that you have those smooth_triangles in there :)
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> Likely your smoothest option would be to use an isosurface object and "graph"
> the equation directly.
Thanks for this suggestion, I know about isosurface and this approach would be
the best, but the idea is to get data from Matlab's generated surface, including
colormap and render ray-traced equivalent. Now it looks following:
......
size = 60;
[X,Y,Z] = peaks(size);
s = surf(X,Y,Z);
pl.surface('surface', s, 'colormap', 'turbo', 'scale', [1, 1, 3/10]);
......
where 'pl' is POV object.
As you can see it works and results are acceptable, but not perfect.
I am planing to wrap _all_ POV entities entities in future and seriously extend
not only Matlab's visualization capabilities, but the way Matlab's users are
working with surfaces.
> Nice that you have those smooth_triangles in there :)
Yes, I have a special option for than in my API. )
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
hi,
"yesbird" <nomail@nomail> wrote:
> ...
> I am planing to wrap _all_ POV entities entities in future and seriously extend
> not only Matlab's visualization capabilities, but the way Matlab's users are
> working with surfaces.
that sounds like a real nice project. good luck + keep "us" in the loop,
please.
regards, jr.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
"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,
It seems to me that the artifact is present in every second triangle pair.
What is your XY grid resolution for that mesh ?
How are you calculating the vertex normals and the vertex colors ?
- And have you been careful to have the same clockwise or anticlockwise
order of the vertices in all the triangles?
I've tried to recrate your scene with my own macros and a pigment with
a gradient pattern, as Bill Walker suggested. See the attached image
for the result. The XY grid resolution is 50x50.
I can not see any such artifacts in that image.
If the problem persists after making sure that everything else is ok,
you can try to divide each quadrilateral into two triangles along it's
shortest diagonal. Alternatively you can divide it into two triangles
according to which of the two ways of doing it deviates less from the
surface (e.g. at the center of the quadrilateral).
--
Tor Olav
http://subcube.com
https://github.com/t-o-k
Post a reply to this message
Attachments:
Download 'surface3_tok.png' (247 KB)
Preview of image 'surface3_tok.png'
![surface3_tok.png](/povray.general/attachment/%3Cweb.63d701f2249f0076b75bdad789db30a9%40news.povray.org%3E/surface3_tok.png?ttop=442896&toff=100&preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
TOK,
He posted his scene here :
http://news.povray.org/povray.general/attachment/%3Cweb.63d236cb249f00761ffa55cd10800fb2%40news.povray.org%3E/surface3.
pov.txt
I'm not sure how the data is generated from MatLab in order to be exported to
triangles for POV-Ray, but I'm thinking that it might be better to export the
geometry for the mesh separately, and then run a macro in POV-Ray to calculate
the normals and color interpolation - or use the gradient y pigment.
I'm guessing that the normals are probably ok (?) and it's just the hard-coded
colors getting interpolated that throws it all off.
I'd have to dig through it all to see - but after I just did some more sorting
macro stuff to handle the function timing (other thread), maybe I could try to
sort the triangle vertices into a grid so that they can be put into a 2D array
and then reprocessed.
Purely as a sorting macro exercise for myself, which might prove useful to
someone else int he future.
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Tor, Bill,
Thanks for your attention to this problem.
> I'm not sure how the data is generated from MatLab in order to be exported to
> triangles for POV-Ray, but I'm thinking that it might be better to export the
> geometry for the mesh separately, and then run a macro in POV-Ray to calculate
> the normals and color interpolation - or use the gradient y pigment.
Probably a good idea, now all data: geometry, normals and colors is fetched
directly from structure returned by surface method without any modifications.
I will play with vertex order as Tor suggested, but please take into account
that effect is mostly visible on high elevation (along the vertical axis).
Playing with surface parameters:
.....
s = surf(x,y,z, FaceColor = 'interp', EdgeColor = 'interp');
.....
gives nothing, also increasing mesh density eliminates this effect, as was
expected.
> Purely as a sorting macro exercise for myself, which might prove useful to
> someone else int he future.
No doubt )
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |