POV-Ray : Newsgroups : povray.general : Strange rendering of a torus Server Time
7 Aug 2024 21:22:58 EDT (-0400)
  Strange rendering of a torus (Message 1 to 9 of 9)  
From: Bjorn Jonsson
Subject: Strange rendering of a torus
Date: 29 Apr 2001 17:28:36
Message: <MPG.155698bd1378c858989687@news.povray.org>
I'm having trouble getting a torus object to render properly. I've tried 
adding the sturm keyword but it seemed to have absolutely no effect on 
the torus' appearance. The torus appears "noisy", it's as if some of the 
rays do not hit it even though they should. It does not matter if the 
camera is near the object or far from it, the field of view ("angle") 
does not matter either, this appears regardless of whether the torus 
appears big or small in the rendering. Using antialiasing (or not using 
it) has no effect.

I'm using POV-Ray 3.1g running under Windows NT 4.

A small (17 KB) JPG image showing the problem can be seen at 
http://www.mmedia.is/~bjj/torus.jpg

FWIW my code looks like this:

torus  {
   66,33 sturm
   rotate x*90
   translate <-66,116,0>
   clipped_by {object {plane {<0,1,0>,116}}}
   clipped_by {object {plane {<-1,0,0>,66}}}
}

and later on:
   pigment {White}
   finish  {Dull}

(this same pigment/finish is also for a few cylinders which together with 
the torus are part of a union)

Bjorn


Post a reply to this message

