Your Legal Resource

Applying Decals In Pov-ray

How do I use an image to texture my object?

pigment

{ image_map

  { gif "image.gif"

    map_type 1

  }

}

Note: that in order for the image to be aligned properly, either the object has to be located at the origin when applying the pigment or the pigment has to be transformed to align with the object. It is generally easiest to create the object at the origin, apply the texture, then move it to wherever you want it.


Substitute the keyword gif with the type of image you are using (if it isn't a GIF): tga, iff, ppm, pgm, png or sys.


A map_type 0 gives the default planar mapping.

A map_type 1 gives a spherical mapping (maps the image onto a sphere).

With map_type 2 you get a cylindrical mapping (maps the image onto a cylinder).

Finally map_type 5 is a torus or donut-shaped mapping (maps the image onto a torus).


See the documentation for more details.

Image of Applying Decals In Pov-ray