POV-Ray : Newsgroups : povray.binaries.images : Two torii: parametric texture problem? Server Time
14 Aug 2024 18:02:18 EDT (-0400)
  Two torii: parametric texture problem? (Message 1 to 7 of 7)  
From: Greg M  Johnson
Subject: Two torii: parametric texture problem?
Date: 10 Sep 2002 14:07:36
Message: <3d7e34e8$1@news.povray.org>
light_source{<0,100,-50> color rgb 10}
background{blue 1}
#declare r0=2;
#declare r1=1;


#declare AMBIENT_VARIABLE=0;
#while(AMBIENT_VARIABLE<1.1)

parametric {
   function { cos(u)*(r0+r1*cos(v)) }
   function { sin(u)*(r0+r1*cos(v)) }
   function { r1*sin(v) }
   <0,0>, <2*pi,pi>
   contained_by { sphere{0, 4.1} }
   max_gradient .14
   accuracy 0.001  //  0.0001
   precompute 10 x,y,z
   texture{pigment {rgb 1}
   finish{ambient AMBIENT_VARIABLE}
   }
   translate 12*z+x*(-4+8*AMBIENT_VARIABLE)
}


#declare AMBIENT_VARIABLE=AMBIENT_VARIABLE+1;
#end


Post a reply to this message


Attachments:
Download 'torri.JPG' (5 KB)

Preview of image 'torri.JPG'
torri.JPG


 

From: Slime
Subject: Re: Two torii: parametric texture problem?
Date: 10 Sep 2002 14:47:26
Message: <3d7e3e3e@news.povray.org>
The only strangeness I see is that the black torus shouldn't be completely
black, since there's a light source, and its diffuse isn't set to zero.
Otherwise, everything looks correct.

But I don't know what direction we're looking at it from, since you haven't
included the whole scene.

In the future, you should mention what the problem *is*... or did you do
that in a different group somewhere?

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Greg M  Johnson
Subject: Re: Two torii: parametric texture problem?
Date: 10 Sep 2002 15:02:18
Message: <3d7e41ba$1@news.povray.org>
I thought it was a texture problem, where diffuse==0.
The whole scene file is included.


Post a reply to this message

From: hughes, b 
Subject: Re: Two torii: parametric texture problem?
Date: 10 Sep 2002 17:04:49
Message: <3d7e5e71@news.povray.org>
"Greg M. Johnson" <gregj:-)565### [at] aolcom> wrote in message
news:3d7e41ba$1@news.povray.org...
> I thought it was a texture problem, where diffuse==0.
> The whole scene file is included.

Camera is default, unused in script. Yes, that would seem to be so, the
diffuse isn't right or even the black torus would be white with a light
source color of 10.

Ah, now that I've rendered it I see it works okay here. I get a lit and
shadowed object on left side. I don't know what is wrong with that then.


Post a reply to this message

From: gregjohn
Subject: Re: Two torii: parametric texture problem?
Date: 10 Sep 2002 21:10:03
Message: <web.3d7e97d1f560142f37dc5dec0@news.povray.org>
hughes, b. wrote:
>
> Ah, now that I've rendered it I see it works
> okay here. I get a lit and shadowed object
> on left side. I don't know what is wrong
> with that then.
>

With two different PC's I get the left torus to be black.  Could you post
what you see?


Post a reply to this message

From: hughes, b 
Subject: Re: Two torii: nothing wrong here
Date: 10 Sep 2002 23:26:57
Message: <3d7eb801@news.povray.org>
Here it is, small but obvious enough. Only thing I had changed from the
first time I tried rendering is the light source color is only 1 instead of
10.

--
Farewell,
Bob


Post a reply to this message


Attachments:
Download '00.jpg' (4 KB)

Preview of image '00.jpg'
00.jpg


 

From: ABX
Subject: Re: Two torii: parametric texture problem?
Date: 11 Sep 2002 05:40:20
Message: <l73unus326ambu0o4ct8ihpdasrefqr917@4ax.com>
On Tue, 10 Sep 2002 14:06:38 -0400, "Greg M. Johnson" <gregj:-)565### [at] aolcom>
wrote:
>   contained_by { sphere{0, 4.1} }

There can be some bug in parametric code. Try change container to:

   contained_by { box{-4.1 4.1} }

in your scene. The image looks different. Left object is now partially white.
I have partially pointed what can cause bugs in parametric object in
http://news.povray.org/saqrmuoi41v5iqkclmmggtk06n8t32s789%404ax.com
Read also thread http://news.povray.org/povray.general/26669/ .

BTW: Looking at your script I have a note. Do you one you waste memory a lot ?
IIRC parametric object is internally optimized to share precomputed data
between instances. So you can save memory changing your object definition this
way:

#declare Parametric_Example=parametric {
   function { cos(u)*(r0+r1*cos(v)) }
   function { sin(u)*(r0+r1*cos(v)) }
   function { r1*sin(v) }
   <0,0>, <2*pi,pi>
   contained_by { sphere{0, 4.1} }
   max_gradient .14
   accuracy 0.001  //  0.0001
   precompute 10 x,y,z
}

#declare AMBIENT_VARIABLE=0;
#while(AMBIENT_VARIABLE<1.1)
  object {
    Parametric_Example
    texture{
      pigment {rgb 1}
      finish{ambient AMBIENT_VARIABLE}
    }
    translate 12*z+x*(-4+8*AMBIENT_VARIABLE)
  }
  #declare AMBIENT_VARIABLE=AMBIENT_VARIABLE+1;
#end

ABX


Post a reply to this message

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