POV-Ray : Newsgroups : povray.general : Smooth level for smooth_triangle. Server Time
27 Jul 2024 08:07:11 EDT (-0400)
  Smooth level for smooth_triangle. (Message 37 to 46 of 56)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: GioSeregni
Subject: Re: Smooth level for smooth_triangle.
Date: 23 Nov 2023 18:15:00
Message: <web.655fdc1284c692a3276109cb59126100@news.povray.org>
ok, after two days of going crazy I implemented a drastic and elementary
control. Then later I will see how to improve with the "weights" and the
individual vertices, but now I have chosen the simplest path.
I work with normalized normals. So, if two normals make an angle of about 90
degrees, their normalized distance is about 1.41
Around this value I abandon the smooth and use the simple triangle.
I still have a lot to work on, I will find many special cases along the way, but
in this rough way I get rid of the most conspicuous artefacts.


Post a reply to this message


Attachments:
Download 'smoothed.png' (16 KB)

Preview of image 'smoothed.png'
smoothed.png


 

From: GioSeregni
Subject: Re: Smooth level for smooth_triangle.
Date: 23 Nov 2023 18:50:00
Message: <web.655fe4d784c692a3276109cb59126100@news.povray.org>
1024x768 AA
22 minutes on my old notebook with win 10. I think I'll get half that on win 11
with the new one. I'll try tomorrow.
The concept is this


.....
distance=SQR( ((xNS-NormX1)^2)+((yNS-NormY1)^2)+((zNS-NormZ1)^2))
if distance > 1.38 and distance < 1.45 then NoNorm=1
....
distance=SQR( ((xNS-NormX2)^2)+((yNS-NormY2)^2)+((zNS-NormZ2)^2))
if distance > 1.38 and distance < 1.45 then NoNorm=1
....
distance=SQR( ((xNS-NormX2)^2)+((yNS-NormY2)^2)+((zNS-NormZ2)^2))
if distance > 1.38 and distance < 1.45 then NoNorm=1
......


Post a reply to this message


Attachments:
Download 'clipboard01.png' (254 KB)

Preview of image 'clipboard01.png'
clipboard01.png


 

From: jr
Subject: Re: Smooth level for smooth_triangle.
Date: 24 Nov 2023 11:00:00
Message: <web.6560c7ac84c692a3f11225116cde94f1@news.povray.org>
hi,

"GioSeregni" <gms### [at] hotmailcom> wrote:
> 1024x768 AA
> 22 minutes on my old notebook with win 10. I think I'll get half that on win 11
> with the new one. I'll try tomorrow.

is that a large pizza and sides ?!  </grin>


regards, jr.


Post a reply to this message

From: GioSeregni
Subject: Re: Smooth level for smooth_triangle.
Date: 24 Nov 2023 14:00:00
Message: <web.6560f1d984c692a3276109cb59126100@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "GioSeregni" <gms### [at] hotmailcom> wrote:
> > 1024x768 AA
> > 22 minutes on my old notebook with win 10. I think I'll get half that on win 11
> > with the new one. I'll try tomorrow.
>
> is that a large pizza and sides ?!  </grin>
>
>
> regards, jr.

no no, lol, ebay or amazon!
Today a new trouble (solved).
Some incorrect results by same points.
Same for me, but not for "single". the "doubles" does not have this problem, the
"single", after operations, can to became x.00000000 like x.99999999999999 or
something similar
In fact Autolisp, for example, in comparison for "=" or "equal", has the option
that you can to use to define the small irrilevant difference.
but which is very relevant when I look for identities in my points cloud
(vertices), and that I have to cut in the comparison, or the comparison does not
work.
I'll have to add a filter...
BR
G.


Post a reply to this message

From: GioSeregni
Subject: Re: Smooth level for smooth_triangle.
Date: 24 Nov 2023 16:20:00
Message: <web.6561137284c692a3276109cb59126100@news.povray.org>
well, I have a little question because I have often read about "artifact" on
sooth_triangle but I don't understand. It is very difficult for me to translate
technical language and figurative sayings. Now I have started translating the
include files of my PovRay library that I interface with CAD, triangle to
smooth_triangle.
This wheel has black corners (two), on the right. Are these common artifacts, or
can I fix them?
Thanx in advanced!
G.


Post a reply to this message


Attachments:
Download 'clipboard01.png' (168 KB)

Preview of image 'clipboard01.png'
clipboard01.png


 

From: Bald Eagle
Subject: Re: Smooth level for smooth_triangle.
Date: 24 Nov 2023 18:25:00
Message: <web.6561305284c692a31f9dae3025979125@news.povray.org>
"GioSeregni" <gms### [at] hotmailcom> wrote:
> well, I have a little question because I have often read about "artifact" on
> sooth_triangle but I don't understand. It is very difficult for me to translate
> technical language and figurative sayings. Now I have started translating the
> include files of my PovRay library that I interface with CAD, triangle to
> smooth_triangle.
> This wheel has black corners (two), on the right. Are these common artifacts, or
> can I fix them?
> Thanx in advanced!
> G.

