Beschreibungen und Beispiele zum Raytracer POV-Ray von Friedrich A. Lohmüller
English English English
Français français

"material_map" Texturen layered textures

Aufprojizieren von Bildern
auf Oberflächen: "image_map{ ... }"


Beispiel für "image_map{...}":


Sample image_map 640x480

sphere{<0,0,0>, 1
   texture{
    pigment{
     // Projiziert ein Bild in die xy-Ebene
     // von <0,0,0> bis <1,1,0>
     // (Seitenverhältnis 1:1)
     image_map{ gif "plasma3.gif"
     // Bildtyp "Bilddateiname" - Pfadname + Endung
     // erlaubte Bildtypen:  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 // falls Bild nicht wiederholt werden soll.
      }} // 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  ------------------


Will man zum Beispiel ein Bild namens "MeinBild.tga" mit dem Seitenverhältnis Höhe:Breite = 3:4 passgenau auf eine Fläche von Höhe ( in y-Richtung) 0.90(m) und Breite ( in x-Richtung) 1.20(m) projizieren, so muß das aufprojizierte Bild entsprechend skaliert werden:

Beispiel für "image_map{...}":


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" Texturen layered textures

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