POV-Ray : Newsgroups : povray.binaries.images : cobblestone (and again ...) : Re: cobblestone (and again ...) Server Time
7 Aug 2024 11:18:13 EDT (-0400)
  Re: cobblestone (and again ...)  
From: David El Tom
Date: 9 Mar 2006 16:54:07
Message: <4410a3ff@news.povray.org>
Mike Raiford wrote:
> 
> I like the stones in the very near foreground. (The ones that have the 
> spongy texture. How were they created?)
> 

thanks,...

If I've got it right you mean the curbstones. The Idea was that they shouldn't 
have this polished look like the cobble stones.
All stones are made via a template isosurface function which is then altered 
randomly by the placing macro.

for the cobblestone:

   #local COBBLESTONE_FUNC =
   function
   {
     // BASE SHAPE
     - f_superellipsoid(x,y,z,0.2,0.2) *5
     // PILLOWED LOOK
     - 1*cos(x*z)
   #if (!(PREVIEW))
     // STRUCTURE
     + 0.3*f_ridged_mf(3*(x+10*RAND1),3*(y+10*RAND2),3*(z+10*RAND3), 0.8, 4, 10, 
.01, 10, 3)
   #end
   }

and for the curbstones:

   #local CURBSTONE_FUNC =
   function(x,y,z)
   {
     // BASE SHAPE
     - f_superellipsoid(x,y/2,z/5,0.3,0.3)
   #if (!(PREVIEW))
     // STRUCTURE
     + .2* f_ridged_mf(x+20*RAND1,y+20*RAND2,z+20*RAND3,.2,10,12,0,6,3)
   #end
   }


The RAND1 ... RAND3 values are locals holding pseudo random numbers to make each 
stone individual. They have to be predefined as passing rand() in function 
invocation is not valid. I used the standard threshold of 0. Max Gradient was 
something between 5 and 8, so it renders quit fast: ~3000 isosurfaces; standard 
antialaising; 1000X500 -> ~35min on P4@3GHz/1GB.

These templates proofed to me to be quite flexible, as the superellipsoid as 
base shape can be from something spherical over cylindrical to completely box 
shaped. The ridged multi fractal on the other hand gives you a good control over 
the surface structure.
Sometimes it is a little bit of work to find a good parameter set.

So, try it out, as I think that these functions are a good starting point for 
doing any kind of stones,

.... dave


Post a reply to this message

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