I think you might be seeing the same bug that I've been seeing.

instead of pigment, try using (_BOTH_)

texture {pigment {rgb 0.1} finish {specular 0.4}}
interior_texture {pigment {rgb x*0.2} finish {emission 1}}

And see if those "corners" turn red.
If so, we're seeing the underside of those triangles, when we shouldn't.

- BW


Post a reply to this message

From: GioSeregni
Subject: Re: Smooth level for smooth_triangle.
Date: 24 Nov 2023 18:55:00
Message: <web.6561377784c692a3276109cb59126100@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "GioSeregni" <gms### [at] hotmailcom> wrote:
> > well, I have a little question because I have often read about "artifact" on
> > sooth_triangle but I don't understand. It is very difficult for me to translate
> > technical language and figurative sayings. Now I have started translating the
> > include files of my PovRay library that I interface with CAD, triangle to
> > smooth_triangle.
> > This wheel has black corners (two), on the right. Are these common artifacts, or
> > can I fix them?
> > Thanx in advanced!
> > G.
>
> I think you might be seeing the same bug that I've been seeing.
>
> instead of pigment, try using (_BOTH_)
>
> texture {pigment {rgb 0.1} finish {specular 0.4}}
> interior_texture {pigment {rgb x*0.2} finish {emission 1}}
>
> And see if those "corners" turn red.
> If so, we're seeing the underside of those triangles, when we shouldn't.
>
> - BW

THANKS! You are right, the red is here (elevated to see it better).
This knowledge is very useful! Many thanks again!
G.


Post a reply to this message


Attachments:
Download 'clipboard01.png' (75 KB)

Preview of image 'clipboard01.png'
clipboard01.png


 

From: Bald Eagle
Subject: Re: Smooth level for smooth_triangle.
Date: 24 Nov 2023 19:10:00
Message: <web.65613abb84c692a31f9dae3025979125@news.povray.org>
"GioSeregni" <gms### [at] hotmailcom> wrote:

> THANKS! You are right, the red is here (elevated to see it better).
> This knowledge is very useful! Many thanks again!
> G.

Well, you're _supposed to_ see _that_ red - those are the undersides of the open
mesh - the inside of the tire.

You were talking about the "corners" on the upper right of the tire, which
should be smooth, and the same color as the rest of the tire.

And if you DO see red there, then try moving the camera around, and viewing it
from different angles - because it may just disappear and pop up in different
areas.

- BW


Post a reply to this message

From: GioSeregni
Subject: Re: Smooth level for smooth_triangle.
Date: 25 Nov 2023 03:45:00
Message: <web.6561b27884c692a3276109cb59126100@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "GioSeregni" <gms### [at] hotmailcom> wrote:
>
> > THANKS! You are right, the red is here (elevated to see it better).
> > This knowledge is very useful! Many thanks again!
> > G.
>
> Well, you're _supposed to_ see _that_ red - those are the undersides of the open
> mesh - the inside of the tire.
>
> You were talking about the "corners" on the upper right of the tire, which
> should be smooth, and the same color as the rest of the tire.
>
> And if you DO see red there, then try moving the camera around, and viewing it
> from different angles - because it may just disappear and pop up in different
> areas.
>
> - BW

I think you are just looking at preview image. If you open it you will also see
the triangles of the right we are talking about. I kept about the same point of
view just to check on my first image. It seems that they always arise on the
perimeter of the volumes (in positions tangential to the cone of vision)...
However, the internal color makeup is useful, it can help mask a bit the bug.
I think you could mask it a bit with a generic "finish" using the outer color of
the face
Thanks!
G.


Post a reply to this message

From: Kenneth
Subject: Re: Smooth level for smooth_triangle.
Date: 25 Nov 2023 05:00:00
Message: <web.6561c4c584c692a39b4924336e066e29@news.povray.org>
"GioSeregni" <gms### [at] hotmailcom> wrote:
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> >
> > And if you DO see red there, then try moving the camera around, and viewing it
> > from different angles - because it may just disappear and pop up in different
> > areas.
>
> It seems that they always arise on the
> perimeter of the volumes (in positions tangential to the cone of vision)...

Yes, that is where those artifacts sometimes appear on a smooth-triangle object.
I think it also depends on the lighting angle, and maybe even the size of the
triangles.

What you are seeing is a known effect of raytracing the smooth normals when they
are viewed at that raking angle. (I thought that there was a short technical
explanation of this in the documentation, but I cannot find it.) The camera is
picking up the unlighted (black) interior of the object.

If I make a low-rez height_field and add the 'smooth' keyword, the same thing
happens. The interior_texture trick is one way to try and make these artifacts
less noticable. Or try adding the 'double_illuminate' keyword to the object. If
I recall, this was a recommended 'fix' for the problem. It seems to work most of
the time, but not in every situation.


Post a reply to this message


Attachments:
Download 'smooth_triangle artifacts_kw.jpg' (87 KB)

Preview of image 'smooth_triangle artifacts_kw.jpg'
smooth_triangle artifacts_kw.jpg


 

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.