POV-Ray : Newsgroups : povray.binaries.images : An artifact when rendering torus(negative major_r) Server Time
3 May 2024 07:00:58 EDT (-0400)
  An artifact when rendering torus(negative major_r) (Message 11 to 19 of 19)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Stephen
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 9 Apr 2015 06:33:02
Message: <5526555e$1@news.povray.org>
On 09/04/2015 07:33, And wrote:
> ... this is what I rendered.

That is the pattern I got when I used your original code. But something 
looks wrong with the shading and shadows. So I did a series of renders 
with a simpler material that is matt. I orbited the light around your 
shape and included a couple of primitives (two spheres and a lathe) 
using the same texture, for comparison. The Blue arrow points to the light.
Unless someone can explain it by the shape of the object. It looks like 
a bug to me.

Light orbiting horizontally
https://youtu.be/iOffuoxXjYo

Light orbiting horizontally at 45 deg
https://youtu.be/rz9dS-cCHAs

Light orbiting in vertical plane
https://youtu.be/X1EUq1VCXgY


-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 9 Apr 2015 12:17:24
Message: <5526a614@news.povray.org>
Am 09.04.2015 um 12:33 schrieb Stephen:
> On 09/04/2015 07:33, And wrote:
>> ... this is what I rendered.
>
> That is the pattern I got when I used your original code. But something
> looks wrong with the shading and shadows. So I did a series of renders
> with a simpler material that is matt. I orbited the light around your
> shape and included a couple of primitives (two spheres and a lathe)
> using the same texture, for comparison. The Blue arrow points to the light.
> Unless someone can explain it by the shape of the object. It looks like
> a bug to me.

Thanks for experimenting with this.

Yes, this certainly is a bug. I haven't looked at the code yet, but 
judging from the effect I would assume that the surface normal at a 
given intersection point is computed as the (normalized) vector from the 
closest point on the "centroid circle" to the surface point; obviously 
this breaks down for the inner spindle of a spindle torus.

Is this the Poly_Torus or the inbuilt torus primitive?


Post a reply to this message

From: Stephen
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 9 Apr 2015 12:48:59
Message: <5526ad7b$1@news.povray.org>
On 09/04/2015 17:17, clipka wrote:
> Thanks for experimenting with this.
>

No problem. It was bugging me.

Interesting effect.

https://youtu.be/IMu4EEgtbdU

One of the other tests.
The arrow is pointing at the parallel light source.


> Yes, this certainly is a bug. I haven't looked at the code yet, but
> judging from the effect I would assume that the surface normal at a
> given intersection point is computed as the (normalized) vector from the
> closest point on the "centroid circle" to the surface point; obviously
> this breaks down for the inner spindle of a spindle torus.
>

Obviously.

> Is this the Poly_Torus or the inbuilt torus primitive?


The inbuilt torus primitive. Rendered in Ver 3.62



-- 

Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 9 Apr 2015 15:01:04
Message: <5526cc70$1@news.povray.org>
Am 09.04.2015 um 18:17 schrieb clipka:

> Yes, this certainly is a bug. I haven't looked at the code yet, but
> judging from the effect I would assume that the surface normal at a
> given intersection point is computed as the (normalized) vector from the
> closest point on the "centroid circle" to the surface point; obviously
> this breaks down for the inner spindle of a spindle torus.

And that's exactly what's happening.

