POV-Ray : Newsgroups : povray.text.scene-files : Stone wall hf and bitmap genration Server Time
1 Nov 2024 13:21:33 EDT (-0400)
  Stone wall hf and bitmap genration (Message 1 to 1 of 1)  
From: Gilles Tran
Subject: Stone wall hf and bitmap genration
Date: 12 Feb 2000 06:32:41
Message: <38A544ED.E8B01948@inapg.inra.fr>
#version unofficial Megapov 0.4;
#include "colors.inc"
// ----------------------------------------
// Gilles Tran 2000
// ----------------------------------------
// This file creates both a height field suitable for a stone wall and
the corresponding image_map
// You will need to make two renders, one for the height field and a
second one for the image_map
// Because both pigment use the same crackle algorithm they match
perfectly
// 1. Change the image size (ration is 10/1)
//    Run with +w2000 +h200 +FT for instance
// 2. Set the "Pass" variable to 0,
// 3. Run the file,
// 4. Rename the output image,
// 5. Set Pass to 1
// 6. Run again
// ----------------------------------------
// NOTE : The ratio of the image is 10/1

camera
{
  location  <0.0, 2, -5.0>
  direction 1.5*z
  right     10*x // THE RATIO OF THE IMAGE IS 10/1 !!!!
  look_at   <0.0, 2.0,  0.0>
}

background{White}
light_source{<1,1,-1>*1000 color White*2}
#declare Pass=0;         // Pass = 0 runs the height-field generation
//#declare Pass=1;         // Pass = 1 runs the image_map generation
                         // Don't forget to change the name of the
output file !!!!!

#if (Pass=0)
        #declare pigCrack=pigment{
                crackle
                turbulence 0.2
                color_map{
                        [0 color Black]
                        [0.05 color Black]
                        [0.2 color White*0.8]
                        [1 color White]
                }
                scale 0.2
        }
#else
        // Put your favorite stone colors here
        #declare colMur3=rgb <0.85938, 0.97063, 0.98047>; // gris bleu
clair
        #declare colMur5=rgb <160, 150, 124>/255; // beige 1
        #declare colMur6=rgb <170, 163, 146>/255; // beige 2
        #declare colMur7=rgb <209, 201, 181>/255; // beige 3

        #declare pigCrack=pigment{
                crackle solid
                turbulence 0.2
                color_map{
                        [0 color colMur3]
                        [0.33 color colMur5]
                        [0.66 color colMur6]
                        [1.0 color colMur7]
                }
                scale 0.2
        }
#end

plane{z,0
        texture{
                pigment{
                        gradient y
                        //turbulence 0.2
                        pigment_map{
                                [0 pigCrack scale 0.6]
                                [0.2 pigCrack scale 0.54]
                                [0.4 pigCrack scale 0.48]
                                [0.6 pigCrack scale 0.42]
                                [0.8 pigCrack scale 0.36]
                                [1 pigCrack scale 0.3]
                        }
                }

        }
        finish{ambient 1 diffuse 0}
        translate -y
        scale 4
}

/*
// Example of code for the final wall
#declare yMt=1;
#declare xMt=yMt*10;
#declare Wall=height_field{
                tga "wallhf"
                texture{pigment{image_map { tga "wallbmp" map_type 0
interpolate 2 once }} finish{ambient 0.0 diffuse 0.8 specular 0.05
roughness 0.01} rotate x*90}
                rotate x*-90
                scale <xMt,yMt,0.2>
        }
*/


Post a reply to this message

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