From: Bjorn Jonsson
Subject: Re: Strange rendering of a torus (addendum)
Date: 29 Apr 2001 19:37:08
Message: <MPG.1556b6cb35345bd1989688@news.povray.org>
I'd like to add that the torus object never gets translated far from the 
origin (it's distance from (0,0,0) is approximately 1000).

Is it possible to use some additional keyword in addition to "sturm" to 
specify how to raytrace the torus ? Might specifying the torus directly 
as a quartic polynomial (how ?) instead of using the torus keyword solve 
this problem ?

Bjorn


Post a reply to this message

From: Alan Kong
Subject: Re: Strange rendering of a torus
Date: 29 Apr 2001 22:07:22
Message: <q2ipet4cijb6s9vn1bv6mkbrvo13qrlb4e@4ax.com>
On Sun, 29 Apr 2001 21:32:17 -0000 Bjorn Jonsson wrote:

>I'm having trouble getting a torus object to render properly. I've tried 
>adding the sturm keyword but it seemed to have absolutely no effect on 
>the torus' appearance. The torus appears "noisy", it's as if some of the 
>rays do not hit it even though they should.

  Where's the rest of your scene code? I rendered what you gave and added a
camera and light source but the resulting 90 degree 'elbow' looks fine to
me. Without seeing the cylinders in the union it looks to me that you might
be experiencing coincident surfaces. What do you see when you comment out
the other objects?

-- 
Alan - ako### [at] povrayorg - a k o n g <at> p o v r a y <dot> o r g
http://www.povray.org - Home of the Persistence of Vision Ray Tracer


Post a reply to this message

From: Bjorn Jonsson
Subject: Re: Strange rendering of a torus
Date: 30 Apr 2001 15:19:03
Message: <MPG.1557cbe625333b76989689@news.povray.org>
In article <q2ipet4cijb6s9vn1bv6mkbrvo13qrlb4e@4ax.com>, akong@povrayNO-
SPAM.org says...
> On Sun, 29 Apr 2001 21:32:17 -0000 Bjorn Jonsson wrote:
> 
> >I'm having trouble getting a torus object to render properly. I've tried 
> >adding the sturm keyword but it seemed to have absolutely no effect on 
> >the torus' appearance. The torus appears "noisy", it's as if some of the 
> >rays do not hit it even though they should.
> 
>   Where's the rest of your scene code? I rendered what you gave and added a
> camera and light source but the resulting 90 degree 'elbow' looks fine to
> me. Without seeing the cylinders in the union it looks to me that you might
> be experiencing coincident surfaces. What do you see when you comment out
> the other objects?

Here is a greatly simplified (my original POV file is about 2500 lines) 
version of what I'm doing:

#include "colors.inc"

camera  {
   location <-5000,-25000,-40000>
   look_at <300,-1300,-1500>
   angle 1
//   location <-500,-2500,-4000>
//   look_at <300,-1300,-1500>
//   angle 10
}

light_source {
  <-5000,-16000,-30000>
  color White
}

torus  {
   66,33 sturm
   rotate x*90
   translate <-66,116,0>
   rotate z*90 rotate y*180 translate <175.5,-970,-1027>
   pigment {White}
}

This reproduces the problem. However, if I change the camera/angle to the 
one that's commented out in the above code the problem disappears ??! 
This problem appears in most/all of the renderings I have made of the 
complete object. In many of these angle is close to 10 degrees and the 
camera is 5-10 times farther away from the object than in this 
example. This is the only POV primitive I'm having problems with in this 
particular model which contains many POV primitives (spheres, cylinders, 
cones, prisms, triangle meshes, CSG objects etc.). Does anyone know of a 
workaround ?

Bjorn


Post a reply to this message

From: Micha Riser
Subject: Re: Strange rendering of a torus
Date: 30 Apr 2001 19:30:39
Message: <3aedf59f$1@news.povray.org>
I can reprdouce the noisy torus here in all versions of pov under linux 
(official, megapov...). POV sometimes shows unexpected results when you use 
very large or very small numbers. Unfortunately large means already  around 
10000 in some cases. If you scale your whole scene by a factor 1/100 then 
the noise disappears. 

There are some magic constants in the pov source code which control that; 
so I could reduce an other such misbehavior (showing up with very small 
numbers and blobs) by changing one of the constants. Therefore it seems to 
me that some of these contants are chosen quite arbitrarly. (This might be 
a thread for p.programming to discuss about).

As I said scaling everything makes the noise disappear
e.g:

> 
> #include "colors.inc"
> 
> camera  {
>    location <-5000,-25000,-40000>
>    look_at <300,-1300,-1500>
>    angle 1
> //   location <-500,-2500,-4000>
> //   look_at <300,-1300,-1500>
> //   angle 10

scale .01  

> }
> 

union{

> light_source {
>   <-5000,-16000,-30000>
>   color White
> }
> 
> torus  {
>    66,33 sturm
>    rotate x*90
>    translate <-66,116,0>
>    rotate z*90 rotate y*180 translate <175.5,-970,-1027>
>    pigment {White}
> }

scale .01
}

will show the correct rendering.

- micha


Post a reply to this message

From: Markus Becker
Subject: Re: Strange rendering of a torus
Date: 10 May 2001 11:02:46
Message: <3AFAAF07.B6E809A4@aicoss.de>
Bjorn Jonsson wrote:
> 
> I'm having trouble getting a torus object to render properly. I've tried
> adding the sturm keyword but it seemed to have absolutely no effect on
> the torus' appearance. The torus appears "noisy", it's as if some of the

I would bet this is a "coincident surface" problem where the torus
meets the cylinders you did not mention here. Either cut the cylinders
to be shorter or make either the cylinders or the torus a little
bit smaller or larger.

Markus


Post a reply to this message

From: Anton Sherwood
Subject: Re: Strange rendering of a torus
Date: 13 May 2001 01:33:50
Message: <3AFE1CF4.C92C1D15@pobox.com>
> Bjorn Jonsson wrote:
> > I'm having trouble getting a torus object to render properly.
> > ... The torus appears "noisy", ...

Markus Becker wrote:
> I would bet this is a "coincident surface" problem where the
> torus meets the cylinders you did not mention here. ...

Somebody tell me how a cylinder and a (non-degenerate) torus can
coincide over a nonzero area?

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

From: Warp
Subject: Re: Strange rendering of a torus
Date: 13 May 2001 12:11:01
Message: <3afeb214@news.povray.org>
Anton Sherwood <bro### [at] poboxcom> wrote:
: Somebody tell me how a cylinder and a (non-degenerate) torus can
: coincide over a nonzero area?

  If the major radius of the torus is infinite? ;)

-- 
#macro N(D,I)#if(I<6)cylinder{M()#local D[I]=div(D[I],104);M().5,2pigment{
rgb M()}}N(D,(D[I]>99?I:I+1))#end#end#macro M()<mod(D[I],13)-6,mod(div(D[I
],13),8)-3,10>#end blob{N(array[6]{11117333955,
7382340,3358,3900569407,970,4254934330},0)}//                     - Warp -


Post a reply to this message

From: Anton Sherwood
Subject: Re: Strange rendering of a torus
Date: 14 May 2001 00:31:45
Message: <3AFF5FEA.CF310083@pobox.com>
> Anton Sherwood <bro### [at] poboxcom> wrote:
> : Somebody tell me how a cylinder and a (non-degenerate) torus
> : can coincide over a nonzero area?

Warp wrote:
>   If the major radius of the torus is infinite? ;)

Note the parenthesis, smartypants.  :P

-- 
Anton Sherwood  --  br0### [at] p0b0xcom  --  http://ogre.nu/


Post a reply to this message

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