I've just submitted a fix to GitHub 
(https://github.com/POV-Ray/povray/commit/c3551f249c89ffc817a4deb2acea0412a0b9913f).


Post a reply to this message

From: clipka
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 9 Apr 2015 15:30:01
Message: <5526d339$1@news.povray.org>
Am 09.04.2015 um 21:01 schrieb clipka:
> Am 09.04.2015 um 18:17 schrieb clipka:
>
>> Yes, this certainly is a bug. I haven't looked at the code yet, but
>> judging from the effect I would assume that the surface normal at a
>> given intersection point is computed as the (normalized) vector from the
>> closest point on the "centroid circle" to the surface point; obviously
>> this breaks down for the inner spindle of a spindle torus.
>
> And that's exactly what's happening.
>
> I've just submitted a fix to GitHub
> (https://github.com/POV-Ray/povray/commit/c3551f249c89ffc817a4deb2acea0412a0b9913f).

BTW, the intention of the new implementation is that a spindle torus 
(one that intersects itself) behaves like a union, i.e.:

- the spindle volume (the volume of self-intersection) is considered to 
be inside the torus

- the spindle surface is visible (provided you find a way to look 
through the regular torus surface), and textured as a straightforward 
continuation of the regular torus surface; most notably, when using an 
interior_texture, the spindle surface's side facing the coordinate 
origin uses the interior_texture, while the other side uses the regular 
texture.

(If someone wants to do me a favor, can you please test whether the UV 
mapping on the spindle surface makes sense.)


Also, specifying either a negative major or minor radius now has the 
same effect as using the "inverse" keyword, but prompts a parse warning. 
(Specifying both a negative major and minor radius negates the effect, 
but will prompt two warnings.)


Post a reply to this message

From: Stephen
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 10 Apr 2015 04:35:48
Message: <55278b64$1@news.povray.org>
On 09/04/2015 20:29, clipka wrote:
> Am 09.04.2015 um 21:01 schrieb clipka:
>> Am 09.04.2015 um 18:17 schrieb clipka:
>>
>>> Yes, this certainly is a bug. I haven't looked at the code yet, but
>>> judging from the effect I would assume that the surface normal at a
>>> given intersection point is computed as the (normalized) vector from the
>>> closest point on the "centroid circle" to the surface point; obviously
>>> this breaks down for the inner spindle of a spindle torus.
>>
>> And that's exactly what's happening.
>>
>> I've just submitted a fix to GitHub
>>
(https://github.com/POV-Ray/povray/commit/c3551f249c89ffc817a4deb2acea0412a0b9913f).
>>
>
> BTW, the intention of the new implementation is that a spindle torus
> (one that intersects itself) behaves like a union, i.e.:
>


Nice one Clipka. :-D

I had better leave the compiling to someone who can do it.


-- 

Regards
     Stephen


Post a reply to this message

From: And
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 10 Apr 2015 12:05:01
Message: <web.5527f3c088bb499a5335aca40@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 09.04.2015 um 21:01 schrieb clipka:
> >
> > I've just submitted a fix to GitHub
> >
(https://github.com/POV-Ray/povray/commit/c3551f249c89ffc817a4deb2acea0412a0b9913f).
>
> BTW, the intention of the new implementation is that a spindle torus
> (one that intersects itself) behaves like a union, i.e.:
>
> - the spindle volume (the volume of self-intersection) is considered to
> be inside the torus
>
> - the spindle surface is visible (provided you find a way to look
> through the regular torus surface), and textured as a straightforward
> continuation of the regular torus surface; most notably, when using an
> interior_texture, the spindle surface's side facing the coordinate
> origin uses the interior_texture, while the other side uses the regular
> texture.
>
> (If someone wants to do me a favor, can you please test whether the UV
> mapping on the spindle surface makes sense.)
>
>
> Also, specifying either a negative major or minor radius now has the
> same effect as using the "inverse" keyword, but prompts a parse warning.
> (Specifying both a negative major and minor radius negates the effect,
> but will prompt two warnings.)

Hum! Thank you very much. But from the point of view of equation, a negative
major or minor radius should produce the same geometry as the positive one.

I can't compile it, too.


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 11 Apr 2015 22:00:01
Message: <web.5529d14e88bb499a71b41f500@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 09.04.2015 um 12:33 schrieb Stephen:
> > On 09/04/2015 07:33, And wrote:
> >> ... this is what I rendered.
> >
> > That is the pattern I got when I used your original code. But something
> > looks wrong with the shading and shadows. So I did a series of renders
> > with a simpler material that is matt. I orbited the light around your
> > shape and included a couple of primitives (two spheres and a lathe)
> > using the same texture, for comparison. The Blue arrow points to the light.
> > Unless someone can explain it by the shape of the object. It looks like
> > a bug to me.
>
> Thanks for experimenting with this.
>
> Yes, this certainly is a bug. I haven't looked at the code yet, but
> judging from the effect I would assume that the surface normal at a
> given intersection point is computed as the (normalized) vector from the
> closest point on the "centroid circle" to the surface point; obviously
> this breaks down for the inner spindle of a spindle torus.

This ancient thread might be relevant:

Newsgroup: povray.binaries.images
From: Tor Olav Kristensen
Subject: Torus problem (69KB)
Date: 21st April 2000
http://news.povray.org/povray.binaries.images/thread/%3C38FFC5BF.757B1EBB%40hotmail.com%3E

--
Tor Olav
http://subcube.com


Post a reply to this message

From: clipka
Subject: Re: An artifact when rendering torus(negative major_r)
Date: 12 Apr 2015 01:58:28
Message: <552a0984$1@news.povray.org>
Am 12.04.2015 um 03:58 schrieb Tor Olav Kristensen:
> clipka <ano### [at] anonymousorg> wrote:
>>
>> Yes, this certainly is a bug. I haven't looked at the code yet, but
>> judging from the effect I would assume that the surface normal at a
>> given intersection point is computed as the (normalized) vector from the
>> closest point on the "centroid circle" to the surface point; obviously
>> this breaks down for the inner spindle of a spindle torus.
>
> This ancient thread might be relevant:
>
> Newsgroup: povray.binaries.images
> From: Tor Olav Kristensen
> Subject: Torus problem (69KB)
> Date: 21st April 2000
>
http://news.povray.org/povray.binaries.images/thread/%3C38FFC5BF.757B1EBB%40hotmail.com%3E

It's pretty irrelevant insofar as I don't need it to debug or fix the 
issue reported by And - I've already done that by now :)

But yes, the issue you reported back then might be related indeed.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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