Descriptions et exemples pour le POV-Ray raytracer par Friedrich A. Lohmüller,
traduit en français par Henri Girard.
English English English
Deutsch Deutsch

» material_map « Textures Superposition de textures:
» layered textures «

Conception de Surface en »texture«

Intégrer des images en surfaces: » image_map{ ... } «


// Exemple pour » image_map{...} « :

Sample image_map 640x480

sphere{<0,0,0>, 1
   texture{
    pigment{
     // mapps an image on the xy plane
     // von <0,0,0> bis <1,1,0>
     // (aspect ratio 1:1)
     image_map{ gif "plasma3.gif"
     // imagetype "file name" - Path + .tga etc.
     // accepted types of images:  gif, tga, iff, ppm, pgm, png, jpeg, tiff, sys
     map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus
     interpolate 2
      // 0=none, 1=linear, 2=bilinear, 4=normalized distance
     once //
      }} // end of image_map, end of pigment
    finish {ambient 0.15 diffuse 0.85 phong 1}// end of finish
     scale 2 translate<-1,-1,0>} // end of texture
  translate<0.5,1.2,0>} // end of sphere  ------------------


Si on veut projeter une image nommée » MyImage.tga « avec un rapport hauteur/longueur de = 3:4 dans une surface d'une hauteur (direction des y) de 0.90 et la longueur (direction des x) de 1.20 on doit mettre à l'échelle l'image projetée de façon appropriée :

// Exemple :


Sample image_map 640x480

box{<0,0,0>, <1.20, 0.90,0.01>
     texture{ pigment { image_map{ gif "CGrafLo.gif"
                        map_type 0 interpolate 2 once }
                        scale <1.20,0.90,1> }
              finish  { ambient 0.1 diffuse 0.9 phong 1}}
     scale 2.5 rotate<0,W1,0> translate<-1.2,0.3,0>}

» material_map « Textures Superposition de textures:
» layered textures «

© Friedrich A. Lohmüller, 2005
email email: (legacy email redacted)
homepage:www.f-lohmueller.de