POV-Ray : Newsgroups : povray.general : Mega-Pov or V3.5? : Re: Mega-Pov or V3.5? Server Time
7 Aug 2024 05:18:54 EDT (-0400)
  Re: Mega-Pov or V3.5?  
From: Ron Parker
Date: 29 Jan 2002 23:00:20
Message: <slrna5eruo.st1.ron.parker@fwi.com>
/* 
On 29 Jan 2002 22:26:26 -0500, Ron Parker wrote:
> On Wed, 30 Jan 2002 04:21:21 +0100, Zeger Knaepen wrote:
>>> True.  Personally, I don't understand why you can't use a texture_map in a
>>> layered texture.  Let me investigate that a little further.
>> tnx :)
> 
> Well, looking at the code, the main reason is that it would be a major 
> rewrite if it were possible at all.  But don't lose hope.

Okay, for those of you who didn't lose hope, I have something resembling
good news.  It's true that you can't layer over texture maps.  But the 
next best thing is to not have to use a texture map.

Notes: 
 
- This won't work with blurred refraction.  POV uses only the normal
  of the top layer to spawn a refracted ray.  Sorry, but this isn't
  likely to change in the near future.
- The limit on the number of layers you can have in a single texture
  is currently 20, so you can't use more than 20 samples minus the
  number of other layers you want to use.  I'm not sure, but I think 
  that number doesn't need to be so low.
- Note the changes from the VFAQ example: the pigment is only on the
  lowest layer, and the reflection amount must be divided by the number
  of samples (this division happens automatically in average texture_maps)
*/

#declare BlurAmount = .2; // How blurred the reflection should be  
#declare BlurSamples = 10; // How many reflected rays to shoot

camera {location <0,1,-5> look_at y}
plane { y 0 
  finish {ambient 1} 
  pigment {gradient x color_map {[0 red 1][1 blue 1]} scale .5}
}

cylinder {0 5*y 1
  texture {
    pigment { color rgb 0 } // The pigment of the object here
  } 
  #declare Ind = 0; 
  #declare S = seed(0); 
  #while(Ind < BlurSamples) 
    texture {
      pigment {color rgbt 1}
      finish { reflection .9/BlurSamples}
      normal { bumps 
        BlurAmount 
        translate <rand(S),rand(S),rand(S)>*10
        scale 1000 
      } 
    } 
    #declare Ind = Ind+1; 
  #end 
}

-- 
plane{-z,-3normal{crackle scale.2#local a=5;#while(a)warp{repeat x flip x}rotate
z*60#local a=a-1;#end translate-9*x}pigment{rgb 1}}light_source{-9red 1rotate 60
*z}light_source{-9rgb y rotate-z*60}light_source{9-z*18rgb z}text{ttf"arial.ttf"
"RP".01,0translate-<.6,.4,.02>pigment{bozo}}light_source{-z*3rgb-.2}//Ron Parker


Post a reply to this message

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