POV-Ray : Newsgroups : povray.text.scene-files : IsoCactus Server Time
28 Jul 2024 12:34:55 EDT (-0400)
  IsoCactus (Message 1 to 2 of 2)  
From: Chris Huff
Subject: IsoCactus
Date: 24 Feb 2000 16:13:08
Message: <chrishuff_99-EF2879.16143224022000@news.povray.org>
// Here it is, complete with the awful textures.
// Unless you render with anti-aliasing and radiosity,
// you will get a lot of "static" around the areas with
// a high spine density.
// These radiosity settings were just taken from a
// MegaPOV example file.
// When I render it using radiosity, I got a huge number
// of these warnings:
// "bounds error, unreasonable size 141"
// However, they did not interrupt the rendering, and I just
// closed the status window and let it complete rendering.


#include "colors.inc"
#version unofficial MegaPov 0.4;

global_settings {
   assumed_gamma 1
   ambient_light 0
// ini_option "+QR"
// ini_option "Preview_Start_Size=8"
// ini_option "Preview_End_Size=4"

   radiosity{
      count 50             // CHANGE range from 20 to 150
      nearest_count 5      // CHANGE range from 3 to 10
      error_bound 1        // CHANGE - range from 1 to 3 - should 
correspond with Preview_End_Size
                            //   1 : preview_end_size = 4
                            //   3 : preview_end_size = 8
                            //   use preview_start_size = 16 (or 8 for 
high quality)
                            // you can go lower than 1, but then you 
probably will want to set
                            // preview_end_size to 2, which is really 
slow
      recursion_limit 4    // CHANGE
       
      low_error_factor .5  // leave this
      gray_threshold 0.0   // leave this
      minimum_reuse 0.015  // leave this
      brightness 1         // leave this

      max_sample 2         // CHANGE - this should be the same as the 
brightest object
      adc_bailout 0.01/2   // CHANGE - use adc_bailout = 0.01 / 
brightest_ambient_object
   }
}
background {color White}
sky_sphere {
   pigment {gradient y
      color_map {
         [0 color Blue*0.6]
         [1 color White]
      }
   }
}
// ----------------------------------------
camera {
   location <0, 3.5,-8>
   up y*image_height right x*image_width
   angle 30
   look_at <0, 0.5, 0>
}
// ----------------------------------------
plane {y, 0
   texture {
      pigment {color rgb < 0.9, 0.9, 0.5>}
      normal {average
         normal_map {
            [1 granite 0.5 scale 0.005]
            [1 waves 0.1 scale 25]
         }
      }
      finish {brilliance 2}
   }
}

// Could be replaced with one of the other trig functions, like atan2()
#declare TH = function {"TH"}

#declare cactusBody =
isosurface {
   function {sqrt(sqr(x) + sqr(y-sqrt(sqr(x/2)+sqr(z/2))*1.5) + sqr(z)) 
- 1 -
      (sin(atan2(x, z)*18)*0.1)
//    (sin(TH(x, y, z)*18)*0.1)
   }
   threshold 0
   eval
   contained_by {sphere {< 0, 0, 0>, 3.1}}
   accuracy 0.001
   texture {
      pigment {color rgb < 0.3, 0.85, 0.4>*0.8}
   }
   scale < 1, 0.75, 1>
   translate y*0.35
   double_illuminate
}
#declare rs = seed(4654786);
union {
   object {cactusBody}
   #declare J=0;
   #while(J<18)
      #declare K=0;
      #while(K<20)
         #declare Orig = vrotate(-z*5, x*(K*90/20));
         #declare Orig = vrotate(Orig, y*(360*J/18 + 360/72));
         #declare PtNorm = y;
         #declare Pt = trace(cactusBody, Orig,-Orig, PtNorm);
         #declare L=0;
         #while(L<5)
            #declare NewNorm = PtNorm + (< rand(rs), rand(rs), 
rand(rs)>*2 - 1);
            cone {Pt, 0.01, Pt+vnormalize(NewNorm)*0.25, 0
               texture {pigment {color rgb < 0.98, 0.98, 0.5>}}
               bounded_by {cylinder {Pt, Pt+vnormalize(NewNorm)*0.25, 
0.011}}
            }
            #declare L=L+1;
         #end
         #declare K=K+1;
      #end
      #declare J=J+1;
   #end
}

// ----------------------------------------


light_source {<-20, 30, -30>*3 color White}

-- 
Chris Huff
e-mail: chr### [at] yahoocom
Web page: http://chrishuff.dhs.org/


Post a reply to this message

From: Bob Hughes
Subject: Re: IsoCactus
Date: 25 Feb 2000 02:30:18
Message: <38b62f8a@news.povray.org>
I tried this out and found the line:
 bounded_by {cylinder {Pt, Pt+vnormalize(NewNorm)*0.25, 0.011}}
was causing a unnecessary bounding error to occur, so I guess that's part of the
problem you mentioned.  Commenting it out seemed to make no difference in the
rendered image or rendering time.
The camera is said to not have perpendicular vectors and commenting out the up
and right line in it is corrects the warning.
I see what you mean about the "static" caused by not antialiasing those spines.
Makes you're render of it, which was posted at p.b.i., all the better than the
one I've seen here so far.  Amazing how the radiosity, without any AA used,
makes it look okay though.

Bob


Post a reply to this message

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